Enum mycelium_kernel::drivers::ps2_keyboard::KeyCode
#[non_exhaustive]pub enum KeyCode {
Show 120 variants
AltLeft = 0,
AltRight = 1,
ArrowDown = 2,
ArrowLeft = 3,
ArrowRight = 4,
ArrowUp = 5,
BackSlash = 6,
Backspace = 7,
BackTick = 8,
BracketSquareLeft = 9,
BracketSquareRight = 10,
Break = 11,
CapsLock = 12,
Comma = 13,
ControlLeft = 14,
ControlRight = 15,
Delete = 16,
End = 17,
Enter = 18,
Escape = 19,
Equals = 20,
F1 = 21,
F2 = 22,
F3 = 23,
F4 = 24,
F5 = 26,
F6 = 27,
F7 = 28,
F8 = 29,
F9 = 30,
F10 = 31,
F11 = 32,
F12 = 33,
Fullstop = 34,
Home = 36,
Insert = 37,
Key1 = 38,
Key2 = 39,
Key3 = 40,
Key4 = 41,
Key5 = 42,
Key6 = 43,
Key7 = 44,
Key8 = 46,
Key9 = 47,
Key0 = 48,
Menus = 49,
Minus = 50,
Numpad0 = 51,
Numpad1 = 52,
Numpad2 = 53,
Numpad3 = 54,
Numpad4 = 56,
Numpad5 = 57,
Numpad6 = 58,
Numpad7 = 59,
Numpad8 = 60,
Numpad9 = 61,
NumpadEnter = 62,
NumpadLock = 63,
NumpadSlash = 64,
NumpadStar = 66,
NumpadMinus = 67,
NumpadPeriod = 68,
NumpadPlus = 69,
PageDown = 70,
PageUp = 71,
PauseBreak = 72,
PrintScreen = 73,
ScrollLock = 74,
SemiColon = 76,
ShiftLeft = 77,
ShiftRight = 78,
Slash = 79,
Spacebar = 80,
SysReq = 81,
Tab = 82,
Quote = 83,
WindowsLeft = 84,
WindowsRight = 86,
A = 87,
B = 88,
C = 89,
D = 90,
E = 91,
F = 92,
G = 93,
H = 94,
I = 96,
J = 97,
K = 98,
L = 99,
M = 100,
N = 101,
O = 102,
P = 103,
Q = 104,
R = 106,
S = 107,
T = 108,
U = 109,
V = 110,
W = 111,
X = 112,
Y = 113,
Z = 114,
HashTilde = 115,
PrevTrack = 116,
NextTrack = 117,
Mute = 118,
Calculator = 119,
Play = 120,
Stop = 121,
VolumeDown = 122,
VolumeUp = 123,
WWWHome = 124,
PowerOnTestOk = 125,
Oem102 = 126,
PrintScreen2 = 127,
TooManyKeys = 128,
}
Expand description
Keycodes that can be generated by a keyboard.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AltLeft = 0
AltRight = 1
ArrowDown = 2
ArrowLeft = 3
ArrowRight = 4
ArrowUp = 5
BackSlash = 6
Backspace = 7
BackTick = 8
BracketSquareLeft = 9
BracketSquareRight = 10
Break = 11
CapsLock = 12
Comma = 13
ControlLeft = 14
ControlRight = 15
Delete = 16
End = 17
Enter = 18
Escape = 19
Equals = 20
F1 = 21
F2 = 22
F3 = 23
F4 = 24
F5 = 26
F6 = 27
F7 = 28
F8 = 29
F9 = 30
F10 = 31
F11 = 32
F12 = 33
Fullstop = 34
Home = 36
Insert = 37
Key1 = 38
Key2 = 39
Key3 = 40
Key4 = 41
Key5 = 42
Key6 = 43
Key7 = 44
Key8 = 46
Key9 = 47
Key0 = 48
Menus = 49
Minus = 50
Numpad0 = 51
Numpad1 = 52
Numpad2 = 53
Numpad3 = 54
Numpad4 = 56
Numpad5 = 57
Numpad6 = 58
Numpad7 = 59
Numpad8 = 60
Numpad9 = 61
NumpadEnter = 62
NumpadLock = 63
NumpadSlash = 64
NumpadStar = 66
NumpadMinus = 67
NumpadPeriod = 68
NumpadPlus = 69
PageDown = 70
PageUp = 71
PauseBreak = 72
PrintScreen = 73
ScrollLock = 74
SemiColon = 76
ShiftLeft = 77
ShiftRight = 78
Slash = 79
Spacebar = 80
SysReq = 81
Tab = 82
Quote = 83
WindowsLeft = 84
WindowsRight = 86
A = 87
B = 88
C = 89
D = 90
E = 91
F = 92
G = 93
H = 94
I = 96
J = 97
K = 98
L = 99
M = 100
N = 101
O = 102
P = 103
Q = 104
R = 106
S = 107
T = 108
U = 109
V = 110
W = 111
X = 112
Y = 113
Z = 114
HashTilde = 115
The key to the left of the 102/105-key “Tall Return” Key - not on 101/104-key keyboards
PrevTrack = 116
NextTrack = 117
Mute = 118
Calculator = 119
Play = 120
Stop = 121
VolumeDown = 122
VolumeUp = 123
WWWHome = 124
PowerOnTestOk = 125
Sent when the keyboard boots
Oem102 = 126
Used for <>
on DE layouts
PrintScreen2 = 127
PrintScreen comes in two parts - this is the second
TooManyKeys = 128
Sent by the keyboard when too many keys are pressed
Trait Implementations§
§impl Ord for KeyCode
impl Ord for KeyCode
§impl PartialOrd for KeyCode
impl PartialOrd for KeyCode
§fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>
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 KeyCode
impl Eq for KeyCode
impl StructuralEq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations§
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.