[−][src]Trait pc_keyboard::ScancodeSet
Required methods
fn advance_state(
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
Handles the state logic for the decoding of scan codes into key events.
fn map_scancode(code: u8) -> Result<KeyCode, Error>
Convert a Scan Code set X byte to our 'KeyCode' enum
fn map_extended_scancode(code: u8) -> Result<KeyCode, Error>
Convert a Scan Code Set X extended byte (prefixed E0) to our KeyCode
enum.
Implementors
impl ScancodeSet for ScancodeSet1
[src]
fn advance_state(
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
[src]
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
Implements state logic for scancode set 1
Start: E0 => Extended
= 0x80 => Key Up <= 0x7F => Key Down
Extended:
= 0x80 => Extended Key Up <= 0x7F => Extended Key Down
fn map_scancode(code: u8) -> Result<KeyCode, Error>
[src]
Implements the single byte codes for Set 1.
fn map_extended_scancode(code: u8) -> Result<KeyCode, Error>
[src]
Implements the extended byte codes for set 1 (prefixed with E0)
impl ScancodeSet for ScancodeSet2
[src]
fn advance_state(
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
[src]
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
Implements state logic for scancode set 2
Start: F0 => Release E0 => Extended xx => Key Down
Release: xxx => Key Up
Extended: F0 => Release Extended xx => Extended Key Down
Release Extended: xxx => Extended Key Up
fn map_scancode(code: u8) -> Result<KeyCode, Error>
[src]
Implements the single byte codes for Set 2.
fn map_extended_scancode(code: u8) -> Result<KeyCode, Error>
[src]
Implements the extended byte codes for set 1 (prefixed with E0)