Struct cognitive_inputs::keyboard_state::KeyboardState
[−]
[src]
pub struct KeyboardState { /* fields omitted */ }
Represents state of keyboard.
Methods
impl KeyboardState
[src]
fn new(config: &KeyboardConfig) -> Result<Self, Illusion>
Constructs new KeyboardState
.
fn update(&mut self, code: InputCode, value: InputValue) -> bool
Updates state with given key. Returns true
when modifiers changed, false otherwise.
fn get_mods(&self) -> KeyMods
Returns state of modifiers.