pub enum Key {
Show 36 variants
Char(char),
Backspace,
Enter,
Left,
Right,
Up,
Down,
Home,
End,
PageUp,
PageDown,
Tab,
Delete,
Insert,
Esc,
F(u8),
Null,
CapsLock,
ScrollLock,
NumLock,
PrintScreen,
Pause,
Menu,
KeypadBegin,
MediaPlay,
MediaPause,
MediaPlayPause,
MediaStop,
MediaNext,
MediaPrevious,
MediaFastForward,
MediaRewind,
MediaVolumeUp,
MediaVolumeDown,
MediaMute,
Modifier(ModifierKey),
}Expand description
Represents a key on the keyboard
Variants§
Char(char)
A character key
Backspace
Backspace key
Enter
Enter/Return key
Left
Left arrow
Right
Right arrow
Up
Up arrow
Down
Down arrow
Home
Home key
End
End key
PageUp
Page up
PageDown
Page down
Tab
Tab key
Delete
Delete key
Insert
Insert key
Esc
Escape key
F(u8)
Function keys
Null
Null key (usually Ctrl+@)
CapsLock
Caps Lock key
ScrollLock
Scroll Lock key
NumLock
Num Lock key
PrintScreen
Print Screen key
Pause
Pause/Break key
Menu
Menu/Application key
KeypadBegin
Keypad Begin (5 on keypad with NumLock off)
MediaPlay
Media Play
MediaPause
Media Pause
MediaPlayPause
Media Play/Pause toggle
MediaStop
Media Stop
MediaNext
Media Next Track
MediaPrevious
Media Previous Track
MediaFastForward
Media Fast Forward
MediaRewind
Media Rewind
MediaVolumeUp
Media Volume Up
MediaVolumeDown
Media Volume Down
MediaMute
Media Mute
Modifier(ModifierKey)
Modifier key (Shift, Ctrl, Alt, Super/Meta)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter