Enum KeyCode
#[non_exhaustive]
pub enum KeyCode
Input key pressed
Variants
-
UnknownEscSeq Unsupported escape sequence (on unix platform)
-
Backspace ⌫ or Ctrl-H
-
BackTab ⇤ (usually Shift-Tab)
-
BracketedPasteStart Paste (on unix platform)
-
BracketedPasteEnd Paste (on unix platform)
-
Char(char) Single char
-
Delete ⌦
-
Down ↓ arrow key
-
End ⇲
-
Enter ↵ or Ctrl-M
-
Esc Escape or Ctrl-[
-
F(u8) Function key
-
Home ⇱
-
Insert Insert key
-
Left ← arrow key
-
Null \0
-
PageDown ⇟
-
PageUp ⇞
-
Right → arrow key
-
Tab ⇥ or Ctrl-I
-
Up ↑ arrow key
Trait Implementations
impl Clone for KeyCode
fn clone(&self) -> KeyCode
impl Copy for KeyCode
impl Debug for KeyCode
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for KeyCode
impl Hash for KeyCode
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for KeyCode
fn eq(&self, other: &KeyCode) -> bool
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
impl<T> Any for KeyCode
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for KeyCode
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for KeyCode
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for KeyCode
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for KeyCode
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for KeyCode
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for KeyCode
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for KeyCode
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for KeyCode
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>