Enum tui_textarea::Key
source · #[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
impl From<MouseButton> for Key
source§fn from(button: MouseButton) -> Self
fn from(button: MouseButton) -> Self
Convert termion::event::MouseButton into Key.
source§impl From<MouseButtons> for Key
impl From<MouseButtons> for Key
source§fn from(buttons: MouseButtons) -> Self
fn from(buttons: MouseButtons) -> Self
Convert termwiz::input::MouseButtons into Key.
source§impl From<MouseEventKind> for Key
impl From<MouseEventKind> for Key
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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