Creates an instance of InputManager.
The Rapid instance for rendering and coordinate conversion.
Removes all event listeners and cleans up resources.
Checks if a mouse button is currently pressed (continuous detection).
The mouse button number (0: left, 1: middle, 2: right).
True if the button is pressed, false otherwise.
Checks if a mouse button is currently released.
The mouse button number (0: left, 1: middle, 2: right).
True if the button is released, false otherwise.
Checks if a key is currently pressed (continuous detection).
The key code (e.g., "KeyW", "Space").
True if the key is pressed, false otherwise.
Checks if a key is currently released.
The key code (e.g., "KeyW", "Space").
True if the key is released, false otherwise.
Updates the state of keys and buttons for the next frame.
Checks if a mouse button was pressed in the current frame (single trigger).
The mouse button number (0: left, 1: middle, 2: right).
True if the button was just pressed, false otherwise.
Checks if a mouse button was released in the current frame (single trigger).
The mouse button number (0: left, 1: middle, 2: right).
True if the button was just released, false otherwise.
Checks if a key was pressed in the current frame (single trigger).
The key code (e.g., "KeyW", "Space").
True if the key was just pressed, false otherwise.
Checks if a key was released in the current frame (single trigger).
The key code (e.g., "KeyW", "Space").
True if the key was just released, false otherwise.
Manages user input for keyboard and mouse events. Tracks key and button states, including pressed/released states for the current and previous frames.