pub enum Key {
}Expand description
Key identifiers for matching keyboard input.
Use Key::Enter, Key::Ctrl('c'), Key::CtrlShift('p') etc.
Variants§
Enter
Escape
Tab
Backspace
Delete
Home
End
PageUp
PageDown
Up
Down
Left
Right
Space
Char(char)
Single character (printable ASCII)
Ctrl(char)
Ctrl + character
Alt(char)
Alt + character
ShiftTab
Shift + Tab
CtrlShift(char)
Ctrl + Shift + character
AltLeft
Alt + arrow
AltRight
CtrlLeft
Ctrl + arrow
CtrlRight
Implementations§
Source§impl Key
impl Key
pub fn enter() -> Self
pub fn escape() -> Self
pub fn tab() -> Self
pub fn space() -> Self
pub fn backspace() -> Self
pub fn delete() -> Self
pub fn home() -> Self
pub fn end() -> Self
pub fn up() -> Self
pub fn down() -> Self
pub fn left() -> Self
pub fn right() -> Self
pub fn page_up() -> Self
pub fn page_down() -> Self
pub fn ctrl(c: char) -> Self
pub fn alt(c: char) -> Self
pub fn shift_tab() -> Self
pub fn ctrl_shift(c: char) -> Self
pub fn alt_left() -> Self
pub fn alt_right() -> Self
pub fn ctrl_left() -> Self
pub fn ctrl_right() -> Self
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.