Determines whether the mouse pointer is currently locked/captured by the browser Pointer Lock API.
Retrieves the active mouse pointer mode.
Binds an array of hardware event codes to a custom named semantic action.
Unique identifier name of the action.
Physical hardware event keys (e.g. ['KeyW', 'ArrowUp']).
Tears down all registered event listeners on window and document.
Registers event listeners on the global window scope to track keydown, keyup, mousedown, mouseup, mousemove, and pointerlockchange events. Automatically associates with the target canvas element to scope event tracking.
OptionalcanvasElement: HTMLCanvasElementAssesses if any physical key mapped to the semantic action was triggered down during the active frame.
Unique identifier name of the action.
True if any associated key was newly pressed this frame, false otherwise.
Assesses if any physical key mapped to the semantic action was released during the active frame.
Unique identifier name of the action.
True if any associated key was newly released this frame, false otherwise.
Assesses if any physical key mapped to the semantic action is currently pressed down.
Unique identifier name of the action.
True if any associated key is held down, false otherwise.
Verifies if a specific keyboard key was pressed down exactly during the active frame.
The physical keyboard event code (e.g., 'KeyA').
True if newly pressed this frame, false otherwise.
Verifies if a specific keyboard key was released exactly during the active frame.
The physical keyboard event code (e.g., 'KeyS').
True if newly released this frame, false otherwise.
Verifies if a specific keyboard key is currently being held down.
The physical keyboard event code (e.g., 'Space').
True if held down, false otherwise.
Verifies if a specific mouse button was pressed down exactly during the active frame.
The mouse button index (0: Left, 1: Middle, 2: Right).
True if newly pressed this frame, false otherwise.
Verifies if a specific mouse button was released exactly during the active frame.
The mouse button index (0: Left, 1: Middle, 2: Right).
True if newly released this frame, false otherwise.
Verifies if a specific mouse button is currently held down.
The mouse button index (0: Left, 1: Middle, 2: Right).
True if held down, false otherwise.
Alters the current MouseMode configuration.
"captured": Arms pointer locking. Locking is initiated on the next valid mouse down event."visible": Immediately exits the browser Pointer Lock context.The target MouseMode configuration.
Resets frame-transient key/button states and resets delta movement values. Must be invoked at the conclusion of every render/update frame loop.
InputManager coordinates keyboard and mouse input events, maintaining instantaneous button/key states, delta movement values, and mapping physical keyboard keys to abstract semantic action bindings.