[][src]Crate pc_keyboard

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

layouts

Structs

KeyEvent
Keyboard

Keyboard<T, S> encapsulates decode/sampling logic, and handles state transitions and key events. Size: 10 bytes

Modifiers
ScancodeSet1

Contains the implementation of Scancode Set 1. See the OS dev wiki: https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_1

ScancodeSet2

Contains the implementation of Scancode Set 2. See the OS dev wiki: https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_2

Enums

DecodeState
DecodedKey
Error

Indicates different error conditions.

HandleControl

Options for how we can handle what happens when the Ctrl key is held down and a letter is pressed.

KeyCode

Keycodes that can be generated by a keyboard.

KeyState

Traits

KeyboardLayout
ScancodeSet