Struct pc_keyboard::ScancodeSet2
source · [−]pub struct ScancodeSet2;
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
Trait Implementations
sourceimpl ScancodeSet for ScancodeSet2
impl ScancodeSet for ScancodeSet2
sourcefn advance_state(
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
fn advance_state(
state: &mut DecodeState,
code: u8
) -> Result<Option<KeyEvent>, Error>
Implements state logic for scancode set 2
Start: F0 => Release E0 => Extended E1 => Extended2 (only used for Pause Key) xx => Key Down
Release: xxx => Key Up
Extended: F0 => Release Extended xx => Extended Key Down
Release Extended: xxx => Extended Key Up
Extended2: F0 => Release Extended2 xx => Extended2 Key Down
Release Extended2: xxx => Extended2 Key Up
sourcefn map_scancode(code: u8) -> Result<KeyCode, Error>
fn map_scancode(code: u8) -> Result<KeyCode, Error>
Implements the single byte codes for Set 2.
Auto Trait Implementations
impl RefUnwindSafe for ScancodeSet2
impl Send for ScancodeSet2
impl Sync for ScancodeSet2
impl Unpin for ScancodeSet2
impl UnwindSafe for ScancodeSet2
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more