Trait pc_keyboard::ScancodeSet
source · pub trait ScancodeSet {
fn advance_state(state: DecodeState, code: u8) -> Result<ConsumeState, Error>;
fn map_scancode(code: u8) -> Result<KeyCode, Error>;
fn map_extended_scancode(code: u8) -> Result<KeyCode, Error>;
}
Required Methods
sourcefn advance_state(state: DecodeState, code: u8) -> Result<ConsumeState, Error>
fn advance_state(state: DecodeState, code: u8) -> Result<ConsumeState, Error>
Handles state logic based on the byte.
ConsumeState::Consume(state)
indicates that the byte is now consumed and
there may or may not be a new state.
ConsumeState::Proceed(state)
indicates that the byte should be passed to
the map methods, and there may or may not be a new state.