Enum ModifierKeyCode
pub enum ModifierKeyCode {
Show 14 variants
LeftShift,
LeftControl,
LeftAlt,
LeftSuper,
LeftHyper,
LeftMeta,
RightShift,
RightControl,
RightAlt,
RightSuper,
RightHyper,
RightMeta,
IsoLevel3Shift,
IsoLevel5Shift,
}term only.Expand description
Represents a modifier key (as part of KeyCode::Modifier).
Variants§
LeftShift
Left Shift key.
LeftControl
Left Control key. (Control on macOS, Ctrl on other platforms)
LeftAlt
Left Alt key. (Option on macOS, Alt on other platforms)
LeftSuper
Left Super key. (Command on macOS, Windows on Windows, Super on other platforms)
LeftHyper
Left Hyper key.
LeftMeta
Left Meta key.
RightShift
Right Shift key.
RightControl
Right Control key. (Control on macOS, Ctrl on other platforms)
RightAlt
Right Alt key. (Option on macOS, Alt on other platforms)
RightSuper
Right Super key. (Command on macOS, Windows on Windows, Super on other platforms)
RightHyper
Right Hyper key.
RightMeta
Right Meta key.
IsoLevel3Shift
Iso Level3 Shift key.
IsoLevel5Shift
Iso Level5 Shift key.
Trait Implementations§
§impl Clone for ModifierKeyCode
impl Clone for ModifierKeyCode
§fn clone(&self) -> ModifierKeyCode
fn clone(&self) -> ModifierKeyCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ModifierKeyCode
§impl Debug for ModifierKeyCode
impl Debug for ModifierKeyCode
§impl Display for ModifierKeyCode
impl Display for ModifierKeyCode
§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the modifier key using the given formatter.
§Platform-specific Notes
On macOS, the control, alt, and super keys are displayed as “Control”, “Option”, and “Command” respectively. See https://support.apple.com/guide/applestyleguide/welcome/1.0/web.
On Windows, the super key is displayed as “Windows” and the control key is displayed as “Ctrl”. See https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/keys-keyboard-shortcuts.
On other platforms, the super key is referred to as “Super”.
impl Eq for ModifierKeyCode
§impl Hash for ModifierKeyCode
impl Hash for ModifierKeyCode
§impl PartialEq for ModifierKeyCode
impl PartialEq for ModifierKeyCode
§impl PartialOrd for ModifierKeyCode
impl PartialOrd for ModifierKeyCode
impl StructuralPartialEq for ModifierKeyCode
Auto Trait Implementations§
impl Freeze for ModifierKeyCode
impl RefUnwindSafe for ModifierKeyCode
impl Send for ModifierKeyCode
impl Sync for ModifierKeyCode
impl Unpin for ModifierKeyCode
impl UnsafeUnpin for ModifierKeyCode
impl UnwindSafe for ModifierKeyCode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more