Struct egui::Modifiers [−][src]
pub struct Modifiers {
pub alt: bool,
pub ctrl: bool,
pub shift: bool,
pub mac_cmd: bool,
pub command: bool,
}
Expand description
State of the modifier keys. These must be fed to egui.
Fields
alt: bool
Either of the alt keys are down (option ⌥ on Mac).
ctrl: bool
Either of the control keys are down.
When checking for keyboard shortcuts, consider using Self::command
instead.
shift: bool
Either of the shift keys are down.
mac_cmd: bool
The Mac ⌘ Command key. Should always be set to false
on other platforms.
command: bool
On 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 (same as mac_cmd
).
This is so that egui can, for instance, select all text by checking for command + A
and it will work on both Mac and Windows.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Modifiers
impl UnwindSafe for Modifiers
Blanket Implementations
Mutably borrows from an owned value. Read more