pub enum Key {
Show 34 variants
Up,
Down,
Left,
Right,
Char(char),
Esc,
Backspace,
Enter,
Tab,
CapsLock,
Home,
End,
PageUp,
PageDown,
Delete,
Insert,
Func(u8),
ScrollLock,
NumLock,
PrintScreen,
Pause,
Menu,
BackTab,
MediaPlay,
MediaPause,
MediaPlayPause,
MediaStop,
MediaNext,
MediaPrevious,
RaisVolume,
LowerVolume,
MuteVolume,
Modifier(Modifier),
None,
}
Expand description
Input enum to represent all keys you may get
Variants§
Up
Down
Left
Right
Char(char)
Character key
like a
key, h
key
Esc
Backspace
Enter
Tab
CapsLock
Home
End
PageUp
PageDown
Delete
Insert
Func(u8)
Function keys
ScrollLock
NumLock
PrintScreen
Pause
Menu
BackTab
MediaPlay
MediaPause
MediaPlayPause
MediaStop
MediaNext
MediaPrevious
RaisVolume
LowerVolume
MuteVolume
Modifier(Modifier)
If a modifier is pressed on it’s own
None
Nothing was pressed Or it was not implemented
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