Enum KeyModifier
#[repr(i32)]pub enum KeyModifier {
Show 14 variants
Undefined = 0,
CapsLock = 1,
LeftShift = 2,
RightShift = 4,
LeftControl = 8,
RightControl = 16,
LeftAlt = 32,
RightAlt = 64,
LeftSuper = 128,
RightSuper = 256,
Shift = 512,
Control = 1_024,
Alt = 2_048,
Super = 4_096,
}Expand description
Key modifier flags. You can set more than one modifier at a time for a KeyEvent.
Variants§
Undefined = 0
No key modifier is set, or the modifier is undefined.
CapsLock = 1
Specifies the Caps lock key modifier.
LeftShift = 2
Specifies the left Shift key modifier.
RightShift = 4
Specifies the right Shift key modifier.
LeftControl = 8
Specifies the left Control key modifier.
RightControl = 16
Specifies the right Control key modifier.
LeftAlt = 32
Specifies the left Alt key modifier.
RightAlt = 64
Specifies the right Alt key modifier.
LeftSuper = 128
Specifies the left Super key modifier. See: LogicalKey::Super
RightSuper = 256
Specifies the right Super key modifier. See: LogicalKey::Super
Shift = 512
Specifies the Shift modifier, used when the operating system does not separate the left and right Shift modifiers.
Control = 1_024
Specifies the Control modifier, used when the operating system does not separate the left and right Control modifiers.
Alt = 2_048
Specifies the Alt modifier, used when the operating system does not separate the left and right Alt modifiers.
Super = 4_096
Specifies the Super modifier, used when the operating system does not separate the left and right Super modifiers. See: LogicalKey::Super
Implementations§
§impl KeyModifier
impl KeyModifier
pub fn as_str(self) -> &'static str
pub fn convert(num: i32) -> KeyModifier
Trait Implementations§
§impl Clone for KeyModifier
impl Clone for KeyModifier
§fn clone(&self) -> KeyModifier
fn clone(&self) -> KeyModifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for KeyModifier
impl Debug for KeyModifier
§impl Display for KeyModifier
impl Display for KeyModifier
§impl PartialEq for KeyModifier
impl PartialEq for KeyModifier
§impl VariantConstraint for KeyModifier
impl VariantConstraint for KeyModifier
§type DataArg<'a> = KeyModifier
type DataArg<'a> = KeyModifier
Variant.
Generally, this type matches Self, except for KanziString, Resource, and ResourceId. Read more