pub enum KeyInput {
Show 21 variants
Text(String),
Backspace,
Delete,
Left,
Right,
Up,
Down,
Home,
End,
SelectLeft,
SelectRight,
SelectUp,
SelectDown,
SelectHome,
SelectEnd,
SelectAll,
Copy,
Cut,
Paste,
Enter,
Escape,
}Expand description
A platform-neutral keyboard input, delivered to the focused element. The app/platform layer translates raw key events into these.
Variants§
Text(String)
Committed text (one or more characters), e.g. from a key press or IME.
Backspace
Delete
Left
Right
Up
Down
Home
End
SelectLeft
Caret motion that extends the selection (Shift held). The Select*
variants mirror the plain motions but keep the selection anchor.
SelectRight
SelectUp
SelectDown
SelectHome
SelectEnd
SelectAll
Select everything (e.g. Ctrl/Cmd+A).
Copy
Copy the selection to the clipboard (Ctrl/Cmd+C).
Cut
Cut the selection to the clipboard (Ctrl/Cmd+X).
Paste
Paste the clipboard at the caret, replacing the selection (Ctrl/Cmd+V).
Enter
Escape
Trait Implementations§
impl Eq for KeyInput
impl StructuralPartialEq for KeyInput
Auto Trait Implementations§
impl Freeze for KeyInput
impl RefUnwindSafe for KeyInput
impl Send for KeyInput
impl Sync for KeyInput
impl Unpin for KeyInput
impl UnsafeUnpin for KeyInput
impl UnwindSafe for KeyInput
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