pub struct KeyboardState { /* private fields */ }Expand description
Represents state of keyboard.
Implementations§
Source§impl KeyboardState
impl KeyboardState
Sourcepub fn new(config: &KeyboardConfig) -> Result<Self, Illusion>
pub fn new(config: &KeyboardConfig) -> Result<Self, Illusion>
Constructs new KeyboardState.
Sourcepub fn update(&mut self, code: InputCode, value: InputValue) -> bool
pub fn update(&mut self, code: InputCode, value: InputValue) -> bool
Updates state with given key. Returns true when modifiers changed, false otherwise.
Auto Trait Implementations§
impl Freeze for KeyboardState
impl RefUnwindSafe for KeyboardState
impl !Send for KeyboardState
impl !Sync for KeyboardState
impl Unpin for KeyboardState
impl UnwindSafe for KeyboardState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more