Singleton that manages InputEventAction.
    public static class InputMap

Manages all InputEventAction which can be created/modified from the project settings menu Project > Project Settings > Input Map or in code with AddAction(string, float) and ActionAddEvent(string, Godot.InputEvent). See Node._Input(Godot.InputEvent).

Inheritance Chain

Static Properties

    public static Object Singleton { get; }

Static Methods

    public static void ActionAddEvent(string action, InputEvent @event)

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

    public static void ActionEraseEvent(string action, InputEvent @event)

Removes an InputEvent from an action.

    public static void ActionEraseEvents(string action)

Removes all events from an action.

    public static bool ActionHasEvent(string action, InputEvent @event)

Returns true if the action has the given InputEvent associated with it.

    public static void ActionSetDeadzone(string action, float deadzone)

    public static void AddAction(string action, float deadzone = 0.5f)

Adds an empty action to the InputMap with a configurable deadzone.

An InputEvent can then be added to this action with ActionAddEvent(string, Godot.InputEvent).

    public static void EraseAction(string action)

Removes an action from the InputMap.

    public static bool EventIsAction(InputEvent @event, string action)

Returns true if the given event is part of an existing action. This method ignores keyboard modifiers if the given InputEvent is not pressed (for proper release detection). See ActionHasEvent(string, Godot.InputEvent) if you don’t want this behavior.

    public static Godot.Collections.Array GetActionList(string action)

Returns an array of InputEvents associated with a given action.

    public static Godot.Collections.Array GetActions()

Returns an array of all actions in the InputMap.

    public static bool HasAction(string action)

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

    public static void LoadFromGlobals()

Clears all InputEventAction in the InputMap and load it anew from ProjectSettings.

Tags: