pub struct ModifiersState {
pub shift: bool,
pub ctrl: bool,
pub alt: bool,
pub logo: 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.
Fields§
§shift: boolThe “shift” key
ctrl: boolThe “control” key
alt: boolThe “alt” key
logo: boolThe “logo” key
This is the “windows” key on PC and “command” key on Mac.
Trait Implementations§
Source§impl Clone for ModifiersState
impl Clone for ModifiersState
Source§fn clone(&self) -> ModifiersState
fn clone(&self) -> ModifiersState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModifiersState
impl Debug for ModifiersState
Source§impl Default for ModifiersState
impl Default for ModifiersState
Source§fn default() -> ModifiersState
fn default() -> ModifiersState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModifiersStatewhere
ModifiersState: Default,
impl<'de> Deserialize<'de> for ModifiersStatewhere
ModifiersState: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ModifiersState
impl Hash for ModifiersState
Source§impl PartialEq for ModifiersState
impl PartialEq for ModifiersState
Source§impl Serialize for ModifiersState
impl Serialize for ModifiersState
impl Copy for ModifiersState
impl Eq for ModifiersState
impl StructuralPartialEq for ModifiersState
Auto Trait Implementations§
impl Freeze for ModifiersState
impl RefUnwindSafe for ModifiersState
impl Send for ModifiersState
impl Sync for ModifiersState
impl Unpin for ModifiersState
impl UnsafeUnpin for ModifiersState
impl UnwindSafe for ModifiersState
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