pub enum KeyCode {
Show 19 variants
Char(char),
Enter,
Tab,
BackTab,
Backspace,
Delete,
Insert,
Escape,
Up,
Down,
Left,
Right,
Home,
End,
PageUp,
PageDown,
F(u8),
Menu,
Modifier(ModifierKey),
}Expand description
A key, without its modifiers.
Variants§
Char(char)
Enter
Tab
BackTab
Shift+Tab, as terminals send it.
Backspace
Delete
Insert
Escape
Up
Down
Left
Right
Home
End
PageUp
PageDown
F(u8)
Menu
The menu key (the context-menu key beside the right Ctrl), parsed
as menu. Terminals with the kitty keyboard protocol report it;
others send nothing for it, so a binding on it usually has
Shift+F10 beside it.
Modifier(ModifierKey)
A modifier key on its own, parsed as shift, ctrl, alt or
super: only a terminal with the kitty keyboard protocol asked to
report every key reports these
(SessionOptions::all_keys).
Either side’s key is the same one.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.