.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_InputMap: InputMap ======== **Inherits:** :ref:`Object` **Category:** Core Brief Description ----------------- Singleton that manages actions. Member Functions ---------------- +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`action_add_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`action_erase_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`action_has_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_action` **(** :ref:`String` action **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase_action` **(** :ref:`String` action **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`String` action **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_action_list` **(** :ref:`String` action **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_actions` **(** **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_action` **(** :ref:`String` action **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`load_from_globals` **(** **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_InputMap_action_add_event: - void **action_add_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** Add an :ref:`InputEvent` to an action. This :ref:`InputEvent` will trigger the action. .. _class_InputMap_action_erase_event: - void **action_erase_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** Remove an :ref:`InputEvent` from an action. .. _class_InputMap_action_has_event: - :ref:`bool` **action_has_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** Whether an action has an :ref:`InputEvent` associated with it. .. _class_InputMap_add_action: - void **add_action** **(** :ref:`String` action **)** Add an (empty) action to the :ref:`InputMap`. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. .. _class_InputMap_erase_action: - void **erase_action** **(** :ref:`String` action **)** Remove an action from the :ref:`InputMap`. .. _class_InputMap_event_is_action: - :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`String` action **)** const Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. .. _class_InputMap_get_action_list: - :ref:`Array` **get_action_list** **(** :ref:`String` action **)** Return an array of InputEvents associated with a given action. .. _class_InputMap_get_actions: - :ref:`Array` **get_actions** **(** **)** Return an array of all actions in the :ref:`InputMap`. .. _class_InputMap_has_action: - :ref:`bool` **has_action** **(** :ref:`String` action **)** const Whether this InputMap has a registered action with the given name. .. _class_InputMap_load_from_globals: - void **load_from_globals** **(** **)** Clear the :ref:`InputMap` and load it anew from :ref:`ProjectSettings`.