#[non_exhaustive]pub enum KeyCode {
Show 215 variants
Backquote,
Backslash,
BracketLeft,
BracketRight,
Comma,
Digit0,
Digit1,
Digit2,
Digit3,
Digit4,
Digit5,
Digit6,
Digit7,
Digit8,
Digit9,
Equal,
IntlBackslash,
IntlRo,
IntlYen,
KeyA,
KeyB,
KeyC,
KeyD,
KeyE,
KeyF,
KeyG,
KeyH,
KeyI,
KeyJ,
KeyK,
KeyL,
KeyM,
KeyN,
KeyO,
KeyP,
KeyQ,
KeyR,
KeyS,
KeyT,
KeyU,
KeyV,
KeyW,
KeyX,
KeyY,
KeyZ,
Minus,
Period,
Quote,
Semicolon,
Slash,
AltLeft,
AltRight,
Backspace,
CapsLock,
ContextMenu,
ControlLeft,
ControlRight,
Enter,
MetaLeft,
MetaRight,
ShiftLeft,
ShiftRight,
Space,
Tab,
Convert,
KanaMode,
Lang1,
Lang2,
Lang3,
Lang4,
Lang5,
NonConvert,
Delete,
End,
Help,
Home,
Insert,
PageDown,
PageUp,
ArrowDown,
ArrowLeft,
ArrowRight,
ArrowUp,
NumLock,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
NumpadAdd,
NumpadBackspace,
NumpadClear,
NumpadClearEntry,
NumpadComma,
NumpadDecimal,
NumpadDivide,
NumpadEnter,
NumpadEqual,
NumpadHash,
NumpadMemoryAdd,
NumpadMemoryClear,
NumpadMemoryRecall,
NumpadMemoryStore,
NumpadMemorySubtract,
NumpadMultiply,
NumpadParenLeft,
NumpadParenRight,
NumpadStar,
NumpadSubtract,
Escape,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
Fn,
FnLock,
PrintScreen,
ScrollLock,
Pause,
BrowserBack,
BrowserFavorites,
BrowserForward,
BrowserHome,
BrowserRefresh,
BrowserSearch,
BrowserStop,
Eject,
LaunchApp1,
LaunchApp2,
LaunchMail,
MediaPlayPause,
MediaSelect,
MediaStop,
MediaTrackNext,
MediaTrackPrevious,
Power,
Sleep,
AudioVolumeDown,
AudioVolumeMute,
AudioVolumeUp,
WakeUp,
Again,
Copy,
Cut,
Find,
Open,
Paste,
Props,
Select,
Undo,
Gamepad0,
Gamepad1,
Gamepad2,
Gamepad3,
Gamepad4,
Gamepad5,
Gamepad6,
Gamepad7,
Gamepad8,
Gamepad9,
Gamepad10,
Gamepad11,
Gamepad12,
Gamepad13,
Gamepad14,
Gamepad15,
Gamepad16,
Gamepad17,
Gamepad18,
Gamepad19,
BrightnessDown,
BrightnessUp,
DisplayToggleIntExt,
KeyboardLayoutSelect,
LaunchAssistant,
LaunchControlPanel,
LaunchScreenSaver,
MailForward,
MailReply,
MailSend,
MediaFastForward,
MediaPlay,
MediaPause,
MediaRecord,
MediaRewind,
MicrophoneMuteToggle,
PrivacyScreenToggle,
SelectTask,
ShowAllWindows,
ZoomToggle,
}Expand description
A key code represents a physical key on a keyboard and is independent of the
keyboard layout. The values are based on the UI Events KeyboardEvent code Values specification. There are some
additional values for Gamepad support and some browser specific values.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Backquote
Backtick and ~ on a US keyboard. This is the 半角/全角/漢字
(hankaku/zenkaku/kanji) key on Japanese keyboards
USB HID:
Keyboard Grave Accent and TildeKeyboard Page 0x35
Backslash
Used for both the US \| (on the 101-key layout) and also for the key
located between the " and Enter keys on row C of the 102-, 104- and
106-key layouts. Labelled #~ on a UK (102) keyboard.
USB HID:
Keyboard \ and |Keyboard Page 0x31Keyboard Non-US # and ~Keyboard Page 0x32
BracketLeft
[{ on a US keyboard.
USB HID:
Keyboard [ and {Keyboard Page 0x2f
BracketRight
]} on a US keyboard.
USB HID:
Keyboard ] and }Keyboard Page 0x30
Comma
,< on a US keyboard.
USB HID:
Keyboard , and <Keyboard Page 0x36
Digit0
0) on a US keyboard.
USB HID:
Keyboard 0 and )Keyboard Page 0x27
Digit1
1! on a US keyboard.
USB HID:
Keyboard 1 and !Keyboard Page 0x1e
Digit2
2@ on a US keyboard.
USB HID:
Keyboard 2 and @Keyboard Page 0x1f
Digit3
3# on a US keyboard.
USB HID:
Keyboard 3 and #Keyboard Page 0x20
Digit4
4$ on a US keyboard.
USB HID:
Keyboard 4 and $Keyboard Page 0x21
Digit5
5% on a US keyboard.
USB HID:
Keyboard 5 and %Keyboard Page 0x22
Digit6
6^ on a US keyboard.
USB HID:
Keyboard 6 and ^Keyboard Page 0x23
Digit7
7& on a US keyboard.
USB HID:
Keyboard 7 and &Keyboard Page 0x24
Digit8
8* on a US keyboard.
USB HID:
Keyboard 8 and *Keyboard Page 0x25
Digit9
9( on a US keyboard.
USB HID:
Keyboard 9 and (Keyboard Page 0x26
Equal
=+ on a US keyboard.
USB HID:
Keyboard = and +Keyboard Page 0x2e
IntlBackslash
Located between the left Shift and Z keys. Labelled \| on a UK
keyboard.
USB HID:
Keyboard Non-US \ and |Keyboard Page 0x64
IntlRo
Located between the / and right Shift keys. Labelled \ろ (ro) on
a Japanese keyboard.
USB HID:
Keyboard International1Keyboard Page 0x87
IntlYen
Located between the = and Backspace keys. Labelled ¥ (yen) on a
Japanese keyboard. \/ on a Russian keyboard.
USB HID:
Keyboard International3Keyboard Page 0x89
KeyA
a on a US keyboard. Labelled q on an AZERTY (e.g., French) keyboard.
USB HID:
Keyboard a and AKeyboard Page 0x4
KeyB
b on a US keyboard.
USB HID:
Keyboard b and BKeyboard Page 0x5
KeyC
c on a US keyboard.
USB HID:
Keyboard c and CKeyboard Page 0x6
KeyD
d on a US keyboard.
USB HID:
Keyboard d and DKeyboard Page 0x7
KeyE
e on a US keyboard.
USB HID:
Keyboard e and EKeyboard Page 0x8
KeyF
f on a US keyboard.
USB HID:
Keyboard f and FKeyboard Page 0x9
KeyG
g on a US keyboard.
USB HID:
Keyboard g and GKeyboard Page 0xa
KeyH
h on a US keyboard.
USB HID:
Keyboard h and HKeyboard Page 0xb
KeyI
i on a US keyboard.
USB HID:
Keyboard i and IKeyboard Page 0xc
KeyJ
j on a US keyboard.
USB HID:
Keyboard j and JKeyboard Page 0xd
KeyK
k on a US keyboard.
USB HID:
Keyboard k and KKeyboard Page 0xe
KeyL
l on a US keyboard.
USB HID:
Keyboard l and LKeyboard Page 0xf
KeyM
m on a US keyboard.
USB HID:
Keyboard m and MKeyboard Page 0x10
KeyN
n on a US keyboard.
USB HID:
Keyboard n and NKeyboard Page 0x11
KeyO
o on a US keyboard.
USB HID:
Keyboard o and OKeyboard Page 0x12
KeyP
p on a US keyboard.
USB HID:
Keyboard p and PKeyboard Page 0x13
KeyQ
q on a US keyboard. Labelled a on an AZERTY (e.g., French) keyboard.
USB HID:
Keyboard q and QKeyboard Page 0x14
KeyR
r on a US keyboard.
USB HID:
Keyboard r and RKeyboard Page 0x15
KeyS
s on a US keyboard.
USB HID:
Keyboard s and SKeyboard Page 0x16
KeyT
t on a US keyboard.
USB HID:
Keyboard t and TKeyboard Page 0x17
KeyU
u on a US keyboard.
USB HID:
Keyboard u and UKeyboard Page 0x18
KeyV
v on a US keyboard.
USB HID:
Keyboard v and VKeyboard Page 0x19
KeyW
w on a US keyboard. Labelled z on an AZERTY (e.g., French) keyboard.
USB HID:
Keyboard w and WKeyboard Page 0x1a
KeyX
x on a US keyboard.
USB HID:
Keyboard x and XKeyboard Page 0x1b
KeyY
y on a US keyboard. Labelled z on a QWERTZ (e.g., German) keyboard.
USB HID:
Keyboard y and YKeyboard Page 0x1c
KeyZ
z on a US keyboard. Labelled w on an AZERTY (e.g., French) keyboard,
and y on a QWERTZ (e.g., German) keyboard.
USB HID:
Keyboard z and ZKeyboard Page 0x1d
Minus
-_ on a US keyboard.
USB HID:
Keyboard - and (underscore)Keyboard Page 0x2d
Period
.> on a US keyboard.
USB HID:
Keyboard . and >Keyboard Page 0x37
Quote
'" on a US keyboard.
USB HID:
Keyboard ‘ and “Keyboard Page 0x34
Semicolon
;: on a US keyboard.
USB HID:
Keyboard ; and :Keyboard Page 0x33
Slash
/? on a US keyboard.
USB HID:
Keyboard / and ?Keyboard Page 0x38
AltLeft
Alt, Option or
⌥.
USB HID:
Keyboard LeftAltKeyboard Page 0xe2
AltRight
Alt, Option or ⌥. This is labelled AltGr key on many keyboard
layouts.
USB HID:
Keyboard RightAltKeyboard Page 0xe6
Backspace
Backspace or ⌫. Labelled Delete on Apple keyboards.
USB HID:
Keyboard DELETE (Backspace)Keyboard Page 0x2a
CapsLock
CapsLock or ⇪
USB HID:
Keyboard Caps LockKeyboard Page 0x39
ContextMenu
The application context menu key, which is typically found between the
right Meta key and the right Control key.
USB HID:
Keyboard ApplicationKeyboard Page 0x65
ControlLeft
Control or ⌃
USB HID:
Keyboard LeftControlKeyboard Page 0xe0
ControlRight
Control or ⌃
USB HID:
Keyboard RightControlKeyboard Page 0xe4
Enter
Enter or ↵. Labelled Return on Apple keyboards.
USB HID:
Keyboard Return (ENTER)Keyboard Page 0x28Enter ChannelConsumer Page 0x84
MetaLeft
The Windows, ⌘, Command or other OS symbol key.
USB HID:
Keyboard Left GUIKeyboard Page 0xe3
MetaRight
The Windows, ⌘, Command or other OS symbol key.
USB HID:
Keyboard Right GUIKeyboard Page 0xe7
ShiftLeft
Shift or ⇧
USB HID:
Keyboard LeftShiftKeyboard Page 0xe1
ShiftRight
Shift or ⇧
USB HID:
Keyboard RightShiftKeyboard Page 0xe5
Space
(space)
USB HID:
Keyboard SpacebarKeyboard Page 0x2c
Tab
Tab or ⇥
USB HID:
Keyboard TabKeyboard Page 0x2b
Convert
Japanese: 変換 (henkan)
USB HID:
Keyboard International4Keyboard Page 0x8a
KanaMode
Japanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji)
USB HID:
Keyboard International2Keyboard Page 0x88
Lang1
Korean: HangulMode 한/영 (han/yeong)
Japanese (Mac keyboard): かな (kana)
USB HID:
Keyboard LANG1Keyboard Page 0x90
Lang2
Korean: Hanja 한자 (hanja)
Japanese (Mac keyboard): 英数 (eisu)
USB HID:
Keyboard LANG2Keyboard Page 0x91
Lang3
Japanese (word-processing keyboard): Katakana
USB HID:
Keyboard LANG3Keyboard Page 0x92
Lang4
Japanese (word-processing keyboard): Hiragana
USB HID:
Keyboard LANG4Keyboard Page 0x93
Lang5
Japanese (word-processing keyboard): Zenkaku/Hankaku
USB HID:
Keyboard LANG5Keyboard Page 0x94
NonConvert
Japanese: 無変換 (muhenkan)
USB HID:
Keyboard International5Keyboard Page 0x8b
Delete
⌦. The forward delete key. Note that on Apple keyboards, the key
labelled Delete on the main part of the keyboard should be encoded as
"Backspace".
USB HID:
Keyboard Delete ForwardKeyboard Page 0x4cKeyboard ClearKeyboard Page 0x9cKeypad ClearKeyboard Page 0xd8AC DeleteConsumer Page 0x26a
End
Page Down, End or ↘
USB HID:
Keyboard EndKeyboard Page 0x4d
Help
Help. Not present on standard PC keyboards.
USB HID:
Keyboard HelpKeyboard Page 0x75HelpConsumer Page 0x95AL Integrated Help CenterConsumer Page 0x1a6
Home
Home or ↖
USB HID:
Keyboard HomeKeyboard Page 0x4a
Insert
Insert or Ins. Not present on Apple keyboards.
USB HID:
Keyboard InsertKeyboard Page 0x49AC Insert ModeConsumer Page 0x269
PageDown
Page Down, PgDn or ⇟
USB HID:
Keyboard PageDownKeyboard Page 0x4e
PageUp
Page Up, PgUp or
⇞
USB HID:
Keyboard PageUpKeyboard Page 0x4b
ArrowDown
↓
USB HID:
Keyboard DownArrowKeyboard Page 0x51Menu DownConsumer Page 0x43
ArrowLeft
←
USB HID:
Keyboard LeftArrowKeyboard Page 0x50Menu LeftConsumer Page 0x44
ArrowRight
→
USB HID:
Keyboard RightArrowKeyboard Page 0x4fMenu RightConsumer Page 0x45
ArrowUp
↑
USB HID:
Keyboard UpArrowKeyboard Page 0x52Menu UpConsumer Page 0x42
NumLock
On the Mac, the "NumLock" code should be used for the numpad Clear
key.
USB HID:
Keypad Num Lock and ClearKeyboard Page 0x53
Numpad0
0 Ins on a keyboard
0 on a phone or remote control
USB HID:
Keypad 0 and InsertKeyboard Page 0x62Phone Key 0Telephony Device Page 0xb0
Numpad1
1 End on a keyboard
1 or 1 QZ on a phone or remote control
USB HID:
Keypad 1 and EndKeyboard Page 0x59Phone Key 1Telephony Device Page 0xb1
Numpad2
2 ↓ on a keyboard
2 ABC on a phone or remote control
USB HID:
Keypad 2 and Down ArrowKeyboard Page 0x5aPhone Key 2Telephony Device Page 0xb2
Numpad3
3 PgDn on a keyboard
3 DEF on a phone or remote control
USB HID:
Keypad 3 and PageDnKeyboard Page 0x5bPhone Key 3Telephony Device Page 0xb3
Numpad4
4 ← on a keyboard
4 GHI on a phone or remote control
USB HID:
Keypad 4 and Left ArrowKeyboard Page 0x5cPhone Key 4Telephony Device Page 0xb4
Numpad5
5 on a keyboard
5 JKL on a phone or remote control
USB HID:
Keypad 5Keyboard Page 0x5dPhone Key 5Telephony Device Page 0xb5
Numpad6
6 → on a keyboard
6 MNO on a phone or remote control
USB HID:
Keypad 6 and Right ArrowKeyboard Page 0x5ePhone Key 6Telephony Device Page 0xb6
Numpad7
7 Home on a keyboard
7 PQRS or 7 PRS on a phone or remote control
USB HID:
Keypad 7 and HomeKeyboard Page 0x5fPhone Key 7Telephony Device Page 0xb7
Numpad8
8 ↑ on a keyboard
8 TUV on a phone or remote control
USB HID:
Keypad 8 and Up ArrowKeyboard Page 0x60Phone Key 8Telephony Device Page 0xb8
Numpad9
9 PgUp on a keyboard
9 WXYZ or 9 WXY on a phone or remote control
USB HID:
Keypad 9 and PageUpKeyboard Page 0x61Phone Key 9Telephony Device Page 0xb9
NumpadAdd
+
USB HID:
Keypad +Keyboard Page 0x57Menu Value IncreaseConsumer Page 0x47
NumpadBackspace
Found on the Microsoft Natural Keyboard.
USB HID:
Keypad BackspaceKeyboard Page 0xbb
NumpadClear
C or AC (All Clear). Also for use with numpads that have a Clear
key that is separate from the NumLock key. On the Mac, the numpad
Clear key should always be encoded as "NumLock".
USB HID:
Keypad ClearKeyboard Page 0xd8
NumpadClearEntry
CE (Clear Entry)
USB HID:
Keypad Clear EntryKeyboard Page 0xd9
NumpadComma
, (thousands separator). For locales where the thousands separator is
a “.” (e.g., Brazil), this key may generate a ..
USB HID:
Keypad CommaKeyboard Page 0x85
NumpadDecimal
. Del. For locales where the decimal separator is “,” (e.g., Brazil),
this key may generate a ,.
USB HID:
Keypad . and DeleteKeyboard Page 0x63
NumpadDivide
/
USB HID:
Keypad /Keyboard Page 0x54
NumpadEnter
USB HID:
Keypad ENTERKeyboard Page 0x58
NumpadEqual
=
USB HID:
Keypad =Keyboard Page 0x67
NumpadHash
# on a phone or remote control device. This key is typically found
below the 9 key and to the right of the 0 key.
USB HID:
Phone Key PoundTelephony Device Page 0xbb
NumpadMemoryAdd
M+ Add current entry to the value stored in memory.
USB HID:
Keypad Memory AddKeyboard Page 0xd3
NumpadMemoryClear
MC Clear the value stored in memory.
USB HID:
Keypad Memory ClearKeyboard Page 0xd2
NumpadMemoryRecall
MR Replace the current entry with the value stored in memory.
USB HID:
Keypad Memory RecallKeyboard Page 0xd1
NumpadMemoryStore
MS Replace the value stored in memory with the current entry.
USB HID:
Keypad Memory StoreKeyboard Page 0xd0
NumpadMemorySubtract
M- Subtract current entry from the value
stored in memory.
USB HID:
Keypad Memory SubtractKeyboard Page 0xd4
NumpadMultiply
* on a keyboard. For use with numpads that provide mathematical
operations (+, -, * and /).
Use KeyCode::NumpadStar for the * key on phones and remote controls.
USB HID:
Keypad *Keyboard Page 0x55
NumpadParenLeft
( Found on the Microsoft Natural Keyboard.
USB HID:
Keypad (Keyboard Page 0xb6
NumpadParenRight
) Found on the Microsoft Natural Keyboard.
USB HID:
Keypad )Keyboard Page 0xb7
NumpadStar
* on a phone or remote control device. This key is typically found
below the 7 key and to the left of the 0 key.
Use KeyCode::NumpadMultiply for the * key on numeric keypads.
USB HID:
Phone Key StarTelephony Device Page 0xba
NumpadSubtract
-
USB HID:
Keypad -Keyboard Page 0x56Menu Value DecreaseConsumer Page 0x48
Escape
Esc or ⎋
USB HID:
Keyboard ESCAPEKeyboard Page 0x29Menu EscapeConsumer Page 0x46
F1
F1
USB HID:
Keyboard F1Keyboard Page 0x3a
F2
F2
USB HID:
Keyboard F2Keyboard Page 0x3b
F3
F3
USB HID:
Keyboard F3Keyboard Page 0x3c
F4
F4
USB HID:
Keyboard F4Keyboard Page 0x3d
F5
F5
USB HID:
Keyboard F5Keyboard Page 0x3e
F6
F6
USB HID:
Keyboard F6Keyboard Page 0x3f
F7
F7
USB HID:
Keyboard F7Keyboard Page 0x40
F8
F8
USB HID:
Keyboard F8Keyboard Page 0x41
F9
F9
USB HID:
Keyboard F9Keyboard Page 0x42
F10
F10
USB HID:
Keyboard F10Keyboard Page 0x43
F11
F11
USB HID:
Keyboard F11Keyboard Page 0x44
F12
F12
USB HID:
Keyboard F12Keyboard Page 0x45
F13
F13
USB HID:
Keyboard F13Keyboard Page 0x68
F14
F14
USB HID:
Keyboard F14Keyboard Page 0x69
F15
F15
USB HID:
Keyboard F15Keyboard Page 0x6a
F16
F16
USB HID:
Keyboard F16Keyboard Page 0x6b
F17
F17
USB HID:
Keyboard F17Keyboard Page 0x6c
F18
F18
USB HID:
Keyboard F18Keyboard Page 0x6d
F19
F19
USB HID:
Keyboard F19Keyboard Page 0x6e
F20
F20
USB HID:
Keyboard F20Keyboard Page 0x6f
F21
F21
USB HID:
Keyboard F21Keyboard Page 0x70
F22
F22
USB HID:
Keyboard F22Keyboard Page 0x71
F23
F23
USB HID:
Keyboard F23Keyboard Page 0x72
F24
F24
USB HID:
Keyboard F24Keyboard Page 0x73
Fn
Fn This is typically a hardware key that does not generate a separate
code. Most keyboards do not place this key in the function section, but
it is included here to keep it with related keys.
USB HID:
FnLock
FLock or FnLock. Function Lock key. Found on the Microsoft Natural
Keyboard.
USB HID:
PrintScreen
PrtScr SysRq or Print Screen
USB HID:
Keyboard PrintScreenKeyboard Page 0x46
ScrollLock
Scroll Lock
USB HID:
Keyboard Scroll LockKeyboard Page 0x47
Pause
Pause Break
USB HID:
Keyboard PauseKeyboard Page 0x48PauseConsumer Page 0xb1
BrowserBack
Some laptops place this key to the left of the ↑ key.
USB HID:
ReservedKeyboard Page 0xf1AC BackConsumer Page 0x224
BrowserFavorites
USB HID:
AL Programmable Button ConfigurationConsumer Page 0x182AC BookmarksConsumer Page 0x22a
BrowserForward
Some laptops place this key to the right of the ↑ key.
USB HID:
ReservedKeyboard Page 0xf2AC ForwardConsumer Page 0x225
BrowserHome
USB HID:
AC HomeConsumer Page 0x223
BrowserRefresh
USB HID:
ReservedKeyboard Page 0xfaAC RefreshConsumer Page 0x227
BrowserSearch
USB HID:
AC SearchConsumer Page 0x221
BrowserStop
USB HID:
Keyboard StopKeyboard Page 0x78ReservedKeyboard Page 0xf3AC StopConsumer Page 0x226
Eject
Eject or ⏏. This key is placed in the function section on some Apple
keyboards.
USB HID:
ReservedKeyboard Page 0xecEjectConsumer Page 0xb8
LaunchApp1
Sometimes labelled My Computer on the keyboard
USB HID:
AL Local Machine BrowserConsumer Page 0x194AL File BrowserConsumer Page 0x1b4
LaunchApp2
Sometimes labelled Calculator on the keyboard
USB HID:
ReservedKeyboard Page 0xfbAL CalculatorConsumer Page 0x192
LaunchMail
USB HID:
AL Email ReaderConsumer Page 0x18a
MediaPlayPause
USB HID:
ReservedKeyboard Page 0xe8Play/PauseConsumer Page 0xcd
MediaSelect
USB HID:
AL Consumer Control ConfigurationConsumer Page 0x183
MediaStop
USB HID:
ReservedKeyboard Page 0xe9StopConsumer Page 0xb7
MediaTrackNext
USB HID:
ReservedKeyboard Page 0xebScan Next TrackConsumer Page 0xb5
MediaTrackPrevious
USB HID:
ReservedKeyboard Page 0xeaScan Previous TrackConsumer Page 0xb6
Power
This key is placed in the function section on some Apple keyboards,
replacing the Eject key.
USB HID:
Keyboard PowerKeyboard Page 0x66PowerConsumer Page 0x30
Sleep
USB HID:
ReservedKeyboard Page 0xf8SleepConsumer Page 0x32Sleep ModeConsumer Page 0x34
AudioVolumeDown
USB HID:
Keyboard Volume DownKeyboard Page 0x81ReservedKeyboard Page 0xeeVolume DecrementConsumer Page 0xea
AudioVolumeMute
USB HID:
Keyboard MuteKeyboard Page 0x7fReservedKeyboard Page 0xefMuteConsumer Page 0xe2
AudioVolumeUp
USB HID:
Keyboard Volume UpKeyboard Page 0x80ReservedKeyboard Page 0xedVolume IncrementConsumer Page 0xe9
WakeUp
USB HID:
System Wake UpGeneric Desktop Page 0x83
Again
Found on Sun’s USB keyboard.
USB HID:
Keyboard AgainKeyboard Page 0x79
Copy
Found on Sun’s USB keyboard.
USB HID:
Keyboard CopyKeyboard Page 0x7cAC CopyConsumer Page 0x21b
Cut
Found on Sun’s USB keyboard.
USB HID:
Keyboard CutKeyboard Page 0x7bAC CutConsumer Page 0x21c
Find
Found on Sun’s USB keyboard.
USB HID:
Keyboard FindKeyboard Page 0x7eReservedKeyboard Page 0xf4AC FindConsumer Page 0x21f
Open
Found on Sun’s USB keyboard.
USB HID:
Keyboard ExecuteKeyboard Page 0x74AC OpenConsumer Page 0x202
Paste
Found on Sun’s USB keyboard.
USB HID:
Keyboard PasteKeyboard Page 0x7dAC PasteConsumer Page 0x21d
Props
Found on Sun’s USB keyboard.
USB HID:
Keyboard MenuKeyboard Page 0x76AC PropertiesConsumer Page 0x209
Select
Found on Sun’s USB keyboard.
USB HID:
Keyboard SelectKeyboard Page 0x77
Undo
Found on Sun’s USB keyboard.
USB HID:
Keyboard UndoKeyboard Page 0x7aAC UndoConsumer Page 0x21a
Gamepad0
USB HID:
Button 1 (primary/trigger)Button Page 0x1
Gamepad1
USB HID:
Button 2 (secondary)Button Page 0x2
Gamepad2
USB HID:
Button 3 (tertiary)Button Page 0x3
Gamepad3
USB HID:
Button 4Button Page 0x4
Gamepad4
USB HID:
Button 5Button Page 0x5
Gamepad5
USB HID:
Button 6Button Page 0x6
Gamepad6
USB HID:
Button 7Button Page 0x7
Gamepad7
USB HID:
Button 8Button Page 0x8
Gamepad8
USB HID:
Button 9Button Page 0x9
Gamepad9
USB HID:
Button 10Button Page 0xa
Gamepad10
USB HID:
Button 11Button Page 0xb
Gamepad11
USB HID:
Button 12Button Page 0xc
Gamepad12
USB HID:
Button 13Button Page 0xd
Gamepad13
USB HID:
Button 14Button Page 0xe
Gamepad14
USB HID:
Button 15Button Page 0xf
Gamepad15
USB HID:
Button 16Button Page 0x10
Gamepad16
USB HID:
Button 17Button Page 0x11
Gamepad17
USB HID:
Button 18Button Page 0x12
Gamepad18
USB HID:
Button 19Button Page 0x13
Gamepad19
USB HID:
Button 20Button Page 0x14
BrightnessDown
Non-standard code value supported by Chromium.
USB HID:
Display Brightness DecrementConsumer Page 0x70
BrightnessUp
Non-standard code value supported by Chromium.
USB HID:
Display Brightness IncrementConsumer Page 0x6f
DisplayToggleIntExt
Non-standard code value supported by Chromium.
USB HID:
System Display Toggle Int/Ext ModeGeneric Desktop Page 0xb5
KeyboardLayoutSelect
Non-standard code value supported by Chromium.
USB HID:
AC Next Keyboard Layout SelectConsumer Page 0x29d
LaunchAssistant
Non-standard code value supported by Chromium.
USB HID:
AL Context-aware Desktop AssistantConsumer Page 0x1cb
LaunchControlPanel
Non-standard code value supported by Chromium.
USB HID:
AL Control PanelConsumer Page 0x19f
LaunchScreenSaver
Non-standard code value supported by Chromium.
USB HID:
AL Screen SaverConsumer Page 0x1b1
MailForward
Non-standard code value supported by Chromium.
USB HID:
AC Forward MsgConsumer Page 0x28b
MailReply
Non-standard code value supported by Chromium.
USB HID:
AC ReplyConsumer Page 0x289
MailSend
Non-standard code value supported by Chromium.
USB HID:
AC SendConsumer Page 0x28c
MediaFastForward
Non-standard code value supported by Chromium.
USB HID:
Fast ForwardConsumer Page 0xb3
MediaPlay
Non-standard code value supported by Chromium.
USB HID:
PlayConsumer Page 0xb0
MediaPause
Non-standard code value supported by Chromium.
USB HID:
PauseConsumer Page 0xb1
MediaRecord
Non-standard code value supported by Chromium.
USB HID:
RecordConsumer Page 0xb2
MediaRewind
Non-standard code value supported by Chromium.
USB HID:
RewindConsumer Page 0xb4
MicrophoneMuteToggle
Non-standard code value supported by Chromium.
USB HID:
Phone MuteTelephony Device Page 0x2f
PrivacyScreenToggle
Non-standard code value supported by Chromium.
USB HID:
Privacy Screen ToggleConsumer Page 0x2d0
SelectTask
Non-standard code value supported by Chromium.
USB HID:
AL Select Task/ApplicationConsumer Page 0x1a2
ShowAllWindows
Non-standard code value supported by Chromium.
USB HID:
AC Desktop Show All WindowsConsumer Page 0x29f
ZoomToggle
Non-standard code value supported by Chromium.
USB HID:
AC View ToggleConsumer Page 0x232
Implementations§
Source§impl KeyCode
impl KeyCode
Sourcepub fn with_modifiers(self, modifiers: Modifiers) -> Hotkey
pub fn with_modifiers(self, modifiers: Modifiers) -> Hotkey
Combines the key code with the modifiers to form a Hotkey.
Sourcepub const fn resolve_en_us(self) -> &'static str
pub const fn resolve_en_us(self) -> &'static str
Resolve the KeyCode according to the standard US layout.
Sourcepub const fn classify(self) -> KeyCodeClass
pub const fn classify(self) -> KeyCodeClass
Classifies a key based on its grouping on the Keyboard.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyCode
impl<'de> Deserialize<'de> for KeyCode
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Copy for KeyCode
impl Eq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations§
impl Freeze for KeyCode
impl RefUnwindSafe for KeyCode
impl Send for KeyCode
impl Sync for KeyCode
impl Unpin for KeyCode
impl UnwindSafe for KeyCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.