pub struct Modifiers {
pub shift: bool,
pub ctrl: bool,
pub alt: bool,
pub meta: bool,
}Expand description
Keyboard modifier keys held during an input sample.
Lives here (rather than up in cranpose-ui, where the keyboard KeyEvent
type lives) because PointerEvent needs it too and cranpose-foundation
sits below cranpose-ui in the dependency graph — this is the one crate
both a key event and a pointer event can share it from. cranpose-ui
re-exports this type rather than defining its own, so there is exactly one
Modifiers in the framework.
Fields§
§shift: boolShift key is pressed.
ctrl: boolControl key is pressed (Cmd on macOS).
alt: boolAlt key is pressed (Option on macOS).
meta: boolMeta/Super key is pressed (Windows key, Cmd on macOS).
Implementations§
Trait Implementations§
impl Copy for Modifiers
impl Eq for Modifiers
impl StructuralPartialEq for Modifiers
Auto Trait Implementations§
impl Freeze for Modifiers
impl RefUnwindSafe for Modifiers
impl Send for Modifiers
impl Sync for Modifiers
impl Unpin for Modifiers
impl UnsafeUnpin 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