Crate pc_keyboard

source ·
Expand description

Driver for a PS/2 keyboard.

Supports PS/2 Scan Code Set 1 and 2, on both UK and UK English keyboards. See the OSDev Wiki.

Requires that you sample a pin in an interrupt routine and shift in the bit. We don’t sample the pin in this library, as that makes testing difficult, and it means you have to make this object a global static mut that the interrupt can access, which is unsafe.

Modules

Structs

Keyboard<T, S> encapsulates decode/sampling logic, and handles state transitions and key events. Size: 10 bytes
Contains the implementation of Scancode Set 1. See the OS dev wiki: https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_1
Contains the implementation of Scancode Set 2. See the OS dev wiki: https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_2

Enums

Indicates different error conditions.
Keycodes that can be generated by a keyboard.

Traits