InputManager
Inherits: Node
Manages global input
Description
The InputManager class is responsible for handling global input that should happen everywhere in the application, regardless of the current menu. Examples include opening up the main or quick bar menus.
To include this functionality, add this as a node to the root node in the scene tree.
Properties
Methods
| Returns | Signature |
|---|---|
| String | get_default_global_profile_path() |
| bool | is_inputplumber_event(event: InputEvent) |
| bool | is_action_pressed(action: String) |
| void | action_release(dbus_path: String, action: String, strength: float = 1.0) |
| void | action_press(dbus_path: String, action: String, strength: float = 1.0) |
Property Descriptions
osk
KeyboardInstance osk
Reference to the on-screen keyboard instance to open when the OSK action is pressed.
audio_manager
AudioManager audio_manager
The audio manager to use to adjust the audio when audio input events happen.
input_plumber
InputPlumberInstance input_plumber
InputPlumber receives and sends DBus input events.
launch_manager
LaunchManager launch_manager
LaunchManager provides context on the currently running app so we can switch profiles
state_machine
StateMachine state_machine
The Global State Machine
popup_state_machine
StateMachine popup_state_machine
State machine to use to switch menu states in response to input events.
in_game_menu_state
State in_game_menu_state
Note
There is currently no description for this property. Please help us by contributing one!
main_menu_state
State main_menu_state
Note
There is currently no description for this property. Please help us by contributing one!
quick_bar_state
State quick_bar_state
Note
There is currently no description for this property. Please help us by contributing one!
osk_state
State osk_state
Note
There is currently no description for this property. Please help us by contributing one!
popup_state
State popup_state
Note
There is currently no description for this property. Please help us by contributing one!
actions_pressed
Dictionary actions_pressed = {}
Map of pressed actions to prevent double inputs
current_touches
int current_touches = 0
Number of currently pressed touches
logger
CustomLogger logger
Will show logger events with the prefix InputManager
Method Descriptions
get_default_global_profile_path()
String get_default_global_profile_path()
Note
There is currently no description for this method. Please help us by contributing one!
is_inputplumber_event()
bool is_inputplumber_event(event: InputEvent)
Returns true if the given event is an InputPlumber event
is_action_pressed()
bool is_action_pressed(action: String)
Returns true if the given action is currently pressed. If InputPlumber is not running, then Godot's Input system will be used to check if the action is pressed. Otherwise, the input manager will track the state of the action.
action_release()
void action_release(dbus_path: String, action: String, strength: float = 1.0)
Queue a release event for the given action
action_press()
void action_press(dbus_path: String, action: String, strength: float = 1.0)
Queue a pressed event for the given action