#[repr(u8)]pub enum Key {
Show 56 variants
Grave = 0,
Num1 = 1,
Num2 = 2,
Num3 = 3,
Num4 = 4,
Num5 = 5,
Num6 = 6,
Num7 = 7,
Num8 = 8,
Num9 = 9,
Num0 = 10,
Minus = 11,
Equal = 12,
Backspace = 13,
Tab = 14,
Q = 15,
W = 16,
E = 17,
R = 18,
T = 19,
Y = 20,
U = 21,
I = 22,
O = 23,
P = 24,
LeftBracket = 25,
RightBracket = 26,
Backslash = 27,
Fn = 28,
Shift = 29,
A = 30,
S = 31,
D = 32,
F = 33,
G = 34,
H = 35,
J = 36,
K = 37,
L = 38,
Semicolon = 39,
Quote = 40,
Enter = 41,
Ctrl = 42,
Opt = 43,
Alt = 44,
Z = 45,
X = 46,
C = 47,
V = 48,
B = 49,
N = 50,
M = 51,
Comma = 52,
Period = 53,
Slash = 54,
Space = 55,
}Expand description
A physical key, named after its primary legend.
The discriminants are dense (0..Key::COUNT) so a set of held keys fits
in one u64.
Variants§
Grave = 0
Num1 = 1
Num2 = 2
Num3 = 3
Num4 = 4
Num5 = 5
Num6 = 6
Num7 = 7
Num8 = 8
Num9 = 9
Num0 = 10
Minus = 11
Equal = 12
Backspace = 13
Tab = 14
Q = 15
W = 16
E = 17
R = 18
T = 19
Y = 20
U = 21
I = 22
O = 23
P = 24
LeftBracket = 25
RightBracket = 26
Backslash = 27
Fn = 28
Shift = 29
A = 30
S = 31
D = 32
F = 33
G = 34
H = 35
J = 36
K = 37
L = 38
Semicolon = 39
Quote = 40
Enter = 41
Ctrl = 42
Opt = 43
Alt = 44
Z = 45
X = 46
C = 47
V = 48
B = 49
N = 50
M = 51
Comma = 52
Period = 53
Slash = 54
Space = 55
Implementations§
Trait Implementations§
Source§impl Ord for Key
impl Ord for Key
1.21.0 (const: unstable)§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Key
impl PartialOrd for Key
impl Copy for Key
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)