pub struct Modifiers {
pub alt: bool,
pub ctrl: bool,
pub shift: bool,
pub command: bool,
}Expand description
State of modifiers (alt, ctrl, shift and command).
Fields§
§alt: boolEither of the alt keys are down (option ⌥ on Mac).
ctrl: boolEither of the control keys are down.
When checking for keyboard shortcuts, consider using Self::command instead.
shift: boolEither of the shift keys are down.
command: boolOn Windows and Linux, set this to the same value as ctrl.
On Mac, this should be set whenever one of the ⌘ Command keys are down.
Trait Implementations§
source§impl PartialEq for Modifiers
impl PartialEq for Modifiers
impl Copy for Modifiers
impl Eq for Modifiers
impl StructuralEq for Modifiers
impl StructuralPartialEq for Modifiers
Auto Trait Implementations§
impl RefUnwindSafe for Modifiers
impl Send for Modifiers
impl Sync for Modifiers
impl Unpin for Modifiers
impl UnwindSafe for Modifiers
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