pub enum Key {
Show 108 variants
Key0 = 0,
Key1 = 1,
Key2 = 2,
Key3 = 3,
Key4 = 4,
Key5 = 5,
Key6 = 6,
Key7 = 7,
Key8 = 8,
Key9 = 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,
F1 = 36,
F2 = 37,
F3 = 38,
F4 = 39,
F5 = 40,
F6 = 41,
F7 = 42,
F8 = 43,
F9 = 44,
F10 = 45,
F11 = 46,
F12 = 47,
F13 = 48,
F14 = 49,
F15 = 50,
Down = 51,
Left = 52,
Right = 53,
Up = 54,
Apostrophe = 55,
Backquote = 56,
Backslash = 57,
Comma = 58,
Equal = 59,
LeftBracket = 60,
Minus = 61,
Period = 62,
RightBracket = 63,
Semicolon = 64,
Slash = 65,
Backspace = 66,
Delete = 67,
End = 68,
Enter = 69,
Escape = 70,
Home = 71,
Insert = 72,
Menu = 73,
PageDown = 74,
PageUp = 75,
Pause = 76,
Space = 77,
Tab = 78,
NumLock = 79,
CapsLock = 80,
ScrollLock = 81,
LeftShift = 82,
RightShift = 83,
LeftCtrl = 84,
RightCtrl = 85,
NumPad0 = 86,
NumPad1 = 87,
NumPad2 = 88,
NumPad3 = 89,
NumPad4 = 90,
NumPad5 = 91,
NumPad6 = 92,
NumPad7 = 93,
NumPad8 = 94,
NumPad9 = 95,
NumPadDot = 96,
NumPadSlash = 97,
NumPadAsterisk = 98,
NumPadMinus = 99,
NumPadPlus = 100,
NumPadEnter = 101,
LeftAlt = 102,
RightAlt = 103,
LeftSuper = 104,
RightSuper = 105,
Unknown = 106,
Count = 107,
}
Expand description
Key is used by the get key functions to check if some keys on the keyboard has been pressed
Variants§
Key0 = 0
Key1 = 1
Key2 = 2
Key3 = 3
Key4 = 4
Key5 = 5
Key6 = 6
Key7 = 7
Key8 = 8
Key9 = 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
F1 = 36
F2 = 37
F3 = 38
F4 = 39
F5 = 40
F6 = 41
F7 = 42
F8 = 43
F9 = 44
F10 = 45
F11 = 46
F12 = 47
F13 = 48
F14 = 49
F15 = 50
Down = 51
Left = 52
Right = 53
Up = 54
Apostrophe = 55
Backquote = 56
Backslash = 57
Comma = 58
Equal = 59
LeftBracket = 60
Minus = 61
Period = 62
RightBracket = 63
Semicolon = 64
Slash = 65
Backspace = 66
Delete = 67
End = 68
Enter = 69
Escape = 70
Home = 71
Insert = 72
Menu = 73
PageDown = 74
PageUp = 75
Pause = 76
Space = 77
Tab = 78
NumLock = 79
CapsLock = 80
ScrollLock = 81
LeftShift = 82
RightShift = 83
LeftCtrl = 84
RightCtrl = 85
NumPad0 = 86
NumPad1 = 87
NumPad2 = 88
NumPad3 = 89
NumPad4 = 90
NumPad5 = 91
NumPad6 = 92
NumPad7 = 93
NumPad8 = 94
NumPad9 = 95
NumPadDot = 96
NumPadSlash = 97
NumPadAsterisk = 98
NumPadMinus = 99
NumPadPlus = 100
NumPadEnter = 101
LeftAlt = 102
RightAlt = 103
LeftSuper = 104
RightSuper = 105
Unknown = 106
Used when an Unknown key has been pressed
Count = 107
Trait Implementations§
source§impl Ord for Key
impl Ord for Key
source§impl PartialOrd for Key
impl PartialOrd for Key
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Key
impl Eq 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 UnwindSafe for Key
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