pub enum Key {
ArrowUp,
ArrowDown,
ArrowRight,
ArrowLeft,
Enter,
Tab,
Backspace,
Escape,
Char(char),
Unknown,
}
Expand description
Represents different keyboard keys that can be captured by the read_key
function.
Variants§
ArrowUp
Arrow up key.
ArrowDown
Arrow down key.
ArrowRight
Arrow right key.
ArrowLeft
Arrow left key.
Enter
Enter/Return key.
Tab
Tab key.
Backspace
Backspace key.
Escape
Escape key.
Char(char)
Any printable character on the keyboard.
Unknown
Any unrecognized key.
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 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