#[repr(u8)]pub enum Key {
Show 113 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,
Esc = 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,
F16 = 52,
F17 = 53,
F18 = 54,
F19 = 55,
F20 = 56,
F21 = 57,
F22 = 58,
F23 = 59,
F24 = 60,
ScrollLock = 61,
Home = 62,
Delete = 63,
End = 64,
PageDown = 65,
PageUp = 66,
Left = 67,
Up = 68,
Right = 69,
Down = 70,
BackSpace = 71,
Enter = 72,
Space = 73,
Numlock = 74,
Numpad0 = 75,
Numpad1 = 76,
Numpad2 = 77,
Numpad3 = 78,
Numpad4 = 79,
Numpad5 = 80,
Numpad6 = 81,
Numpad7 = 82,
Numpad8 = 83,
Numpad9 = 84,
NumpadAdd = 85,
NumpadDivide = 86,
NumpadDecimial = 87,
NumpadComma = 88,
NumpadEnter = 89,
NumpadEquals = 90,
NumpadMultiply = 91,
NumpadSubtract = 92,
BackSlash = 93,
CapsLock = 94,
Comma = 95,
Equals = 96,
LeftAlt = 97,
LeftBracket = 98,
LeftControl = 99,
LeftShift = 100,
Minus = 101,
Period = 102,
Plus = 103,
RightAlt = 104,
RightBracket = 105,
RightControl = 106,
RightShift = 107,
SemiColon = 108,
Slash = 109,
Tab = 110,
BackQoute = 111,
Unrecognized = 112,
}Expand description
Representation of keyboard keys
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
Esc = 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
F16 = 52
F17 = 53
F18 = 54
F19 = 55
F20 = 56
F21 = 57
F22 = 58
F23 = 59
F24 = 60
ScrollLock = 61
Home = 62
Delete = 63
End = 64
PageDown = 65
PageUp = 66
Left = 67
Up = 68
Right = 69
Down = 70
BackSpace = 71
Enter = 72
Space = 73
Numlock = 74
Numpad0 = 75
Numpad1 = 76
Numpad2 = 77
Numpad3 = 78
Numpad4 = 79
Numpad5 = 80
Numpad6 = 81
Numpad7 = 82
Numpad8 = 83
Numpad9 = 84
NumpadAdd = 85
NumpadDivide = 86
NumpadDecimial = 87
NumpadComma = 88
NumpadEnter = 89
NumpadEquals = 90
NumpadMultiply = 91
NumpadSubtract = 92
BackSlash = 93
CapsLock = 94
Comma = 95
Equals = 96
LeftAlt = 97
LeftBracket = 98
LeftControl = 99
LeftShift = 100
Minus = 101
Period = 102
Plus = 103
RightAlt = 104
RightBracket = 105
RightControl = 106
RightShift = 107
SemiColon = 108
Slash = 109
Tab = 110
BackQoute = 111
Unrecognized = 112
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more