Skip to main content

InputMap

Inherits: Object

Description

A singleton that manages all InputEventActions. Manages all InputEventAction which can be created/modified from the project settings menu or in code.

Methods

add_action

Adds an empty action to the InputMap with a configurable deadzone.
StringName
The name of the action to add
float
The deadzone value (default: 0.2)

action_add_event

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

action_erase_event

Removes an InputEvent from an action.

has_action

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

get_actions

Returns an array of all actions in the InputMap.

Example Usage