Expand description
PS/2 keyboard driver for x86_64.
Reads scancodes from I/O port 0x60, decodes them via the pc_keyboard
crate (ScancodeSet1, US 104-key layout), and pushes decoded ASCII bytes
to a lock-free ring buffer. The shell reads from this buffer.
On non-x86_64 architectures, all functions are no-op stubs.
Constants§
- KEY_
DELETE - Single-byte key code for Delete (GUI mode).
- KEY_
DOWN - Single-byte key code for Down arrow (GUI mode).
- KEY_END
- Single-byte key code for End (GUI mode).
- KEY_
HOME - Single-byte key code for Home (GUI mode).
- KEY_
LEFT - Single-byte key code for Left arrow (GUI mode).
- KEY_
RIGHT - Single-byte key code for Right arrow (GUI mode).
- KEY_UP
- Single-byte key code for Up arrow (GUI mode).
- MOD_ALT
- Bitmask: Alt is held.
- MOD_
CTRL - Bitmask: Ctrl is held.
- MOD_
SHIFT - Bitmask: Shift is held.
- MOD_
SUPER - Bitmask: Super/Win is held.
Functions§
- get_
modifiers - Get the current modifier key bitmask.
- handle_
scancode - Handle a scancode from the PS/2 keyboard interrupt (vector 33).
- init
- Initialize the PS/2 keyboard driver.
- is_
initialized - Check if the keyboard driver has been initialized.
- read_
key - Read a decoded key byte from the keyboard buffer (non-blocking).
- set_
gui_ mode - Enable or disable GUI key encoding mode.