pub enum Key {
Show 16 variants
Character(String),
Enter,
Tab,
Escape,
Backspace,
Delete,
ArrowLeft,
ArrowRight,
ArrowUp,
ArrowDown,
Home,
End,
PageUp,
PageDown,
Space,
Other,
}Expand description
A key on the keyboard, by meaning rather than by position.
A printable key arrives as Key::Character. Everything the platform
reports that has no variant here arrives as Key::Other.
Variants§
Character(String)
A character key, already affected by the keyboard layout, such as a
or ?.
Enter
The Enter or Return key.
Tab
The Tab key.
Escape
The Escape key.
Backspace
The Backspace key.
Delete
The Delete key.
ArrowLeft
The left arrow key.
ArrowRight
The right arrow key.
ArrowUp
The up arrow key.
ArrowDown
The down arrow key.
Home
The Home key.
End
The End key.
PageUp
The Page Up key.
PageDown
The Page Down key.
Space
The space bar.
Other
A key with no variant of its own.
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Forget for Key
impl Freeze for Key
impl Move 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