Skip to main content

Module keyboard_layout

Module keyboard_layout 

Source
Expand description

Keyboard Layout Configuration

Owns the shared keyboard modifier state and scancode processing logic. Layout-specific modules (keyboard.rs, keyboard_us.rs) only provide scancode-to-ASCII lookup tables.

Structs§

KeyboardState
Keyboard modifier state : shared across all layouts.

Constants§

KEY_DOWN
KEY_END
KEY_HOME
KEY_LEFT
KEY_RIGHT
KEY_UP
Special key constants (non-ASCII, outside 0-127)

Statics§

AZERTY_NORMAL
French AZERTY scancode set 1 -> ASCII mapping (lowercase)
AZERTY_SHIFT
French AZERTY shifted scancode -> ASCII mapping
KEYBOARD
Global keyboard modifier state : single instance shared by all layouts.
QWERTY_NORMAL
US QWERTY scancode set 1 -> ASCII mapping (lowercase)
QWERTY_SHIFT
US QWERTY shifted scancode -> ASCII mapping
USE_FRENCH_LAYOUT 🔒

Functions§

handle_scancode
Read port 0x60 and process the scancode with the current layout tables.
handle_scancode_raw
Process a pre-read scancode byte with the current layout tables.
is_french_layout
Get the current keyboard layout setting
process_scancode
Process a single scancode byte with the given lookup tables.
set_french_layout
Set the keyboard layout to French AZERTY
set_us_layout
Set the keyboard layout to US QWERTY