Registers an action callback for a given key action.
The action name (e.g., "pov", "save").
The callback function to execute.
Returns the current input state for character movement and actions.
Returns the current key bindings.
Returns the display name for the first key bound to an action.
The action name.
The key name or the action name if not found.
Pauses input handling (e.g., when a menu is open).
Resumes input handling.
Removes a registered action callback.
The action name.
Removes all registered action callbacks.
Executes all registered actions whose keys are currently pressed.
Sets the keyboard preset (QWERTY or AZERTY).
The preset name.
Updates the key bindings for a specific action and saves to cookies.
The action name.
The new key(s) to bind.
Static
getReturns the singleton instance of InputHandler.
InputHandler manages keyboard input and key bindings for the game.
Responsibilities:
Usage:
InputHandler.getInstance()
to access the handler.addAction
.getInput
.