pub struct ModifierState {
pub shift: bool,
pub ctrl: bool,
pub alt: bool,
pub meta: Option<bool>,
pub caps_lock: bool,
pub num_lock: bool,
pub scroll_lock: bool,
}Available on crate feature
keyboard-types only.Expand description
Modifier and lock state as reported by the platform alongside a key event.
Fields§
§shift: bool§ctrl: bool§alt: bool§meta: Option<bool>None when the platform cannot report Meta; KeyEventConverter
then substitutes the state it tracks from KEY_META_LEFT /
KEY_META_RIGHT transitions.
caps_lock: bool§num_lock: bool§scroll_lock: boolTrait Implementations§
Source§impl Clone for ModifierState
impl Clone for ModifierState
Source§fn clone(&self) -> ModifierState
fn clone(&self) -> ModifierState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ModifierState
Source§impl Debug for ModifierState
impl Debug for ModifierState
Source§impl Default for ModifierState
impl Default for ModifierState
Source§fn default() -> ModifierState
fn default() -> ModifierState
Returns the “default value” for a type. Read more
impl Eq for ModifierState
Source§impl PartialEq for ModifierState
impl PartialEq for ModifierState
impl StructuralPartialEq for ModifierState
Auto Trait Implementations§
impl Freeze for ModifierState
impl RefUnwindSafe for ModifierState
impl Send for ModifierState
impl Sync for ModifierState
impl Unpin for ModifierState
impl UnsafeUnpin for ModifierState
impl UnwindSafe for ModifierState
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