Struct pc_keyboard::ScancodeSet2
source · pub struct ScancodeSet2 { /* private fields */ }
Expand description
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
Implementations§
source§impl ScancodeSet2
impl ScancodeSet2
sourcepub const fn new() -> ScancodeSet2
pub const fn new() -> ScancodeSet2
Construct a new ScancodeSet2
decoder.
Trait Implementations§
source§impl ScancodeSet for ScancodeSet2
impl ScancodeSet for ScancodeSet2
source§fn advance_state(&mut self, code: u8) -> Result<Option<KeyEvent>, Error>
fn advance_state(&mut self, code: u8) -> Result<Option<KeyEvent>, Error>
Implements state logic for scancode set 2
§Start:
- F0 => Goto Release
- E0 => Goto Extended
- E1 => Goto Extended2
- xx => Key Down Event
§Release:
- xxx => Key Up Event
§Extended:
- F0 => Goto Release-Extended
- xx => Extended Key Down Event
§Release-Extended:
- xxx => Extended Key Up Event
§Extended2:
- F0 => Goto Release-Extended2
- xx => Extended2 Key Down Event
§Release-Extended2:
- xxx => Extended2 Key Up Event