#[non_exhaustive]pub enum KeyCode {
Show 101 variants
KeyA,
KeyB,
KeyC,
KeyD,
KeyE,
KeyF,
KeyG,
KeyH,
KeyI,
KeyJ,
KeyK,
KeyL,
KeyM,
KeyN,
KeyO,
KeyP,
KeyQ,
KeyR,
KeyS,
KeyT,
KeyU,
KeyV,
KeyW,
KeyX,
KeyY,
KeyZ,
Digit0,
Digit1,
Digit2,
Digit3,
Digit4,
Digit5,
Digit6,
Digit7,
Digit8,
Digit9,
Escape,
Space,
Enter,
Tab,
Backspace,
Delete,
Insert,
Home,
End,
PageUp,
PageDown,
ArrowLeft,
ArrowRight,
ArrowUp,
ArrowDown,
Minus,
Equal,
BracketLeft,
BracketRight,
Backslash,
Semicolon,
Quote,
Backquote,
Comma,
Period,
Slash,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
NumpadDecimal,
NumpadMultiply,
NumpadAdd,
NumpadSubtract,
NumpadDivide,
NumpadEnter,
NumpadEqual,
NumpadClear,
Unidentified(u32),
}Expand description
A physical, position-oriented keyboard key.
Text entry and input-method composition are deliberately separate from this gameplay-oriented identity and are not part of the first input evidence slice.
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.
KeyA
KeyB
KeyC
KeyD
KeyE
KeyF
KeyG
KeyH
KeyI
KeyJ
KeyK
KeyL
KeyM
KeyN
KeyO
KeyP
KeyQ
KeyR
KeyS
KeyT
KeyU
KeyV
KeyW
KeyX
KeyY
KeyZ
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
Digit8
Digit9
Escape
Space
Enter
Tab
Backspace
Delete
Insert
Home
End
PageUp
PageDown
ArrowLeft
ArrowRight
ArrowUp
ArrowDown
Minus
Equal
BracketLeft
BracketRight
Backslash
Semicolon
Quote
Backquote
Comma
Period
Slash
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadDecimal
NumpadMultiply
NumpadAdd
NumpadSubtract
NumpadDivide
NumpadEnter
NumpadEqual
NumpadClear
Unidentified(u32)
A physical key whose current backend mapping is not yet represented portably.
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