Struct smithay_client_toolkit::seat::keyboard::ModifiersState
source · [−]pub struct ModifiersState {
pub ctrl: bool,
pub alt: bool,
pub shift: bool,
pub caps_lock: bool,
pub logo: bool,
pub num_lock: bool,
}
Expand description
Represents the current state of the keyboard modifiers
Each field of this struct represents a modifier and is true
if this modifier is active.
For some modifiers, this means that the key is currently pressed, others are toggled (like caps lock).
Fields
ctrl: bool
The “control” key
alt: bool
The “alt” key
shift: bool
The “shift” key
caps_lock: bool
The “Caps lock” key
logo: bool
The “logo” key
Also known as the “windows” key on most keyboards
num_lock: bool
The “Num lock” key
Trait Implementations
sourceimpl Clone for ModifiersState
impl Clone for ModifiersState
sourcefn clone(&self) -> ModifiersState
fn clone(&self) -> ModifiersState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ModifiersState
impl Debug for ModifiersState
sourceimpl Default for ModifiersState
impl Default for ModifiersState
sourcefn default() -> ModifiersState
fn default() -> ModifiersState
Returns the “default value” for a type. Read more
impl Copy for ModifiersState
Auto Trait Implementations
impl RefUnwindSafe for ModifiersState
impl Send for ModifiersState
impl Sync for ModifiersState
impl Unpin for ModifiersState
impl UnwindSafe for ModifiersState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more