pub enum Key {
Text(String),
Backspace,
Delete,
Enter,
Left {
shift: bool,
word: bool,
},
Right {
shift: bool,
word: bool,
},
Escape,
Home {
shift: bool,
doc: bool,
},
End {
shift: bool,
doc: bool,
},
}Expand description
A key passed to the focused widget.
Variants§
Text(String)
Typed text (one or more characters) — also used for pasting.
Backspace
Backspace (deletes the selection, otherwise the character to the left).
Delete
Forward delete (the selection, otherwise the character to the right).
Enter
Enter.
Left
Left arrow (shift: extends the selection; word: jumps a word, Ctrl).
Fields
Right
Right arrow (shift: extends it; word: jumps a word, Ctrl).
Fields
Escape
Escape (close or cancel) — routed leaf→root, never to editing.
Home
Start of line (doc: the start of the whole field, Ctrl).
Fields
End
End of line (doc: the end of the whole field, Ctrl).
Trait Implementations§
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
Mutably borrows from an owned value. Read more