pub enum Key {
}Expand description
Decoded keyboard input, terminal-agnostic.
Variants§
Up
Arrow up: widget-local cursor until the top edge, then focus ring.
Down
Arrow down: widget-local cursor until the bottom edge, then ring.
Left
Arrow left: chips/enums/number fields consume; else focus ring.
Right
Arrow right: chips/enums/number fields consume; else focus ring.
Tab
Next focusable widget (always escapes the current widget).
BackTab
Previous focusable widget.
Enter
Activate / choose / newline (editor) / press (button).
Space
Toggle (checkbox/multi) or activate; literal space in text entry.
Esc
Close popup, then clear filter, then cancel the whole dialog.
Backspace
Delete before the cursor in text entry.
Delete
Delete under the cursor in text entry.
Insert
Insert at the cursor.
Home
Jump to line/list start.
End
Jump to line/list end.
PageUp
Scroll one viewport up.
PageDown
Scroll one viewport down.
Function(u8)
Function key, numbered from F1 through F12.
Ctrl(char)
Ctrl-chord with a letter, normalized to lowercase. Text widgets
implement the readline set (a e k u w b f d); others ignore.
Alt(char)
Alt-chord with a letter, normalized to lowercase, for chords without
a canonical cross-terminal meaning (e.g. pi binds alt+y yank-pop).
Encoding variants of one physical intent (alt+f/alt+b word
motion, alt+d word delete, ESC-CR newline) normalize to their
semantic keys instead and never reach this variant.
CtrlAlt(char)
Ctrl+Alt chord, normalized to lowercase. Used by pi’s backward character-jump binding and available to embedders for other chords.
ShiftEnter
Shift+Enter: literal newline in multiline text entry.
WordLeft
Ctrl/Alt+Left: previous word boundary.
WordRight
Ctrl/Alt+Right: next word boundary.
WordDelete
Alt+D / Alt+Delete: delete forward through the next word end.
Paste
Ctrl+V: host-driven clipboard paste, preferring images (see the runtime’s clipboard fallback).
PasteRaw
Ctrl+Shift+V: host-driven clipboard paste of text only, inserted
verbatim (crate::Component::paste_raw) — no image or file-URL
interpretation, no drop classification, no large-paste collapse.
Char(char)
Printable input: text entry, type-to-search (/), shortcuts.
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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> ⓘ
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