#[repr(u32)]pub enum QwertyScanCode {
Show 107 variants
Escape = 1,
Key1 = 2,
Key2 = 3,
Key3 = 4,
Key4 = 5,
Key5 = 6,
Key6 = 7,
Key7 = 8,
Key8 = 9,
Key9 = 10,
Key0 = 11,
Minus = 12,
Equals = 13,
Backspace = 14,
Tab = 15,
Q = 16,
W = 17,
E = 18,
R = 19,
T = 20,
Y = 21,
U = 22,
I = 23,
O = 24,
P = 25,
BracketLeft = 26,
BracketRight = 27,
Enter = 28,
ControlLeft = 29,
A = 30,
S = 31,
D = 32,
F = 33,
G = 34,
H = 35,
J = 36,
K = 37,
L = 38,
SemiColon = 39,
Apostrophe = 40,
Backtick = 41,
ShiftLeft = 42,
Backslash = 43,
Z = 44,
X = 45,
C = 46,
V = 47,
B = 48,
N = 49,
M = 50,
Comma = 51,
Period = 52,
Slash = 53,
ShiftRight = 54,
NumpadMultiply = 55,
AltLeft = 56,
Space = 57,
CapsLock = 58,
F1 = 59,
F2 = 60,
F3 = 61,
F4 = 62,
F5 = 63,
F6 = 64,
F7 = 65,
F8 = 66,
F9 = 67,
F10 = 68,
Numlock = 69,
Scroll = 70,
Numpad7 = 71,
Numpad8 = 72,
Numpad9 = 73,
NumpadSubtract = 74,
Numpad4 = 75,
Numpad5 = 76,
Numpad6 = 77,
NumpadAdd = 78,
Numpad1 = 79,
Numpad2 = 80,
Numpad3 = 81,
Numpad0 = 82,
NumpadDecimal = 83,
F11 = 87,
F12 = 88,
NumpadEnter = 96,
ControlRight = 97,
NumpadDivide = 98,
AltSysrq = 99,
AltRight = 100,
Home = 102,
Up = 103,
PageUp = 104,
Left = 105,
Right = 106,
End = 107,
Down = 108,
PageDown = 109,
Insert = 110,
Delete = 111,
Power = 116,
Pause = 119,
SuperLeft = 125,
SuperRight = 126,
Menu = 139,
Sleep = 142,
Wake = 143,
}
Expand description
The key locations as defined by the keys on the QWERTY keyboard layout.
The u32
representation of this enum are scan codes of the corresponding keys on X-like Linux systems.
See https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h.
Variants§
Escape = 1
The location of the Escape/Esc key on the QWERTY keyboard layout.
Key1 = 2
The location of the 1
key on the QWERTY keyboard layout.
Key2 = 3
The location of the 2
key on the QWERTY keyboard layout.
Key3 = 4
The location of the 3
key on the QWERTY keyboard layout.
Key4 = 5
The location of the 4
key on the QWERTY keyboard layout.
Key5 = 6
The location of the 5
key on the QWERTY keyboard layout.
Key6 = 7
The location of the 6
key on the QWERTY keyboard layout.
Key7 = 8
The location of the 7
key on the QWERTY keyboard layout.
Key8 = 9
The location of the 8
key on the QWERTY keyboard layout.
Key9 = 10
The location of the 9
key on the QWERTY keyboard layout.
Key0 = 11
The location of the 0
key on the QWERTY keyboard layout.
Minus = 12
The location of the -
key on the QWERTY keyboard layout.
Equals = 13
The location of the =
key on the QWERTY keyboard layout.
Backspace = 14
The location of the back(space) key on the QWERTY keyboard layout.
Tab = 15
The location of the tabulator key on the QWERTY keyboard layout.
Q = 16
The location of the Q
key on the QWERTY keyboard layout.
W = 17
The location of the W
key on the QWERTY keyboard layout.
E = 18
The location of the E
key on the QWERTY keyboard layout.
R = 19
The location of the R
key on the QWERTY keyboard layout.
T = 20
The location of the T
key on the QWERTY keyboard layout.
Y = 21
The location of the Y
key on the QWERTY keyboard layout.
U = 22
The location of the U
key on the QWERTY keyboard layout.
I = 23
The location of the I
key on the QWERTY keyboard layout.
O = 24
The location of the O
key on the QWERTY keyboard layout.
P = 25
The location of the P
key on the QWERTY keyboard layout.
BracketLeft = 26
The location of the [
key on the QWERTY keyboard layout.
BracketRight = 27
The location of the ]
key on the QWERTY keyboard layout.
Enter = 28
The location of the Enter/Return key on the QWERTY keyboard layout.
ControlLeft = 29
The location of the left Control key on the QWERTY keyboard layout.
A = 30
The location of the A
key on the QWERTY keyboard layout.
S = 31
The location of the S
key on the QWERTY keyboard layout.
D = 32
The location of the D
key on the QWERTY keyboard layout.
F = 33
The location of the F
key on the QWERTY keyboard layout.
G = 34
The location of the G
key on the QWERTY keyboard layout.
H = 35
The location of the H
key on the QWERTY keyboard layout.
J = 36
The location of the J
key on the QWERTY keyboard layout.
K = 37
The location of the K
key on the QWERTY keyboard layout.
L = 38
The location of the L
key on the QWERTY keyboard layout.
SemiColon = 39
The location of the ;
key on the QWERTY keyboard layout.
Apostrophe = 40
The location of the '
key on the QWERTY keyboard layout.
Backtick = 41
The location of the `
key on the QWERTY keyboard layout.
ShiftLeft = 42
The location of the left Shift key on the QWERTY keyboard layout.
Backslash = 43
The location of the \
on the QWERTY keyboard layout.
Z = 44
The location of the Z
key on the QWERTY keyboard layout.
X = 45
The location of the X
key on the QWERTY keyboard layout.
C = 46
The location of the C
key on the QWERTY keyboard layout.
V = 47
The location of the `V key on the QWERTY keyboard layout.
B = 48
The location of the B
key on the QWERTY keyboard layout.
N = 49
The location of the N
key on the QWERTY keyboard layout.
M = 50
The location of the M
key on the QWERTY keyboard layout.
Comma = 51
The location of the ,
key on the QWERTY keyboard layout.
Period = 52
The location of the .
key on the QWERTY keyboard layout.
Slash = 53
The location of the /
key on the QWERTY keyboard layout.
ShiftRight = 54
The location of the right Shift key on the QWERTY keyboard layout.
NumpadMultiply = 55
The location of the *
key on the numpad of the QWERTY keyboard layout.
Maps to NumpadDivide
on Apple keyboards.
AltLeft = 56
The location of the left Alt key on the QWERTY keyboard layout. Maps to left Option key on Apple keyboards.
Space = 57
The location of the Space key on the QWERTY keyboard layout.
CapsLock = 58
The location of the caps lock key on the QWERTY keyboard layout.
F1 = 59
The location of the F1
key on the QWERTY keyboard layout.
F2 = 60
The location of the F2
key on the QWERTY keyboard layout.
F3 = 61
The location of the F3
key on the QWERTY keyboard layout.
F4 = 62
The location of the F4
key on the QWERTY keyboard layout.
F5 = 63
The location of the F5
key on the QWERTY keyboard layout.
F6 = 64
The location of the F6
key on the QWERTY keyboard layout.
F7 = 65
The location of the F7
key on the QWERTY keyboard layout.
F8 = 66
The location of the F8
key on the QWERTY keyboard layout.
F9 = 67
The location of the F9
key on the QWERTY keyboard layout.
F10 = 68
The location of the F10
key on the QWERTY keyboard layout.
Numlock = 69
The location of the Numlock key on the QWERTY keyboard layout.
Maps to NumpadClear
on Apple keyboards.
Scroll = 70
The location of the Scroll / Scroll Lock key on the QWERTY keyboard layout.
Maps to the F14
key on Apple keyboards.
Numpad7 = 71
The location of the 7
key on the numpad of the QWERTY keyboard layout.
Numpad8 = 72
The location of the 8
key on the numpad of the QWERTY keyboard layout.
Numpad9 = 73
The location of the 9
key on the numpad of the QWERTY keyboard layout.
NumpadSubtract = 74
The location of the *
key on the numpad of the QWERTY keyboard layout.
Maps to NumpadMultiply
on Apple keyboards.
Numpad4 = 75
The location of the 4
key on the numpad of the QWERTY keyboard layout.
Numpad5 = 76
The location of the 5
key on the numpad of the QWERTY keyboard layout.
Numpad6 = 77
The location of the 6
key on the numpad of the QWERTY keyboard layout.
NumpadAdd = 78
The location of the +
key on the numpad of the QWERTY keyboard layout.
Numpad1 = 79
The location of the 1
key on the numpad of the QWERTY keyboard layout.
Numpad2 = 80
The location of the 2
key on the numpad of the QWERTY keyboard layout.
Numpad3 = 81
The location of the 3
key on the numpad of the QWERTY keyboard layout.
Numpad0 = 82
The location of the 0
key on the numpad of the QWERTY keyboard layout.
NumpadDecimal = 83
The location of the .
key on the numpad of the QWERTY keyboard layout.
F11 = 87
The location of the F11
key on the QWERTY keyboard layout.
F12 = 88
The location of the F12
key on the QWERTY keyboard layout.
NumpadEnter = 96
The location of the Enter key on the numpad of the QWERTY keyboard layout.
ControlRight = 97
The location of the right Control key on the QWERTY keyboard layout.
NumpadDivide = 98
The location of the /
key on the numpad of the QWERTY keyboard layout.
Maps to NumpadEquals
on Apple keyboards.
AltSysrq = 99
The location of the Alt+Sysrq key on the QWERTY keyboard layout.
AltRight = 100
The location of the right Alt key on the QWERTY keyboard layout. Maps to right Option key on Apple keyboards.
Home = 102
The location of the Home key on the QWERTY keyboard layout.
Up = 103
The location of the Arrow Up key on the QWERTY keyboard layout.
PageUp = 104
The location of the Page Up key on the QWERTY keyboard layout.
Left = 105
The location of the Arrow Left key on the QWERTY keyboard layout.
Right = 106
The location of the Arrow Right key on the QWERTY keyboard layout.
End = 107
The location of the End key on the QWERTY keyboard layout.
Down = 108
The location of the Arrow Down key on the QWERTY keyboard layout.
PageDown = 109
The location of the Page Down key on the QWERTY keyboard layout.
Insert = 110
The location of the Insert key on the QWERTY keyboard layout. Maps to the Help key on Apple keyboards.
Delete = 111
The location of the Delete key on the QWERTY keyboard layout.
Power = 116
The location of the Power key on the QWERTY keyboard layout.
Pause = 119
The location of the Pause key on the QWERTY keyboard layout.
Maps to the F15
key on Apple keyboards.
SuperLeft = 125
The location of the left Windows key on the QWERTY keyboard layout. Maps to the Command key on Apple keyboards.
SuperRight = 126
The location of the right Windows key on the QWERTY keyboard layout.
Menu = 139
The location of the Menu key on the QWERTY keyboard layout.
Sleep = 142
The location of the Sleep key on the QWERTY keyboard layout.
Wake = 143
The location of the Wake key on the QWERTY keyboard layout.
Trait Implementations§
source§impl From<QwertyScanCode> for InputKind
impl From<QwertyScanCode> for InputKind
source§fn from(input: QwertyScanCode) -> Self
fn from(input: QwertyScanCode) -> Self
source§impl From<QwertyScanCode> for ScanCode
impl From<QwertyScanCode> for ScanCode
source§fn from(value: QwertyScanCode) -> Self
fn from(value: QwertyScanCode) -> Self
source§impl From<QwertyScanCode> for UserInput
impl From<QwertyScanCode> for UserInput
source§fn from(input: QwertyScanCode) -> Self
fn from(input: QwertyScanCode) -> Self
Auto Trait Implementations§
impl RefUnwindSafe for QwertyScanCode
impl Send for QwertyScanCode
impl Sync for QwertyScanCode
impl Unpin for QwertyScanCode
impl UnwindSafe for QwertyScanCode
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.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
§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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.