Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
InputMap¶
Inherits: Object
A singleton that manages all InputEventActions.
Description¶
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.
Tutorials¶
Methods¶
void |
action_add_event ( StringName action, InputEvent event ) |
void |
action_erase_event ( StringName action, InputEvent event ) |
void |
action_erase_events ( StringName action ) |
action_get_deadzone ( StringName action ) |
|
action_get_events ( StringName action ) |
|
action_has_event ( StringName action, InputEvent event ) |
|
void |
action_set_deadzone ( StringName action, float deadzone ) |
void |
add_action ( StringName action, float deadzone=0.5 ) |
void |
erase_action ( StringName action ) |
event_is_action ( InputEvent event, StringName action, bool exact_match=false ) const |
|
get_actions ( ) |
|
has_action ( StringName action ) const |
|
void |
Method Descriptions¶
void action_add_event ( StringName action, InputEvent event )
Adds an InputEvent to an action. This InputEvent will trigger the action.
void action_erase_event ( StringName action, InputEvent event )
Removes an InputEvent from an action.
void action_erase_events ( StringName action )
Removes all events from an action.
float action_get_deadzone ( StringName action )
Returns a deadzone value for the action.
InputEvent[] action_get_events ( StringName action )
Returns an array of InputEvents associated with a given action.
Note: When used in the editor (e.g. a tool script or EditorPlugin), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the input/*
settings from ProjectSettings.
bool action_has_event (