Click or drag to resize

InputMap Class

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

Inheritance Hierarchy
SystemObject
  GodotInputMap

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static class InputMap

The InputMap type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberSingleton
Top
Methods
  NameDescription
Public methodStatic memberActionAddEvent

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

Public methodStatic memberActionEraseEvent

Removes an InputEvent from an action.

Public methodStatic memberActionEraseEvents

Removes all events from an action.

Public methodStatic memberActionHasEvent

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

Public methodStatic memberActionSetDeadzone

Sets a deadzone value for the action.

Public methodStatic memberAddAction

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

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

Public methodStatic memberEraseAction

Removes an action from the InputMap.

Public methodStatic memberEventIsAction

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, InputEvent) if you don't want this behavior.

Public methodStatic memberGetActionList

Returns an array of InputEvents associated with a given action.

Public methodStatic memberGetActions

Returns an array of all actions in the InputMap.

Public methodStatic memberHasAction

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

Public methodStatic memberLoadFromGlobals

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

Top
See Also