Expand description
PS/2 mouse driver.
Reads 3-byte mouse packets from the PS/2 auxiliary port (x86_64 only). Maintains absolute cursor position clamped to screen bounds. On non-x86_64 architectures, all functions are no-op stubs.
Structs§
- Mouse
Event - Mouse event produced by the driver.
Constants§
- BUTTON_
LEFT - Mouse button state flags.
- BUTTON_
MIDDLE - BUTTON_
RIGHT
Functions§
- cursor_
position - Get the current absolute cursor position.
- has_
data - Check if mouse buffer has pending events.
- init
- Initialize the PS/2 mouse.
- is_
initialized - Check if the mouse driver is initialized.
- poll_
mouse - Poll for mouse data and push complete packets to the event buffer.
- poll_
mouse_ byte - Process a single byte from the PS/2 auxiliary port.
- read_
event - Read a mouse event from the buffer.
- set_
screen_ bounds - Set screen bounds for cursor clamping.