.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the InputMap.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_InputMap: InputMap ======== **Inherits:** :ref:`Object` **Category:** Core Brief Description ----------------- Singleton that manages :ref:`InputEventAction`. 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` **(** **)** | +----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu ``Project > Project Settings > Input Map`` or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. Member Function Description --------------------------- .. _class_InputMap_action_add_event: - void **action_add_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** Adds 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 **)** Removes an :ref:`InputEvent` from an action. .. _class_InputMap_action_has_event: - :ref:`bool` **action_has_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** Returns true if an action has an :ref:`InputEvent` associated with it. .. _class_InputMap_add_action: - void **add_action** **(** :ref:`String` action **)** Adds an (empty) action to the ``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 **)** Removes an action from the ``InputMap``. .. _class_InputMap_event_is_action: - :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`String` action **)** const Returns true if 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 **)** Returns an array of :ref:`InputEvent`\ s associated with a given action. .. _class_InputMap_get_actions: - :ref:`Array` **get_actions** **(** **)** Returns an array of all actions in the ``InputMap``. .. _class_InputMap_has_action: - :ref:`bool` **has_action** **(** :ref:`String` action **)** const Returns ``true`` if the ``InputMap`` has a registered action with the given name. .. _class_InputMap_load_from_globals: - void **load_from_globals** **(** **)** Clears all :ref:`InputEventAction` in the ``InputMap`` and load it anew from :ref:`ProjectSettings`.