class

InputActionSystem

Singleton that evaluates input actions each frame based on raw InputManager state. Manages a stack of InputContexts with priority ordering.

Module
Input
Header
#include "Input/InputActionSystem.h"
Namespace
Mowo

Constructors

SignatureNameDescription
~InputActionSystem()~InputActionSystem

Public functions

ReturnsNameDescription
InputActionSystem&GetThe process-wide instance: player 0 (keyboard, mouse and every pad the bindings name) and every single-player game.
std::unique_ptr<InputActionSystem>CreatePlayerInstanceOne more local player's own instance (split-screen co-op).
voidSetDeviceRoutingDevice routing for this instance; -1 / true = read what each binding names (the global instance's default).
int32_tGetRoutedGamepad
boolReadsKeyboardMouse
voidCopyContextsFromCopies every context definition and the stack order from other.
voidInitialize
voidUpdate
voidUpdate
voidShutdown
InputManager*GetInputManagerThe raw device state this system evaluates against.
InputContext*CreateContextCreate a new context (not on the stack yet)
InputContext*GetContext
voidPushContextPush a context onto the stack, inserted by InputContext::GetPriority (stack stays sorted ascending, back = highest = evaluated first; equal priorities keep push order).
voidPopContextRemove a context from the stack (does not destroy it).
voidEnableContext
std::vector<std::string>GetContextNames
boolIsContextStackedOn the stack right now, and therefore able to fire.
boolIsActionActive
boolIsActionStarted
boolIsActionCanceled
floatGetActionValue
Vec2GetActionValue2D
Vec3GetActionValue3DAxis3D value; an Axis2D action reads with Z = 0.
voidSwizzlePermutationSwizzle order code (EInputSwizzleOrder, kept in InputModifier::param0) to a permutation: output axis i reads input axis out[i].
const InputActionState*GetActionStateSearches all active contexts.
boolGetTriggerEventEnhanced-Input trigger event query — true when the action raised the given UE5-style event this frame.
voidRebindActionReplace all bindings for an action in a given context
voidLoadBindingsLoad bindings from MDF (creates contexts and pushes them onto the stack)
voidSaveBindingsPersists every registered non-runtime-only context (runtime-only ones mirror asset data and are rebuilt each session).
std::stringUserBindingsPath<project>/Saved/Config/InputUser.mdfb, or the per-user product dir when no project is open.
boolLoadUserBindingsReads the player tier and applies whatever part of it names a context that exists right now.
boolLoadUserBindings
boolSaveUserBindings
boolSaveUserBindings
voidApplyUserBindingsRe-applies the whole override set over the contexts as they stand.
voidSetUserBindingRecord and apply one rebind.
voidClearUserBindingDrop an override and restore what the project data supplied.
voidClearUserBindings
voidClearAllUserBindings
boolHasUserBinding
std::vector<InputBinding>GetDefaultBindingsWhat the action was bound to before any override — empty when the action has never been overridden.
const std::vector<FInputBindingOverride>&GetUserBindings
std::vector<FInputBindingConflict>FindBindingConflictsPairs of actions bound to the same physical source, across every registered non-runtime-only context.
std::vector<FInputBindingConflict>FindBindingConflictsInThe same check over an explicit context list, in the order given.
boolSameBindingSourceTrue when two bindings read the same hardware source (key, button, axis + pad slot, touch slot); scale, axis index and modifiers are ignored — they shape the value, not where it comes from.
std::vector<FInputActionDebugRow>GetDebugSnapshotPost-Update view of every stacked action (top of stack first), including actions a consuming context or duplicate name suppressed — exactly what an on-screen input debug overlay needs to draw.
voidSetExternalActionSourcei.DebugOverlay — the switch the on-screen action overlay reads.
IInputActionSource*GetExternalActionSource
std::stringGetActionBindingTextThe first binding of the action for the device family asked about, as the bindings file spells it ("E", "MouseLeft", "RightTrigger"); empty when the action has none.
boolIsUsingExternalSourceTrue when the last Update read gamepad actions from the external source.
boolIsDebugOverlayEnabled
voidSetDebugOverlayEnabled
floatMouseSensitivityPlayer look preferences, backed by i.MouseSensitivity and i.MouseInvertY and applied to both mouse-delta sources before any binding modifier — a game that ships several look actions gets them on all of them, and a mapping context authored without them cannot opt the player out by omission.
voidSetMouseSensitivity
boolIsMouseYInverted
voidSetMouseYInverted

Function details

~InputActionSystem

C++
~InputActionSystem()

Get

C++
static InputActionSystem& Get()

The process-wide instance: player 0 (keyboard, mouse and every pad the bindings name) and every single-player game.

CreatePlayerInstance

C++
static std::unique_ptr<InputActionSystem> CreatePlayerInstance(InputManager* inputManager, int32_t gamepadIndex, bool keyboardMouse)

One more local player's own instance (split-screen co-op). It owns its context stack, trigger state and rebinds, and reads only the devices it is routed to: every gamepad binding reads gamepadIndex whatever pad the binding names (so one mapping context serves every player), and keyboard / mouse bindings read nothing unless keyboardMouse. The contexts the global instance holds right now are copied in.

SetDeviceRouting

C++
void SetDeviceRouting(int32_t gamepadIndex, bool keyboardMouse)

Device routing for this instance; -1 / true = read what each binding names (the global instance's default).

GetRoutedGamepad

C++
int32_t GetRoutedGamepad() const

ReadsKeyboardMouse

C++
bool ReadsKeyboardMouse() const

CopyContextsFrom

C++
void CopyContextsFrom(const InputActionSystem& other)

Copies every context definition and the stack order from other.

Initialize

C++
void Initialize(InputManager* inputManager)

Update

C++
void Update()

Update

C++
void Update(float deltaSeconds)

Shutdown

C++
void Shutdown()

GetInputManager

C++
InputManager* GetInputManager() const

The raw device state this system evaluates against. Null in headless hosts that never called Initialize.

CreateContext

C++
InputContext* CreateContext(const std::string& name)

Create a new context (not on the stack yet)

GetContext

C++
InputContext* GetContext(const std::string& name)

PushContext

C++
void PushContext(const std::string& name)

Push a context onto the stack, inserted by InputContext::GetPriority (stack stays sorted ascending, back = highest = evaluated first; equal priorities keep push order).

PopContext

C++
void PopContext(const std::string& name)

Remove a context from the stack (does not destroy it). Its actions are cancel-evaluated so nothing resumes from stale mid-episode state on the next push (a held Tap would otherwise fire on re-push's first release).

EnableContext

C++
void EnableContext(const std::string& name, bool enabled)

GetContextNames

C++
std::vector<std::string> GetContextNames() const

IsContextStacked

C++
bool IsContextStacked(const std::string& name) const

On the stack right now, and therefore able to fire. A context that exists but was never pushed — a UI context waiting for its menu, a project tier declared alongside the mapping-context assets that supersede it — cannot produce input, so its bindings cannot collide with anything.

IsActionActive

C++
bool IsActionActive(const std::string& actionName) const

IsActionStarted

C++
bool IsActionStarted(const std::string& actionName) const

IsActionCanceled

C++
bool IsActionCanceled(const std::string& actionName) const

GetActionValue

C++
float GetActionValue(const std::string& actionName) const

GetActionValue2D

C++
Vec2 GetActionValue2D(const std::string& actionName) const

GetActionValue3D

C++
Vec3 GetActionValue3D(const std::string& actionName) const

Axis3D value; an Axis2D action reads with Z = 0.

SwizzlePermutation

C++
static void SwizzlePermutation(float order, uint8_t out[3])

Swizzle order code (EInputSwizzleOrder, kept in InputModifier::param0) to a permutation: output axis i reads input axis out[i].

GetActionState

C++
const InputActionState* GetActionState(const std::string& actionName) const

Searches all active contexts.

GetTriggerEvent

C++
bool GetTriggerEvent(const std::string& actionName, ETriggerEvent event) const

Enhanced-Input trigger event query — true when the action raised the given UE5-style event this frame. Backs MPlayerInput's BindAction.

RebindAction

C++
void RebindAction(const std::string& contextName, const std::string& actionName, const std::vector<InputBinding>& newBindings)

Replace all bindings for an action in a given context

LoadBindings

C++
void LoadBindings(const std::string& filepath)

Load bindings from MDF (creates contexts and pushes them onto the stack)

SaveBindings

C++
void SaveBindings(const std::string& filepath)

Persists every registered non-runtime-only context (runtime-only ones mirror asset data and are rebuilt each session).

UserBindingsPath

C++
static std::string UserBindingsPath()

<project>/Saved/Config/InputUser.mdfb, or the per-user product dir when no project is open.

LoadUserBindings

C++
bool LoadUserBindings()

Reads the player tier and applies whatever part of it names a context that exists right now. Overrides naming a context that does not exist yet are kept — the Enhanced-Input subsystem mirrors its contexts long after startup, and ApplyUserBindings picks them up then.

LoadUserBindings

C++
bool LoadUserBindings(const std::string& filepath)

SaveUserBindings

C++
bool SaveUserBindings()

SaveUserBindings

C++
bool SaveUserBindings(const std::string& filepath)

ApplyUserBindings

C++
void ApplyUserBindings()

Re-applies the whole override set over the contexts as they stand.

SetUserBinding

C++
void SetUserBinding(const std::string& contextName, const std::string& actionName, const std::vector<InputBinding>& bindings)

Record and apply one rebind. The bindings the action carried before its first override are remembered as the reset target.

ClearUserBinding

C++
void ClearUserBinding(const std::string& contextName, const std::string& actionName)

Drop an override and restore what the project data supplied.

ClearUserBindings

C++
void ClearUserBindings(const std::string& contextName)

ClearAllUserBindings

C++
void ClearAllUserBindings()

HasUserBinding

C++
bool HasUserBinding(const std::string& contextName, const std::string& actionName) const

GetDefaultBindings

C++
std::vector<InputBinding> GetDefaultBindings(const std::string& contextName, const std::string& actionName) const

What the action was bound to before any override — empty when the action has never been overridden.

GetUserBindings

C++
const std::vector<FInputBindingOverride>& GetUserBindings() const

FindBindingConflicts

C++
std::vector<FInputBindingConflict> FindBindingConflicts() const

Pairs of actions bound to the same physical source, across every registered non-runtime-only context. Backing data for the editor's conflict warnings; the engine never blocks a conflicting bind.

FindBindingConflictsIn

C++
static std::vector<FInputBindingConflict> FindBindingConflictsIn(const std::vector<const InputContext*>& contexts)

The same check over an explicit context list, in the order given. The editor runs it over a context mirrored from the asset it is editing — an unsaved mapping context is registered nowhere, so the member form could never see it.

SameBindingSource

C++
static bool SameBindingSource(const InputBinding& a, const InputBinding& b)

True when two bindings read the same hardware source (key, button, axis + pad slot, touch slot); scale, axis index and modifiers are ignored — they shape the value, not where it comes from.

GetDebugSnapshot

C++
std::vector<FInputActionDebugRow> GetDebugSnapshot() const

Post-Update view of every stacked action (top of stack first), including actions a consuming context or duplicate name suppressed — exactly what an on-screen input debug overlay needs to draw.

SetExternalActionSource

C++
static void SetExternalActionSource(IInputActionSource* source)

i.DebugOverlay — the switch the on-screen action overlay reads. A cvar rather than editor state so the runtime host and the console can flip the same thing (--cvar=i.DebugOverlay=1). The platform action source (Steam Input) the main instance reads gamepad actions from while it is active; null restores the engine's own gamepad path. Per-player instances keep their routed pad and never use it.

GetExternalActionSource

C++
static IInputActionSource* GetExternalActionSource()

GetActionBindingText

C++
std::string GetActionBindingText(const std::string& actionName, bool gamepad) const

The first binding of the action for the device family asked about, as the bindings file spells it ("E", "MouseLeft", "RightTrigger"); empty when the action has none. The fallback text of a button prompt.

IsUsingExternalSource

C++
bool IsUsingExternalSource() const

True when the last Update read gamepad actions from the external source.

IsDebugOverlayEnabled

C++
static bool IsDebugOverlayEnabled()

SetDebugOverlayEnabled

C++
static void SetDebugOverlayEnabled(bool enabled)

MouseSensitivity

C++
static float MouseSensitivity()

Player look preferences, backed by i.MouseSensitivity and i.MouseInvertY and applied to both mouse-delta sources before any binding modifier — a game that ships several look actions gets them on all of them, and a mapping context authored without them cannot opt the player out by omission. Sensitivity is clamped to 0.05..10 because a zero is a dead mouse the player cannot undo from inside the game.

SetMouseSensitivity

C++
static void SetMouseSensitivity(float sensitivity)

IsMouseYInverted

C++
static bool IsMouseYInverted()

SetMouseYInverted

C++
static void SetMouseYInverted(bool inverted)
Generated from Input/InputActionSystem.h via input.json · Nov 2, 2026Version 1.0.0