#[non_exhaustive]pub struct Leds {
pub caps_lock: bool,
pub num_lock: bool,
pub scroll_lock: bool,
}Expand description
The lock state, as the keyboard’s lights would show it.
Two sides use this and neither owns it: xkb tracks the latch, and the
device carries the light. Keeping them together is the caller’s job –
read Keyboard::leds after a key, and when it
differs from last time push it to Seat::set_leds.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.caps_lock: boolCaps Lock.
num_lock: boolNum Lock.
scroll_lock: boolScroll Lock.
Dead on most layouts: xkb’s default compat has no mod-mapping for
<SCLK>, so nothing sets it and
Keyboard::set_leds cannot make it true.
Trait Implementations§
impl Copy for Leds
impl Eq for Leds
impl StructuralPartialEq for Leds
Auto Trait Implementations§
impl Freeze for Leds
impl RefUnwindSafe for Leds
impl Send for Leds
impl Sync for Leds
impl Unpin for Leds
impl UnsafeUnpin for Leds
impl UnwindSafe for Leds
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