pub enum Key {
Show 76 variants
Esc,
Space,
Enter,
Backspace,
CapsLock,
Tab,
Up,
Down,
Left,
Right,
Home,
End,
PageUp,
PageDown,
Insert,
Delete,
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
Num0,
Num1,
Num2,
Num3,
Num4,
Num5,
Num6,
Num7,
Num8,
Num9,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Grave,
Minus,
Equal,
LeftBracket,
RightBracket,
BackSlash,
Semicolon,
Apostrophe,
Comma,
Dot,
Slash,
Unknown,
}
Expand description
The keys detectable by ruscii
.
A value, Key::Unknown
, is provided when a key is detected but the type of key cannot be
ascertained.
Exceptional Behavior
Certain values of this enum represent positions on the keyboard rather than the key type. These values might behave differently than expected when using different keyboard layouts. This includes:
- grave/backtick
`
- minus
-
- equal
=
- left and right bracket
[]
- forward and back slash
/\
- semicolon
;
- apostrophe
'
- comma
,
- dot
.
These keys are named according to their function in a U.S. ASCII keyboard layout. Differing layouts may vary in which key event is fired.
A differing layout may also affect how key events are fired; certain keyboards may generate only one event by pressing two keys.