Inherits: Object

Singleton that manages InputEventAction.


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



voidaction_add_event ( String action, InputEvent event )
voidaction_erase_event ( String action, InputEvent event )
voidaction_erase_events ( String action )
boolaction_has_event ( String action, InputEvent event )
voidaction_set_deadzone ( String action, float deadzone )
voidadd_action ( String action, float deadzone=0.5 )
voiderase_action ( String action )
boolevent_is_action ( InputEvent event, String action ) const
Arrayget_action_list ( String action )
Arrayget_actions ( )
boolhas_action ( String action ) const
voidload_from_globals ( )

Method Descriptions

Adds an InputEvent to an action. This InputEvent will trigger the action.

Removes an InputEvent from an action.

  • void action_erase_events ( String action )

Removes all events from an action.

Returns true if the action has the given InputEvent associated with it.

  • void action_set_deadzone ( String action, float deadzone )

Sets a deadzone value for the action.

Adds an empty action to the InputMap with a configurable deadzone.

An InputEvent can then be added to this action with action_add_event.

  • void erase_action ( String action )

Removes an action from the InputMap.

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 action_has_event if you don’t want this behavior.

Returns an array of InputEvents associated with a given action.

Returns an array of all actions in the InputMap.

Returns true if the InputMap has a registered action with the given name.

  • void load_from_globals ( )

Clears all InputEventAction in the InputMap and load it anew from ProjectSettings.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.