#[repr(i32)]pub enum Key {
Show 194 variants
None = 0,
Cancel = 1,
Back = 2,
Tab = 3,
LineFeed = 4,
Clear = 5,
Return = 6,
Pause = 7,
CapsLock = 8,
HangulMode = 9,
JunjaMode = 10,
FinalMode = 11,
KanjiMode = 12,
Escape = 13,
ImeConvert = 14,
ImeNonConvert = 15,
ImeAccept = 16,
ImeModeChange = 17,
Space = 18,
PageUp = 19,
PageDown = 20,
End = 21,
Home = 22,
Left = 23,
Up = 24,
Right = 25,
Down = 26,
Select = 27,
Print = 28,
Execute = 29,
Snapshot = 30,
Insert = 31,
Delete = 32,
Help = 33,
D0 = 34,
D1 = 35,
D2 = 36,
D3 = 37,
D4 = 38,
D5 = 39,
D6 = 40,
D7 = 41,
D8 = 42,
D9 = 43,
A = 44,
B = 45,
C = 46,
D = 47,
E = 48,
F = 49,
G = 50,
H = 51,
I = 52,
J = 53,
K = 54,
L = 55,
M = 56,
N = 57,
O = 58,
P = 59,
Q = 60,
R = 61,
S = 62,
T = 63,
U = 64,
V = 65,
W = 66,
X = 67,
Y = 68,
Z = 69,
LWin = 70,
RWin = 71,
Apps = 72,
Sleep = 73,
NumPad0 = 74,
NumPad1 = 75,
NumPad2 = 76,
NumPad3 = 77,
NumPad4 = 78,
NumPad5 = 79,
NumPad6 = 80,
NumPad7 = 81,
NumPad8 = 82,
NumPad9 = 83,
Multiply = 84,
Add = 85,
Separator = 86,
Subtract = 87,
Decimal = 88,
Divide = 89,
F1 = 90,
F2 = 91,
F3 = 92,
F4 = 93,
F5 = 94,
F6 = 95,
F7 = 96,
F8 = 97,
F9 = 98,
F10 = 99,
F11 = 100,
F12 = 101,
F13 = 102,
F14 = 103,
F15 = 104,
F16 = 105,
F17 = 106,
F18 = 107,
F19 = 108,
F20 = 109,
F21 = 110,
F22 = 111,
F23 = 112,
F24 = 113,
NumLock = 114,
Scroll = 115,
LeftShift = 116,
RightShift = 117,
LeftCtrl = 118,
RightCtrl = 119,
LeftAlt = 120,
RightAlt = 121,
BrowserBack = 122,
BrowserForward = 123,
BrowserRefresh = 124,
BrowserStop = 125,
BrowserSearch = 126,
BrowserFavorites = 127,
BrowserHome = 128,
VolumeMute = 129,
VolumeDown = 130,
VolumeUp = 131,
MediaNextTrack = 132,
MediaPreviousTrack = 133,
MediaStop = 134,
MediaPlayPause = 135,
LaunchMail = 136,
SelectMedia = 137,
LaunchApplication1 = 138,
LaunchApplication2 = 139,
OemSemicolon = 140,
OemPlus = 141,
OemComma = 142,
OemMinus = 143,
OemPeriod = 144,
OemQuestion = 145,
OemTilde = 146,
AbntC1 = 147,
AbntC2 = 148,
OemOpenBrackets = 149,
OemPipe = 150,
OemCloseBrackets = 151,
OemQuotes = 152,
Oem8 = 153,
OemBackslash = 154,
ImeProcessed = 155,
System = 156,
OemAttn = 157,
OemFinish = 158,
DbeHiragana = 159,
DbeSbcsChar = 160,
DbeDbcsChar = 161,
OemBackTab = 162,
DbeNoRoman = 163,
CrSel = 164,
ExSel = 165,
EraseEof = 166,
Play = 167,
DbeNoCodeInput = 168,
NoName = 169,
DbeEnterDialogConversionMode = 170,
OemClear = 171,
DeadCharProcessed = 172,
FnLeftArrow = 10_001,
FnRightArrow = 10_002,
FnUpArrow = 10_003,
FnDownArrow = 10_004,
MediaHome = 100_000,
MediaChannelList = 100_001,
MediaChannelRaise = 100_002,
MediaChannelLower = 100_003,
MediaRecord = 100_005,
MediaRed = 100_010,
MediaGreen = 100_011,
MediaYellow = 100_012,
MediaBlue = 100_013,
MediaMenu = 100_020,
MediaMore = 100_021,
MediaOption = 100_022,
MediaInfo = 100_023,
MediaSearch = 100_024,
MediaSubtitle = 100_025,
MediaTvGuide = 100_026,
MediaPreviousChannel = 100_027,
}Expand description
Defines the keys available on a keyboard.
Variants§
None = 0
No key pressed.
Cancel = 1
The Cancel key.
Back = 2
The Back key.
Tab = 3
The Tab key.
LineFeed = 4
The Linefeed key.
Clear = 5
The Clear key.
Return = 6
The Return key.
Pause = 7
The Pause key.
CapsLock = 8
The Caps Lock key.
HangulMode = 9
The IME Hangul mode key.
JunjaMode = 10
The IME Junja mode key.
FinalMode = 11
The IME Final mode key.
KanjiMode = 12
The IME Kanji mode key.
Escape = 13
The Escape key.
ImeConvert = 14
The IME Convert key.
ImeNonConvert = 15
The IME NonConvert key.
ImeAccept = 16
The IME Accept key.
ImeModeChange = 17
The IME Mode change key.
Space = 18
The space bar.
PageUp = 19
The Page Up key.
PageDown = 20
The Page Down key.
End = 21
The End key.
Home = 22
The Home key.
Left = 23
The Left arrow key.
Up = 24
The Up arrow key.
Right = 25
The Right arrow key.
Down = 26
The Down arrow key.
Select = 27
The Select key.
Print = 28
The Print key.
Execute = 29
The Execute key.
Snapshot = 30
The Print Screen key.
Insert = 31
The Insert key.
Delete = 32
The Delete key.
Help = 33
The Help key.
D0 = 34
The 0 key.
D1 = 35
The 1 key.
D2 = 36
The 2 key.
D3 = 37
The 3 key.
D4 = 38
The 4 key.
D5 = 39
The 5 key.
D6 = 40
The 6 key.
D7 = 41
The 7 key.
D8 = 42
The 8 key.
D9 = 43
The 9 key.
A = 44
The A key.
B = 45
The B key.
C = 46
The C key.
D = 47
The D key.
E = 48
The E key.
F = 49
The F key.
G = 50
The G key.
H = 51
The H key.
I = 52
The I key.
J = 53
The J key.
K = 54
The K key.
L = 55
The L key.
M = 56
The M key.
N = 57
The N key.
O = 58
The O key.
P = 59
The P key.
Q = 60
The Q key.
R = 61
The R key.
S = 62
The S key.
T = 63
The T key.
U = 64
The U key.
V = 65
The V key.
W = 66
The W key.
X = 67
The X key.
Y = 68
The Y key.
Z = 69
The Z key.
LWin = 70
The left Windows key.
RWin = 71
The right Windows key.
Apps = 72
The Application key.
Sleep = 73
The Sleep key.
NumPad0 = 74
The 0 key on the numeric keypad.
NumPad1 = 75
The 1 key on the numeric keypad.
NumPad2 = 76
The 2 key on the numeric keypad.
NumPad3 = 77
The 3 key on the numeric keypad.
NumPad4 = 78
The 4 key on the numeric keypad.
NumPad5 = 79
The 5 key on the numeric keypad.
NumPad6 = 80
The 6 key on the numeric keypad.
NumPad7 = 81
The 7 key on the numeric keypad.
NumPad8 = 82
The 8 key on the numeric keypad.
NumPad9 = 83
The 9 key on the numeric keypad.
Multiply = 84
The Multiply key.
Add = 85
The Add key.
Separator = 86
The Separator key.
Subtract = 87
The Subtract key.
Decimal = 88
The Decimal key.
Divide = 89
The Divide key.
F1 = 90
The F1 key.
F2 = 91
The F2 key.
F3 = 92
The F3 key.
F4 = 93
The F4 key.
F5 = 94
The F5 key.
F6 = 95
The F6 key.
F7 = 96
The F7 key.
F8 = 97
The F8 key.
F9 = 98
The F9 key.
F10 = 99
The F10 key.
F11 = 100
The F11 key.
F12 = 101
The F12 key.
F13 = 102
The F13 key.
F14 = 103
The F14 key.
F15 = 104
The F15 key.
F16 = 105
The F16 key.
F17 = 106
The F17 key.
F18 = 107
The F18 key.
F19 = 108
The F19 key.
F20 = 109
The F20 key.
F21 = 110
The F21 key.
F22 = 111
The F22 key.
F23 = 112
The F23 key.
F24 = 113
The F24 key.
NumLock = 114
The Numlock key.
Scroll = 115
The Scroll key.
LeftShift = 116
The left Shift key.
RightShift = 117
The right Shift key.
LeftCtrl = 118
The left Ctrl key.
RightCtrl = 119
The right Ctrl key.
LeftAlt = 120
The left Alt key.
RightAlt = 121
The right Alt key.
BrowserBack = 122
The browser Back key.
BrowserForward = 123
The browser Forward key.
BrowserRefresh = 124
The browser Refresh key.
BrowserStop = 125
The browser Stop key.
BrowserSearch = 126
The browser Search key.
BrowserFavorites = 127
The browser Favorites key.
BrowserHome = 128
The browser Home key.
VolumeMute = 129
The Volume Mute key.
VolumeDown = 130
The Volume Down key.
VolumeUp = 131
The Volume Up key.
MediaNextTrack = 132
The media Next Track key.
MediaPreviousTrack = 133
The media Previous Track key.
MediaStop = 134
The media Stop key.
MediaPlayPause = 135
The media Play/Pause key.
LaunchMail = 136
The Launch Mail key.
SelectMedia = 137
The Select Media key.
LaunchApplication1 = 138
The Launch Application 1 key.
LaunchApplication2 = 139
The Launch Application 2 key.
OemSemicolon = 140
The OEM Semicolon key.
OemPlus = 141
The OEM Plus key.
OemComma = 142
The OEM Comma key.
OemMinus = 143
The OEM Minus key.
OemPeriod = 144
The OEM Period key.
OemQuestion = 145
The OEM Question Mark key.
OemTilde = 146
The OEM Tilde key.
AbntC1 = 147
The ABNT_C1 (Brazilian) key.
AbntC2 = 148
The ABNT_C2 (Brazilian) key.
OemOpenBrackets = 149
The OEM Open Brackets key.
OemPipe = 150
The OEM Pipe key.
OemCloseBrackets = 151
The OEM Close Brackets key.
OemQuotes = 152
The OEM Quotes key.
Oem8 = 153
The OEM 8 key.
OemBackslash = 154
The OEM Backslash key.
ImeProcessed = 155
A special key masking the real key being processed by an IME.
System = 156
A special key masking the real key being processed as a system key.
OemAttn = 157
The OEM ATTN key.
OemFinish = 158
The OEM Finish key.
DbeHiragana = 159
The DBE_HIRAGANA key.
DbeSbcsChar = 160
The DBE_SBCSCHAR key.
DbeDbcsChar = 161
The DBE_DBCSCHAR key.
OemBackTab = 162
The OEM BackTab key.
DbeNoRoman = 163
The DBE_NOROMAN key.
CrSel = 164
The CRSEL key.
ExSel = 165
The EXSEL key.
EraseEof = 166
The ERASE EOF Key.
Play = 167
The Play key.
DbeNoCodeInput = 168
The DBE_NOCODEINPUT key.
NoName = 169
Reserved for future use.
DbeEnterDialogConversionMode = 170
The DBE_ENTERDLGCONVERSIONMODE key.
OemClear = 171
The OEM Clear key.
DeadCharProcessed = 172
The key is used with another key to create a single combined character.
FnLeftArrow = 10_001
OSX Platform-specific Fn+Left key
FnRightArrow = 10_002
OSX Platform-specific Fn+Right key
FnUpArrow = 10_003
OSX Platform-specific Fn+Up key
FnDownArrow = 10_004
OSX Platform-specific Fn+Down key
MediaHome = 100_000
Remove control home button
MediaChannelList = 100_001
TV Channel up
MediaChannelRaise = 100_002
TV Channel up
MediaChannelLower = 100_003
TV Channel down
MediaRecord = 100_005
TV Channel down
MediaRed = 100_010
Remote control Red button
MediaGreen = 100_011
Remote control Green button
MediaYellow = 100_012
Remote control Yellow button
MediaBlue = 100_013
Remote control Blue button
MediaMenu = 100_020
Remote control Menu button
MediaMore = 100_021
Remote control dots button
MediaOption = 100_022
Remote control option button
MediaInfo = 100_023
Remote control channel info button
MediaSearch = 100_024
Remote control search button
MediaSubtitle = 100_025
Remote control subtitle/caption button
MediaTvGuide = 100_026
Remote control Tv guide detail button
MediaPreviousChannel = 100_027
Remote control Previous Channel
Implementations§
Source§impl Key
impl Key
Sourcepub const PrintScreen: Key = Key::Snapshot
pub const PrintScreen: Key = Key::Snapshot
The Print Screen key.
Sourcepub const DbeAlphanumeric: Key = Key::OemAttn
pub const DbeAlphanumeric: Key = Key::OemAttn
The DBE_ALPHANUMERIC key.
Sourcepub const DbeKatakana: Key = Key::OemFinish
pub const DbeKatakana: Key = Key::OemFinish
The DBE_KATAKANA key.
Sourcepub const DbeEnterWordRegisterMode: Key = Key::CrSel
pub const DbeEnterWordRegisterMode: Key = Key::CrSel
The DBE_ENTERWORDREGISTERMODE key.
Sourcepub const DbeEnterImeConfigureMode: Key = Key::ExSel
pub const DbeEnterImeConfigureMode: Key = Key::ExSel
The DBE_ENTERIMECONFIGMODE key.
Sourcepub const DbeFlushString: Key = Key::EraseEof
pub const DbeFlushString: Key = Key::EraseEof
The DBE_FLUSHSTRING key.
Sourcepub const DbeCodeInput: Key = Key::Play
pub const DbeCodeInput: Key = Key::Play
The DBE_CODEINPUT key.
Sourcepub const DbeDetermineString: Key = Key::NoName
pub const DbeDetermineString: Key = Key::NoName
The DBE_DETERMINESTRING key.
Sourcepub fn from_value(value: i32) -> Option<Key>
pub fn from_value(value: i32) -> Option<Key>
The member with the given numeric value, if one is defined.
Trait Implementations§
impl Copy for Key
impl Eq for Key
Source§impl MarkupTyped for Key
impl MarkupTyped for Key
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Source§impl Ord for Key
impl Ord for Key
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Key
impl PartialOrd for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more