pub enum Key {
Show 32 variants
Backspace,
Left,
ShiftLeft,
AltLeft,
CtrlLeft,
Right,
ShiftRight,
AltRight,
CtrlRight,
Up,
ShiftUp,
AltUp,
CtrlUp,
Down,
ShiftDown,
AltDown,
CtrlDown,
Home,
CtrlHome,
End,
CtrlEnd,
PageUp,
PageDown,
BackTab,
Delete,
Insert,
F(u8),
Char(char),
Alt(char),
Ctrl(char),
Null,
Esc,
// some variants omitted
}
Expand description
A key.
Variants§
Backspace
Backspace.
Left
Left arrow.
ShiftLeft
Shift Left arrow.
AltLeft
Alt Left arrow.
CtrlLeft
Ctrl Left arrow.
Right
Right arrow.
ShiftRight
Shift Right arrow.
AltRight
Alt Right arrow.
CtrlRight
Ctrl Right arrow.
Up
Up arrow.
ShiftUp
Shift Up arrow.
AltUp
Alt Up arrow.
CtrlUp
Ctrl Up arrow.
Down
Down arrow.
ShiftDown
Shift Down arrow.
AltDown
Alt Down arrow.
CtrlDown
Ctrl Down arrow
Home
Home key.
CtrlHome
Ctrl Home key.
End
End key.
CtrlEnd
Ctrl End key.
PageUp
Page Up key.
PageDown
Page Down key.
BackTab
Backward Tab key.
Delete
Delete key.
Insert
Insert key.
F(u8)
Function keys.
Only function keys 1 through 12 are supported.
Char(char)
Normal character.
Alt(char)
Alt modified character.
Ctrl(char)
Ctrl modified character.
Note that certain keys may not be modifiable with ctrl
, due to limitations of terminals.
Null
Null byte.
Esc
Esc 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