#[non_exhaustive]pub enum Key {
}Expand description
A single physical or logical key.
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)
A printable character (letters are stored lowercase).
Return
Return / Enter.
Tab
Tab.
Space
Space bar.
Escape
Escape.
Backspace
Backspace (macOS “delete”).
Delete
Forward delete.
Insert
Insert (Help on macOS).
Up
Arrow up.
Down
Arrow down.
Left
Arrow left.
Right
Arrow right.
Home
Home.
End
End.
PageUp
Page up.
PageDown
Page down.
CapsLock
Caps lock.
Menu
Context menu key.
F(u8)
Function keys F1–F24.
Keypad(KeypadKey)
Numeric keypad keys.
Modifier(Modifiers)
A modifier pressed on its own.
Trait Implementations§
impl Copy for Key
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Forget for Key
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§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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