#[non_exhaustive]pub enum KeyCode {
Show 103 variants
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
Digit0,
Digit1,
Digit2,
Digit3,
Digit4,
Digit5,
Digit6,
Digit7,
Digit8,
Digit9,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Escape,
Enter,
Tab,
Space,
Backspace,
Delete,
Insert,
Home,
End,
PageUp,
PageDown,
ArrowUp,
ArrowDown,
ArrowLeft,
ArrowRight,
ShiftLeft,
ShiftRight,
ControlLeft,
ControlRight,
AltLeft,
AltRight,
SuperLeft,
SuperRight,
CapsLock,
NumLock,
ScrollLock,
Minus,
Equal,
IntlBackslash,
BracketLeft,
BracketRight,
Backslash,
Semicolon,
Quote,
Backquote,
Comma,
Period,
Slash,
NumpadEnter,
NumpadAdd,
NumpadSubtract,
NumpadMultiply,
NumpadDivide,
NumpadDecimal,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
Unidentified(u32),
}Expand description
A physical key position, named after the US layout as a convention.
This is a position, not a character. KeyCode::Semicolon is where ø lives
on a Norwegian keyboard; text arrives separately as InputEvent::Text, which
is also how dead-key composition and IME output get through.
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.
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
Digit8
Digit9
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
Escape
Enter
Tab
Space
Backspace
Delete
Insert
Home
End
PageUp
PageDown
ArrowUp
ArrowDown
ArrowLeft
ArrowRight
ShiftLeft
ShiftRight
ControlLeft
ControlRight
AltLeft
AltRight
SuperLeft
SuperRight
CapsLock
NumLock
ScrollLock
Minus
Equal
IntlBackslash
The extra key an ISO keyboard has that an ANSI one does not, between the
left shift and Z. It carries <, > and \\ on a Norwegian layout, so
a build that never names it cannot type a backslash.
BracketLeft
BracketRight
Backslash
Semicolon
Quote
Backquote
Comma
Period
Slash
NumpadEnter
NumpadAdd
NumpadSubtract
NumpadMultiply
NumpadDivide
NumpadDecimal
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
Unidentified(u32)
A key this build does not name. Carries the raw platform scancode where one
is available, 0 otherwise. evdev codes survive here.
Trait Implementations§
impl Copy for KeyCode
impl Eq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations§
impl Freeze for KeyCode
impl RefUnwindSafe for KeyCode
impl Send for KeyCode
impl Sync for KeyCode
impl Unpin for KeyCode
impl UnsafeUnpin 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