Class reference

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().

Methods

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.

void action_set_deadzone(StringName action, float deadzone)

Sets a deadzone value for the action.

String get_action_description(StringName action) const

Returns the human-readable description of the given action.

StringName[] get_actions()

Returns an array of all actions in the InputMap.

bool has_action(StringName action) const

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

Tutorials

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.