pub enum SpecialKey {
Show 16 variants
Esc,
Enter,
Tab,
Backspace,
Space,
Up,
Down,
Left,
Right,
Home,
End,
PageUp,
PageDown,
Insert,
Delete,
F(u8),
}Expand description
Named special keys. Renderer-neutral; crossterm’s
KeyCode::BackTab is normalised away by the TUI adapter
(from_crossterm) into Special(Tab) + KeyMods::SHIFT so the
trie has one entry for “shift-tab” rather than two ambiguous
ones.
Variants§
Esc
Escape — <Esc>.
Enter
Return / Enter — <CR>.
Tab
Tab — <Tab>; Shift-Tab is this plus KeyMods::SHIFT.
Backspace
Backspace — <BS>.
Space
Space with a modifier (<C-Space>). A bare space is
KeyKind::Char(' '); see the module notes.
Up
Arrow up — <Up>.
Down
Arrow down — <Down>.
Left
Arrow left — <Left>.
Right
Arrow right — <Right>.
Home
Home — <Home>.
End
End — <End>.
PageUp
Page Up — <PageUp>.
PageDown
Page Down — <PageDown>.
Insert
Insert — <Insert>.
Delete
Forward delete — <Delete>.
F(u8)
Function keys F1..=F24. F(0) is reserved (invalid).
Trait Implementations§
Source§impl Clone for SpecialKey
impl Clone for SpecialKey
Source§fn clone(&self) -> SpecialKey
fn clone(&self) -> SpecialKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpecialKey
Source§impl Debug for SpecialKey
impl Debug for SpecialKey
impl Eq for SpecialKey
Source§impl Hash for SpecialKey
impl Hash for SpecialKey
Source§impl PartialEq for SpecialKey
impl PartialEq for SpecialKey
impl StructuralPartialEq for SpecialKey
Auto Trait Implementations§
impl Freeze for SpecialKey
impl RefUnwindSafe for SpecialKey
impl Send for SpecialKey
impl Sync for SpecialKey
impl Unpin for SpecialKey
impl UnsafeUnpin for SpecialKey
impl UnwindSafe for SpecialKey
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.