pub enum Key {
Escape,
Enter,
Space,
ArrowUp,
ArrowDown,
ArrowLeft,
ArrowRight,
Function(u8),
Character(char),
Other(u32),
}Expand description
Identifiers for keyboard keys.
Variants§
Escape
Escape key.
Enter
Enter/Return key.
Space
Spacebar key.
ArrowUp
Up arrow key.
ArrowDown
Down arrow key.
ArrowLeft
Left arrow key.
ArrowRight
Right arrow key.
Function(u8)
Function key with the given index (1–12).
Character(char)
Printable character key.
Other(u32)
Any other key not explicitly covered above.
Trait Implementations§
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
Mutably borrows from an owned value. Read more