Skip to main content

ScancodeSet

Trait ScancodeSet 

Source
pub trait ScancodeSet {
    // Required method
    fn advance_state(&mut self, code: u8) -> Result<Option<KeyEvent>, Error>;
}
Expand description

A mechanism to convert bytes from a Keyboard into KeyCode values.

This conversion is stateful.

Required Methods§

Source

fn advance_state(&mut self, code: u8) -> Result<Option<KeyEvent>, Error>

Handles the state logic for the decoding of scan codes into key events.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§