pub struct KeyboardBackend { /* private fields */ }
Expand description
The keyboard “backend”, manages the keyboard from the events received (presses/releases of coordinates on a keyboard layout). through to listing HID scancodes to report using HIDs.
Implementations§
Source§impl KeyboardBackend
impl KeyboardBackend
Sourcepub fn set_callbacks(&mut self, callbacks: KeymapCallbacks)
pub fn set_callbacks(&mut self, callbacks: KeymapCallbacks)
Set the keymap callbacks.
Sourcepub fn tick(&mut self) -> bool
pub fn tick(&mut self) -> bool
A time event.
This method must be called regularly, typically every millisecond.
Returns true if the pressed_key_codes have changed.
pub fn keymap_output(&self) -> &KeymapOutput
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KeyboardBackend
impl !RefUnwindSafe for KeyboardBackend
impl Send for KeyboardBackend
impl !Sync for KeyboardBackend
impl Unpin for KeyboardBackend
impl UnwindSafe for KeyboardBackend
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more