Struct InputMapSingleton

Singleton that manages InputEventAction.

struct InputMapSingleton ;

Manages all InputEventAction which can be created/modified from the project settings menu Project > Project Settings > Input Map or in code with addAction and actionAddEvent. See Node.input.

Methods

NameDescription
actionAddEvent Adds an InputEvent to an action. This InputEvent will trigger the action.
actionEraseEvent Removes an InputEvent from an action.
actionEraseEvents Removes all events from an action.
actionHasEvent Returns true if the action has the given InputEvent associated with it.
actionSetDeadzone Sets a deadzone value for the action.
addAction Adds an empty action to the InputMap with a configurable deadzone. An InputEvent can then be added to this action with actionAddEvent.
eraseAction Removes an action from the InputMap.
eventIsAction Returns true if the given event is part of an existing action. This method ignores keyboard modifiers if the given InputEvent is not pressed (for proper release detection). See actionHasEvent if you don't want this behavior.
getActionList Returns an array of InputEvents associated with a given action.
getActions Returns an array of all actions in the InputMap.
hasAction Returns true if the InputMap has a registered action with the given name.
loadFromGlobals Clears all InputEventAction in the InputMap and load it anew from ProjectSettings.