#[repr(u16)]pub enum Key {
Show 138 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,
Num0,
Num1,
Num2,
Num3,
Num4,
Num5,
Num6,
Num7,
Num8,
Num9,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
ShiftLeft,
ShiftRight,
ControlLeft,
ControlRight,
AltLeft,
AltRight,
MetaLeft,
MetaRight,
Escape,
Tab,
CapsLock,
Space,
Enter,
Backspace,
Insert,
Delete,
Home,
End,
PageUp,
PageDown,
ArrowUp,
ArrowDown,
ArrowLeft,
ArrowRight,
NumLock,
ScrollLock,
PrintScreen,
Pause,
Grave,
Minus,
Equal,
BracketLeft,
BracketRight,
Backslash,
Semicolon,
Quote,
Comma,
Period,
Slash,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
NumpadAdd,
NumpadSubtract,
NumpadMultiply,
NumpadDivide,
NumpadDecimal,
NumpadEnter,
NumpadEqual,
VolumeUp,
VolumeDown,
VolumeMute,
MediaPlayPause,
MediaStop,
MediaNext,
MediaPrevious,
BrowserBack,
BrowserForward,
BrowserRefresh,
BrowserStop,
BrowserSearch,
BrowserFavorites,
BrowserHome,
LaunchMail,
LaunchApp1,
LaunchApp2,
IntlBackslash,
IntlYen,
IntlRo,
ContextMenu,
Unknown(u32),
}Expand description
Virtual key codes for keyboard keys.
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
Num0
Num1
Num2
Num3
Num4
Num5
Num6
Num7
Num8
Num9
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
ShiftLeft
ShiftRight
ControlLeft
ControlRight
AltLeft
AltRight
MetaLeft
MetaRight
Escape
Tab
CapsLock
Space
Enter
Backspace
Insert
Delete
Home
End
PageUp
PageDown
ArrowUp
ArrowDown
ArrowLeft
ArrowRight
NumLock
ScrollLock
PrintScreen
Pause
Grave
Minus
Equal
BracketLeft
BracketRight
Backslash
Semicolon
Quote
Comma
Period
Slash
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadAdd
NumpadSubtract
NumpadMultiply
NumpadDivide
NumpadDecimal
NumpadEnter
NumpadEqual
VolumeUp
VolumeDown
VolumeMute
MediaPlayPause
MediaStop
MediaNext
MediaPrevious
BrowserBack
BrowserForward
BrowserRefresh
BrowserStop
BrowserSearch
BrowserFavorites
BrowserHome
LaunchMail
LaunchApp1
LaunchApp2
IntlBackslash
IntlYen
IntlRo
ContextMenu
Unknown(u32)
Implementations§
Source§impl Key
impl Key
Sourcepub fn is_modifier(&self) -> bool
pub fn is_modifier(&self) -> bool
Check if this is a modifier key.
Sourcepub fn is_function_key(&self) -> bool
pub fn is_function_key(&self) -> bool
Check if this is a function key.
Check if this is a navigation key.
Trait Implementations§
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§
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