⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module mouse

Module mouse 

Source
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§

MouseEvent
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.