#[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
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§
impl Copy for Key
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>,
impl Eq for Key
Source§impl From<MouseButton> for Key
Available on crate feature termion only.
impl From<MouseButton> for Key
termion only.Source§fn from(button: MouseButton) -> Self
fn from(button: MouseButton) -> Self
Convert ratatui_termion::termion::event::MouseButton into Key.
Source§impl From<MouseButtons> for Key
Available on crate feature termwiz only.
impl From<MouseButtons> for Key
termwiz only.Source§fn from(buttons: MouseButtons) -> Self
fn from(buttons: MouseButtons) -> Self
Convert ratatui_termwiz::termwiz::input::MouseButtons into Key.
Source§impl From<MouseEventKind> for Key
Available on crate feature crossterm only.
impl From<MouseEventKind> for Key
crossterm only.Source§fn from(kind: MouseEventKind) -> Self
fn from(kind: MouseEventKind) -> Self
Convert ratatui_crossterm::crossterm::event::MouseEventKind into 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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
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>
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>
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