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
Implements the various keyboard layouts.
Structs
Keyboard<T, S>
encapsulates decode/sampling logic, and handles state transitions and key events.
Size: 10 bytesContains 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
Additional reference: https://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html
Enums
Indicates different error conditions.
Options for how we can handle what happens when the Ctrl key is held down
and a letter is pressed.
Keycodes that can be generated by a keyboard.