#[repr(i32)]pub enum KeyCode {
Show 136 variants
LeftAlt = 0,
LeftCtrl = 1,
LeftShift = 2,
Quote = 3,
Hash = 4,
CapsLock = 5,
Colon = 6,
Minus = 7,
Equals = 8,
Escape = 9,
OpenBracket = 10,
NumLock = 11,
Period = 12,
CloseBracket = 13,
Semicolon = 14,
Slash = 15,
Print = 16,
Tilde = 17,
Backspace = 18,
Delete = 19,
Enter = 20,
Space = 21,
Tab = 22,
End = 23,
Home = 24,
Insert = 25,
Next = 26,
Prior = 27,
ArrowDown = 28,
ArrowLeft = 29,
ArrowRight = 30,
ArrowUp = 31,
F1 = 32,
F2 = 33,
F3 = 34,
F4 = 35,
F5 = 36,
F6 = 37,
F7 = 38,
F8 = 39,
F9 = 40,
F10 = 41,
F11 = 42,
F12 = 43,
Number0 = 48,
Number1 = 49,
Number2 = 50,
Number3 = 51,
Number4 = 52,
Number5 = 53,
Number6 = 54,
Number7 = 55,
Number8 = 56,
Number9 = 57,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
PlusNum = 91,
DecimalNum = 92,
DivideNum = 93,
MultiplyNum = 94,
Number0Num = 95,
Number1Num = 96,
Number2Num = 97,
Number3Num = 98,
Number4Num = 99,
Number5Num = 100,
Number6Num = 101,
Number7Num = 102,
Number8Num = 103,
Number9Num = 104,
EnterNum = 105,
MinusNum = 106,
ImeKey1 = 107,
ImeKey2 = 108,
RightAlt = 109,
RightCtrl = 110,
Backslash = 111,
F13 = 112,
F14 = 113,
F15 = 114,
F16 = 115,
F17 = 116,
F18 = 117,
F19 = 118,
F20 = 119,
F21 = 120,
F22 = 121,
F23 = 122,
F24 = 123,
F25 = 124,
F26 = 125,
F27 = 126,
F28 = 127,
F29 = 128,
F30 = 129,
F31 = 130,
F32 = 131,
F33 = 132,
F34 = 133,
F35 = 134,
RightShift = 135,
Eject = 136,
EqualNum = 137,
ClearNum = 138,
LeftCmd = 139,
Function = 140,
RightCmd = 141,
Scroll = 200,
Pause = 201,
LeftWin = 202,
RightWin = 203,
Menu = 204,
}
Expand description
Custom key codes.
Some of them are not usable like F13
to F35
or Print
.
Names are based upon US keyboard layout. Site to translate it to other languages: http://kbdlayout.info
Variants§
LeftAlt = 0
LeftCtrl = 1
LeftShift = 2
Quote = 3
Hash = 4
CapsLock = 5
Colon = 6
Minus = 7
Equals = 8
Escape = 9
OpenBracket = 10
NumLock = 11
Period = 12
CloseBracket = 13
Semicolon = 14
Slash = 15
Print = 16
Tilde = 17
Backspace = 18
Delete = 19
Enter = 20
Space = 21
Tab = 22
End = 23
Home = 24
Insert = 25
Next = 26
Prior = 27
ArrowDown = 28
ArrowLeft = 29
ArrowRight = 30
ArrowUp = 31
F1 = 32
F2 = 33
F3 = 34
F4 = 35
F5 = 36
F6 = 37
F7 = 38
F8 = 39
F9 = 40
F10 = 41
F11 = 42
F12 = 43
Number0 = 48
Number1 = 49
Number2 = 50
Number3 = 51
Number4 = 52
Number5 = 53
Number6 = 54
Number7 = 55
Number8 = 56
Number9 = 57
A = 65
B = 66
C = 67
D = 68
E = 69
F = 70
G = 71
H = 72
I = 73
J = 74
K = 75
L = 76
M = 77
N = 78
O = 79
P = 80
Q = 81
R = 82
S = 83
T = 84
U = 85
V = 86
W = 87
X = 88
Y = 89
Z = 90
PlusNum = 91
DecimalNum = 92
DivideNum = 93
MultiplyNum = 94
Number0Num = 95
Number1Num = 96
Number2Num = 97
Number3Num = 98
Number4Num = 99
Number5Num = 100
Number6Num = 101
Number7Num = 102
Number8Num = 103
Number9Num = 104
EnterNum = 105
MinusNum = 106
ImeKey1 = 107
ImeKey2 = 108
RightAlt = 109
RightCtrl = 110
Backslash = 111
F13 = 112
F14 = 113
F15 = 114
F16 = 115
F17 = 116
F18 = 117
F19 = 118
F20 = 119
F21 = 120
F22 = 121
F23 = 122
F24 = 123
F25 = 124
F26 = 125
F27 = 126
F28 = 127
F29 = 128
F30 = 129
F31 = 130
F32 = 131
F33 = 132
F34 = 133
F35 = 134
RightShift = 135
Eject = 136
EqualNum = 137
ClearNum = 138
LeftCmd = 139
Function = 140
RightCmd = 141
Scroll = 200
Pause = 201
LeftWin = 202
RightWin = 203
Menu = 204
Trait Implementations§
source§impl<'de> Deserialize<'de> for KeyCode
impl<'de> Deserialize<'de> for KeyCode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoEnumIterator for KeyCode
impl IntoEnumIterator for KeyCode
type Iterator = KeyCodeIter
fn iter() -> KeyCodeIter ⓘ
source§impl Ord for KeyCode
impl Ord for KeyCode
source§impl PartialOrd for KeyCode
impl PartialOrd for KeyCode
impl Copy for KeyCode
impl Eq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations§
impl Freeze for KeyCode
impl RefUnwindSafe for KeyCode
impl Send for KeyCode
impl Sync for KeyCode
impl Unpin for KeyCode
impl UnwindSafe for KeyCode
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)