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
impl 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.