Manages all godot.InputEventAction
which can be created/modified from the project settings menu Project > Project Settings > Input Map or in code with godot.InputMap.addAction
and godot.InputMap.actionAddEvent
. See godot.Node._Input
.
Static variables
Static methods
staticactionAddEvent(action:String, event:InputEvent):Void
Adds an godot.InputEvent
to an action. This godot.InputEvent
will trigger the action.
staticactionEraseEvent(action:String, event:InputEvent):Void
Removes an godot.InputEvent
from an action.
staticactionHasEvent(action:String, event:InputEvent):Bool
Returns true
if the action has the given godot.InputEvent
associated with it.
staticaddAction(action:String, ?deadzone:Single):Void
Adds an empty action to the godot.InputMap
with a configurable deadzone
.
An godot.InputEvent
can then be added to this action with godot.InputMap.actionAddEvent
.
staticeventIsAction(event:InputEvent, action:String, ?exactMatch:Bool):Bool
Returns true
if the given event is part of an existing action. This method ignores keyboard modifiers if the given godot.InputEvent
is not pressed (for proper release detection). See godot.InputMap.actionHasEvent
if you don't want this behavior.
If exact_match
is false
, it ignores the input modifiers for godot.InputEventKey
and godot.InputEventMouseButton
events, and the direction for godot.InputEventJoypadMotion
events.
staticgetActionList(action:String):Array
Returns an array of godot.InputEvent
s associated with a given action.
Note: When used in the editor (e.g. a tool script or Godot.EditorPlugin
), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the input/*
settings from godot.ProjectSettings
.
statichasAction(action:String):Bool
Returns true
if the godot.InputMap
has a registered action with the given name.
staticloadFromGlobals():Void
Clears all godot.InputEventAction
in the godot.InputMap
and load it anew from godot.ProjectSettings
.