pub enum Key {
Show 111 variants
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,
Zero,
One,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
DirectionUp,
DirectionDown,
DirectionLeft,
DirectionRight,
DirectionCenter,
MoveHome,
MoveEnd,
PageUp,
PageDown,
Backspace,
Delete,
Enter,
NumPadEnter,
Tab,
Spacebar,
Escape,
ShiftLeft,
ShiftRight,
CtrlLeft,
CtrlRight,
AltLeft,
AltRight,
MetaLeft,
MetaRight,
Minus,
Equals,
LeftBracket,
RightBracket,
Backslash,
Semicolon,
Apostrophe,
Comma,
Period,
Slash,
Grave,
Back,
Menu,
Search,
Info,
Guide,
Settings,
ChannelUp,
ChannelDown,
ProgramRed,
ProgramGreen,
ProgramYellow,
ProgramBlue,
MediaPlay,
MediaPause,
MediaPlayPause,
MediaStop,
MediaNext,
MediaPrevious,
MediaRewind,
MediaFastForward,
MediaRecord,
ButtonA,
ButtonB,
ButtonX,
ButtonY,
ButtonSelect,
ButtonStart,
Unknown,
}Expand description
A key on a keyboard, remote control or game controller, named as in
Jetpack Compose’s androidx.compose.ui.input.key.Key.
Letters and digits name the physical key, independent of the character the keyboard layout gives it.
Variants§
A
The A key.
B
The B key.
C
The C key.
D
The D key.
E
The E key.
F
The F key.
G
The G key.
H
The H key.
I
The I key.
J
The J key.
K
The K key.
L
The L key.
M
The M key.
N
The N key.
O
The O key.
P
The P key.
Q
The Q key.
R
The R key.
S
The S key.
T
The T key.
U
The U key.
V
The V key.
W
The W key.
X
The X key.
Y
The Y key.
Z
The Z key.
Zero
The 0 key on the main number row.
One
The 1 key on the main number row.
Two
The 2 key on the main number row.
Three
The 3 key on the main number row.
Four
The 4 key on the main number row.
Five
The 5 key on the main number row.
Six
The 6 key on the main number row.
Seven
The 7 key on the main number row.
Eight
The 8 key on the main number row.
Nine
The 9 key on the main number row.
F1
The F1 function key.
F2
The F2 function key.
F3
The F3 function key.
F4
The F4 function key.
F5
The F5 function key.
F6
The F6 function key.
F7
The F7 function key.
F8
The F8 function key.
F9
The F9 function key.
F10
The F10 function key.
F11
The F11 function key.
F12
The F12 function key.
DirectionUp
The up arrow key, or up on a D-pad.
DirectionDown
The down arrow key, or down on a D-pad.
DirectionLeft
The left arrow key, or left on a D-pad.
DirectionRight
The right arrow key, or right on a D-pad.
DirectionCenter
The center button of a D-pad: OK or Select on a remote.
MoveHome
The Home key, which moves to the start of a line or list.
MoveEnd
The End key, which moves to the end of a line or list.
PageUp
The Page Up key.
PageDown
The Page Down key.
Backspace
The Backspace key, which deletes backward.
Delete
The Delete key, which deletes forward.
Enter
The main Enter or Return key.
NumPadEnter
The Enter key on the number pad.
Tab
The Tab key.
Spacebar
The space bar.
Escape
The Escape key.
ShiftLeft
The left Shift key.
ShiftRight
The right Shift key.
CtrlLeft
The left Control key.
CtrlRight
The right Control key.
AltLeft
The left Alt key, called Option on macOS.
AltRight
The right Alt key, called Option on macOS.
MetaLeft
The left Meta key: Command on macOS, the Windows key elsewhere.
MetaRight
The right Meta key: Command on macOS, the Windows key elsewhere.
Minus
The minus and underscore key on US layouts.
Equals
The equals and plus key on US layouts.
LeftBracket
The left square bracket key on US layouts.
RightBracket
The right square bracket key on US layouts.
Backslash
The backslash key on US layouts.
Semicolon
The semicolon and colon key on US layouts.
Apostrophe
The apostrophe and quotation mark key on US layouts.
Comma
The comma key on US layouts.
Period
The period key on US layouts.
Slash
The forward slash key on US layouts.
Grave
The grave accent and tilde key on US layouts, left of the 1 key.
Back
The Back key of a remote or of the Android system navigation.
Menu
The Menu key.
Search
The Search key of a remote.
Info
The Info key of a remote.
Guide
The Guide key of a remote, which opens the program guide.
Settings
The Settings key of a remote.
ChannelUp
The Channel Up key of a remote.
ChannelDown
The Channel Down key of a remote.
ProgramRed
The red program key of a remote.
ProgramGreen
The green program key of a remote.
ProgramYellow
The yellow program key of a remote.
ProgramBlue
The blue program key of a remote.
MediaPlay
The Play media key.
MediaPause
The Pause media key.
MediaPlayPause
The Play/Pause media key.
MediaStop
The Stop media key.
MediaNext
The Next track media key.
MediaPrevious
The Previous track media key.
MediaRewind
The Rewind media key.
MediaFastForward
The Fast Forward media key.
MediaRecord
The Record media key.
ButtonA
The A button of a game controller.
ButtonB
The B button of a game controller.
ButtonX
The X button of a game controller.
ButtonY
The Y button of a game controller.
ButtonSelect
The Select button of a game controller.
ButtonStart
The Start button of a game controller.
Unknown
Key not recognized or not mapped.
Implementations§
Source§impl Key
impl Key
Sourcepub fn from_dom_code(code: &str) -> Key
pub fn from_dom_code(code: &str) -> Key
The key a W3C KeyboardEvent.code value names, such as "KeyA",
"ArrowUp" or "MediaPlayPause". A code with no counterpart here is
Key::Unknown.