#[non_exhaustive]pub enum Key {
}Expand description
Backend-agnostic key input kind.
This type is marked as #[non_exhaustive] since more keys may be supported in the future.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Char(char)
Normal letter key input
F(u8)
F1, F2, F3, … keys
Backspace
Backspace key
Enter
Enter or return key
Left
Left arrow key
Right
Right arrow key
Up
Up arrow key
Down
Down arrow key
Tab
Tab key
Delete
Delete key
Home
Home key
End
End key
PageUp
Page up key
PageDown
Page down key
Esc
Escape key
Copy
Copy key. This key is supported by termwiz only
Cut
Cut key. This key is supported by termwiz only
Paste
Paste key. This key is supported by termwiz only
MouseScrollDown
Virtual key to scroll down by mouse
MouseScrollUp
Virtual key to scroll up by mouse
Null
An invalid key input (this key is always ignored by TextArea)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Key
impl<'de> Deserialize<'de> for Key
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<MouseButton> for Key
Available on crate features termion or tuirs-termion only.
impl From<MouseButton> for Key
Available on crate features
termion or tuirs-termion only.Source§fn from(button: MouseButton) -> Self
fn from(button: MouseButton) -> Self
Convert termion::event::MouseButton into Key.
Source§impl From<MouseButtons> for Key
Available on crate feature termwiz only.
impl From<MouseButtons> for Key
Available on crate feature
termwiz only.Source§fn from(buttons: MouseButtons) -> Self
fn from(buttons: MouseButtons) -> Self
Convert termwiz::input::MouseButtons into Key.
Source§impl From<MouseEventKind> for Key
Available on crate features crossterm or tuirs-crossterm only.
impl From<MouseEventKind> for Key
Available on crate features
crossterm or tuirs-crossterm only.Source§fn from(kind: MouseEventKind) -> Self
fn from(kind: MouseEventKind) -> Self
Convert crossterm::event::MouseEventKind into Key.
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more