Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
Table of contents
-
func action_add_event(event: InputEvent) -> void -
func action_erase_event(event: InputEvent) -> void -
func action_erase_events(action: StringName) -> void -
func action_get_deadzone(action: StringName) -> float -
func action_get_events(action: StringName) -> InputEvent[] -
func action_has_event(event: InputEvent) -> bool -
func action_set_deadzone(deadzone: float) -> void -
func add_action(deadzone: float = 0.2) -> void -
func erase_action(action: StringName) -> void -
const func event_is_action(exact_match: bool = false) -> bool -
func get_actions() -> StringName[] -
const func has_action(action: StringName) -> bool -
func load_from_project_settings() -> void
InputMap #
is_instantiable, core, not_builtin_classes, singleton
A singleton that manages all InputEventActions.
Manages all InputEventAction which can be created/modified from the project settings menu Project > Project Settings > Input Map or in code with add_action and action_add_event. See Node._input.
Members #
Methods #
func action_add_event(event: InputEvent) -> void#
Adds an InputEvent to an action. This InputEvent will trigger the action.
func action_erase_event(event: InputEvent) -> void#
Removes an InputEvent from an action.
func action_erase_events(action: StringName) -> void#
Removes all events from an action.
func action_get_deadzone(action: StringName) -> float#
Returns a deadzone value for the action.
func action_get_events(action: StringName) -> InputEvent[]#
Returns an array of InputEvents associated with a given action.
Note: When used in the editor (e.g. a tool script or 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 ProjectSettings.
func action_has_event(event: InputEvent) -> bool#
Returns true if the action has the given InputEvent associated with it.
func action_set_deadzone(deadzone: float) -> void#
Sets a deadzone value for the action.
func add_action(deadzone: float = 0.2) -> void#
Adds an empty action to the InputMap with a configurable deadzone.
An InputEvent can then be added to this action with action_add_event.
const func event_is_action(exact_match: bool = false) -> bool#
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 action_has_event if you don't want this behavior.
If exact_match is false, it ignores additional input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events.
const func has_action(action: StringName) -> bool#
Returns true if the InputMap has a registered action with the given name.
func load_from_project_settings() -> void#
Clears all InputEventAction in the InputMap and load it anew from ProjectSettings.