#[repr(u32)]pub enum KeyCode {
Show 154 variants
Key1 = 0,
Key2 = 1,
Key3 = 2,
Key4 = 3,
Key5 = 4,
Key6 = 5,
Key7 = 6,
Key8 = 7,
Key9 = 8,
Key0 = 9,
A = 10,
B = 11,
C = 12,
D = 13,
E = 14,
F = 15,
G = 16,
H = 17,
I = 18,
J = 19,
K = 20,
L = 21,
M = 22,
N = 23,
O = 24,
P = 25,
Q = 26,
R = 27,
S = 28,
T = 29,
U = 30,
V = 31,
W = 32,
X = 33,
Y = 34,
Z = 35,
Escape = 36,
F1 = 37,
F2 = 38,
F3 = 39,
F4 = 40,
F5 = 41,
F6 = 42,
F7 = 43,
F8 = 44,
F9 = 45,
F10 = 46,
F11 = 47,
F12 = 48,
F13 = 49,
F14 = 50,
F15 = 51,
Snapshot = 52,
Scroll = 53,
Pause = 54,
Insert = 55,
Home = 56,
Delete = 57,
End = 58,
PageDown = 59,
PageUp = 60,
Left = 61,
Up = 62,
Right = 63,
Down = 64,
Back = 65,
Return = 66,
Space = 67,
Compose = 68,
Caret = 69,
Numlock = 70,
Numpad0 = 71,
Numpad1 = 72,
Numpad2 = 73,
Numpad3 = 74,
Numpad4 = 75,
Numpad5 = 76,
Numpad6 = 77,
Numpad7 = 78,
Numpad8 = 79,
Numpad9 = 80,
AbntC1 = 81,
AbntC2 = 82,
Add = 83,
Apostrophe = 84,
Apps = 85,
At = 86,
Ax = 87,
Backslash = 88,
Calculator = 89,
Capital = 90,
Colon = 91,
Comma = 92,
Convert = 93,
Decimal = 94,
Divide = 95,
Equals = 96,
Grave = 97,
Kana = 98,
Kanji = 99,
LAlt = 100,
LBracket = 101,
LControl = 102,
LMenu = 103,
LShift = 104,
LWin = 105,
Mail = 106,
MediaSelect = 107,
MediaStop = 108,
Minus = 109,
Multiply = 110,
Mute = 111,
MyComputer = 112,
NavigateForward = 113,
NavigateBackward = 114,
NextTrack = 115,
NoConvert = 116,
NumpadComma = 117,
NumpadEnter = 118,
NumpadEquals = 119,
OEM102 = 120,
Period = 121,
PlayPause = 122,
Power = 123,
PrevTrack = 124,
RAlt = 125,
RBracket = 126,
RControl = 127,
RMenu = 128,
RShift = 129,
RWin = 130,
Semicolon = 131,
Slash = 132,
Sleep = 133,
Stop = 134,
Subtract = 135,
Sysrq = 136,
Tab = 137,
Underline = 138,
Unlabeled = 139,
VolumeDown = 140,
VolumeUp = 141,
Wake = 142,
WebBack = 143,
WebFavorites = 144,
WebForward = 145,
WebHome = 146,
WebRefresh = 147,
WebSearch = 148,
WebStop = 149,
Yen = 150,
Copy = 151,
Paste = 152,
Cut = 153,
}
Expand description
Symbolic name for a keyboard key.
Variants§
Key1 = 0
The ‘1’ key over the letters.
Key2 = 1
The ‘2’ key over the letters.
Key3 = 2
The ‘3’ key over the letters.
Key4 = 3
The ‘4’ key over the letters.
Key5 = 4
The ‘5’ key over the letters.
Key6 = 5
The ‘6’ key over the letters.
Key7 = 6
The ‘7’ key over the letters.
Key8 = 7
The ‘8’ key over the letters.
Key9 = 8
The ‘9’ key over the letters.
Key0 = 9
The ‘0’ key over the ‘O’ and ‘P’ keys.
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
G = 16
H = 17
I = 18
J = 19
K = 20
L = 21
M = 22
N = 23
O = 24
P = 25
Q = 26
R = 27
S = 28
T = 29
U = 30
V = 31
W = 32
X = 33
Y = 34
Z = 35
Escape = 36
The Escape key, next to F1.
F1 = 37
F2 = 38
F3 = 39
F4 = 40
F5 = 41
F6 = 42
F7 = 43
F8 = 44
F9 = 45
F10 = 46
F11 = 47
F12 = 48
F13 = 49
F14 = 50
F15 = 51
Snapshot = 52
Print Screen/SysRq.
Scroll = 53
Scroll Lock.
Pause = 54
Pause/Break key, next to Scroll lock.
Insert = 55
Insert
, next to Backspace.
Home = 56
Delete = 57
End = 58
PageDown = 59
PageUp = 60
Left = 61
Up = 62
Right = 63
Down = 64
Back = 65
The Backspace key, right over Enter.
Return = 66
The Enter key.
Space = 67
The space bar.
Compose = 68
The “Compose” key on Linux.
Caret = 69
Numlock = 70
Numpad0 = 71
Numpad1 = 72
Numpad2 = 73
Numpad3 = 74
Numpad4 = 75
Numpad5 = 76
Numpad6 = 77
Numpad7 = 78
Numpad8 = 79
Numpad9 = 80
AbntC1 = 81
AbntC2 = 82
Add = 83
Apostrophe = 84
Apps = 85
At = 86
Ax = 87
Backslash = 88
Calculator = 89
Capital = 90
Colon = 91
Comma = 92
Convert = 93
Decimal = 94
Divide = 95
Equals = 96
Grave = 97
Kana = 98
Kanji = 99
LAlt = 100
LBracket = 101
LControl = 102
LMenu = 103
LShift = 104
LWin = 105
Mail = 106
MediaSelect = 107
MediaStop = 108
Minus = 109
Multiply = 110
Mute = 111
MyComputer = 112
NextTrack = 115
NoConvert = 116
NumpadComma = 117
NumpadEnter = 118
NumpadEquals = 119
OEM102 = 120
Period = 121
PlayPause = 122
Power = 123
PrevTrack = 124
RAlt = 125
RBracket = 126
RControl = 127
RMenu = 128
RShift = 129
RWin = 130
Semicolon = 131
Slash = 132
Sleep = 133
Stop = 134
Subtract = 135
Sysrq = 136
Tab = 137
Underline = 138
Unlabeled = 139
VolumeDown = 140
VolumeUp = 141
Wake = 142
WebBack = 143
WebFavorites = 144
WebForward = 145
WebHome = 146
WebRefresh = 147
WebSearch = 148
WebStop = 149
Yen = 150
Copy = 151
Paste = 152
Cut = 153
Trait Implementations§
Source§impl Clone for VirtualKeyCode
impl Clone for VirtualKeyCode
Source§fn clone(&self) -> VirtualKeyCode
fn clone(&self) -> VirtualKeyCode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VirtualKeyCode
impl Debug for VirtualKeyCode
Source§impl Hash for VirtualKeyCode
impl Hash for VirtualKeyCode
Source§impl PartialEq for VirtualKeyCode
impl PartialEq for VirtualKeyCode
impl Copy for VirtualKeyCode
impl Eq for VirtualKeyCode
impl StructuralPartialEq for VirtualKeyCode
Auto Trait Implementations§
impl Freeze for VirtualKeyCode
impl RefUnwindSafe for VirtualKeyCode
impl Send for VirtualKeyCode
impl Sync for VirtualKeyCode
impl Unpin for VirtualKeyCode
impl UnwindSafe for VirtualKeyCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.