Keycode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates values returned by several types and taken as a parameter of several types.
public enum Keycode
type Keycode =
- Inheritance
-
Keycode
Fields
Name | Value | Description |
---|---|---|
Unknown | 0 | Key code constant: Unknown key code. |
SoftLeft | 1 | |
SoftRight | 2 | |
Home | 3 | Key code constant: Home key. This key is handled by the framework and is never delivered to applications. |
Back | 4 | Key code constant: Back key. |
Call | 5 | Key code constant: Call key. |
Endcall | 6 | Key code constant: End Call key. |
Num0 | 7 | Key code constant: '0' key. |
Num1 | 8 | Key code constant: '1' key. |
Num2 | 9 | Key code constant: '2' key. |
Num3 | 10 | Key code constant: '3' key. |
Num4 | 11 | Key code constant: '4' key. |
Num5 | 12 | Key code constant: '5' key. |
Num6 | 13 | Key code constant: '6' key. |
Num7 | 14 | Key code constant: '7' key. |
Num8 | 15 | Key code constant: '8' key. |
Num9 | 16 | Key code constant: '9' key. |
Star | 17 | Key code constant: '*' key. |
Pound | 18 | Key code constant: '#' key. |
DpadUp | 19 | Key code constant: Directional Pad Up key. May also be synthesized from trackball motions. |
DpadDown | 20 | Key code constant: Directional Pad Down key. May also be synthesized from trackball motions. |
DpadLeft | 21 | Key code constant: Directional Pad Left key. May also be synthesized from trackball motions. |
DpadRight | 22 | Key code constant: Directional Pad Right key. May also be synthesized from trackball motions. |
DpadCenter | 23 | Key code constant: Directional Pad Center key. May also be synthesized from trackball motions. |
VolumeUp | 24 | Key code constant: Volume Up key. Adjusts the speaker volume up. |
VolumeDown | 25 | Key code constant: Volume Down key. Adjusts the speaker volume down. |
Power | 26 | Key code constant: Power key. |
Camera | 27 | Key code constant: Camera key. Used to launch a camera application or take pictures. |
Clear | 28 | Key code constant: Clear key. |
A | 29 | Key code constant: 'A' key. |
B | 30 | Key code constant: 'B' key. |
C | 31 | Key code constant: 'C' key. |
D | 32 | Key code constant: 'D' key. |
E | 33 | Key code constant: 'E' key. |
F | 34 | Key code constant: 'F' key. |
G | 35 | Key code constant: 'G' key. |
H | 36 | Key code constant: 'H' key. |
I | 37 | Key code constant: 'I' key. |
J | 38 | Key code constant: 'J' key. |
K | 39 | Key code constant: 'K' key. |
L | 40 | Key code constant: 'L' key. |
M | 41 | Key code constant: 'M' key. |
N | 42 | Key code constant: 'N' key. |
O | 43 | Key code constant: 'O' key. |
P | 44 | Key code constant: 'P' key. |
Q | 45 | Key code constant: 'Q' key. |
R | 46 | Key code constant: 'R' key. |
S | 47 | Key code constant: 'S' key. |
T | 48 | Key code constant: 'T' key. |
U | 49 | Key code constant: 'U' key. |
V | 50 | Key code constant: 'V' key. |
W | 51 | Key code constant: 'W' key. |
X | 52 | Key code constant: 'X' key. |
Y | 53 | Key code constant: 'Y' key. |
Z | 54 | Key code constant: 'Z' key. |
Comma | 55 | Key code constant: ',' key. |
Period | 56 | Key code constant: '.' key. |
AltLeft | 57 | Key code constant: Left Alt modifier key. |
AltRight | 58 | Key code constant: Right Alt modifier key. |
ShiftLeft | 59 | Key code constant: Left Shift modifier key. |
ShiftRight | 60 | Key code constant: Right Shift modifier key. |
Tab | 61 | Key code constant: Tab key. |
Space | 62 | Key code constant: Space key. |
Sym | 63 | Key code constant: Symbol modifier key. Used to enter alternate symbols. |
Explorer | 64 | Key code constant: Explorer special function key. Used to launch a browser application. |
Envelope | 65 | Key code constant: Envelope special function key. Used to launch a mail application. |
Enter | 66 | Key code constant: Enter key. |
Del | 67 | Key code constant: Backspace key. Deletes characters before the insertion point, unlike ForwardDel. |
Grave | 68 | Key code constant: '`' (backtick) key. |
Minus | 69 | Key code constant: '-'. |
Equals | 70 | Key code constant: '=' key. |
LeftBracket | 71 | Key code constant: '[' key. |
RightBracket | 72 | Key code constant: ']' key. |
Backslash | 73 | Key code constant: '' key. |
Semicolon | 74 | Key code constant: ';' key. |
Apostrophe | 75 | Key code constant: ''' (apostrophe) key. |
Slash | 76 | Key code constant: '/' key. |
At | 77 | Key code constant: '@' key. |
Num | 78 | |
Headsethook | 79 | Key code constant: Headset Hook key. Used to hang up calls and stop media. |
Focus | 80 | Key code constant: Camera Focus key. Used to focus the camera. |
Plus | 81 | Key code constant: '+' key. |
Menu | 82 | Key code constant: Menu key. |
Notification | 83 | Key code constant: Notification key. |
Search | 84 | Key code constant: Search key. |
MediaPlayPause | 85 | Key code constant: Play/Pause media key. |
MediaStop | 86 | Key code constant: Stop media key. |
MediaNext | 87 | Key code constant: Play Next media key. |
MediaPrevious | 88 | Key code constant: Play Previous media key. |
MediaRewind | 89 | Key code constant: Rewind media key. |
MediaFastForward | 90 | Key code constant: Fast Forward media key. |
Mute | 91 | Key code constant: Mute key. Mutes the microphone, unlike VolumeMute. |
PageUp | 92 | Key code constant: Page Up key. |
PageDown | 93 | Key code constant: Page Down key. |
Pictsymbols | 94 | Key code constant: Picture Symbols modifier key. Used to switch symbol sets (Emoji, Kao-moji). |
SwitchCharset | 95 | Key code constant: Switch Charset modifier key. Used to switch character sets (Kanji, Katakana). |
ButtonA | 96 | Key code constant: A Button key. On a game controller, the A button should be either the button labeled A or the first button on the bottom row of controller buttons. |
ButtonB | 97 | Key code constant: B Button key. On a game controller, the B button should be either the button labeled B or the second button on the bottom row of controller buttons. |
ButtonC | 98 | Key code constant: C Button key. On a game controller, the C button should be either the button labeled C or the third button on the bottom row of controller buttons. |
ButtonX | 99 | Key code constant: X Button key. On a game controller, the X button should be either the button labeled X or the first button on the upper row of controller buttons. |
ButtonY | 100 | Key code constant: Y Button key. On a game controller, the Y button should be either the button labeled Y or the second button on the upper row of controller buttons. |
ButtonZ | 101 | Key code constant: Z Button key. On a game controller, the Z button should be either the button labeled Z or the third button on the upper row of controller buttons. |
ButtonL1 | 102 | Key code constant: L1 Button key. On a game controller, the L1 button should be either the button labeled L1 (or L) or the top left trigger button. |
ButtonR1 | 103 | Key code constant: R1 Button key. On a game controller, the R1 button should be either the button labeled R1 (or R) or the top right trigger button. |
ButtonL2 | 104 | Key code constant: L2 Button key. On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button. |
ButtonR2 | 105 | Key code constant: R2 Button key. On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button. |
ButtonThumbl | 106 | Key code constant: Left Thumb Button key. On a game controller, the left thumb button indicates that the left (or only) joystick is pressed. |
ButtonThumbr | 107 | Key code constant: Right Thumb Button key. On a game controller, the right thumb button indicates that the right joystick is pressed. |
ButtonStart | 108 | Key code constant: Start Button key. On a game controller, the button labeled Start. |
ButtonSelect | 109 | Key code constant: Select Button key. On a game controller, the button labeled Select. |
ButtonMode | 110 | Key code constant: Mode Button key. On a game controller, the button labeled Mode. |
Escape | 111 | Key code constant: Escape key. |
ForwardDel | 112 | Key code constant: Forward Delete key. Deletes characters ahead of the insertion point, unlike Del. |
CtrlLeft | 113 | Key code constant: Left Control modifier key. |
CtrlRight | 114 | Key code constant: Right Control modifier key. |
CapsLock | 115 | Key code constant: Caps Lock key. |
ScrollLock | 116 | Key code constant: Scroll Lock key. |
MetaLeft | 117 | Key code constant: Left Meta modifier key. |
MetaRight | 118 | Key code constant: Right Meta modifier key. |
Function | 119 | Key code constant: Function modifier key. |
Sysrq | 120 | Key code constant: System Request / Print Screen key. |
Break | 121 | Key code constant: Break / Pause key. |
MoveHome | 122 | Key code constant: Home Movement key. Used for scrolling or moving the cursor around to the start of a line or to the top of a list. |
MoveEnd | 123 | Key code constant: End Movement key. Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list. |
Insert | 124 | Key code constant: Insert key. Toggles insert / overwrite edit mode. |
Forward | 125 | Key code constant: Forward key. Navigates forward in the history stack. |
MediaPlay | 126 | Key code constant: Play media key. |
MediaPause | 127 | Key code constant: Pause media key. |
MediaClose | 128 | Key code constant: Close media key. May be used to close a CD tray, for example. |
MediaEject | 129 | Key code constant: Eject media key. May be used to eject a CD tray, for example. |
MediaRecord | 130 | Key code constant: Record media key. |
F1 | 131 | Key code constant: F1 key. |
F2 | 132 | Key code constant: F2 key. |
F3 | 133 | Key code constant: F3 key. |
F4 | 134 | Key code constant: F4 key. |
F5 | 135 | Key code constant: F5 key. |
F6 | 136 | Key code constant: F6 key. |
F7 | 137 | Key code constant: F7 key. |
F8 | 138 | Key code constant: F8 key. |
F9 | 139 | Key code constant: F9 key. |
F10 | 140 | Key code constant: F10 key. |
F11 | 141 | Key code constant: F11 key. |
F12 | 142 | Key code constant: F12 key. |
NumLock | 143 | Key code constant: Num Lock key. This is the Num Lock key; it is different from Num. This key alters the behavior of other keys on the numeric keypad. |
Numpad0 | 144 | Key code constant: Numeric keypad '0' key. |
Numpad1 | 145 | Key code constant: Numeric keypad '1' key. |
Numpad2 | 146 | Key code constant: Numeric keypad '2' key. |
Numpad3 | 147 | Key code constant: Numeric keypad '3' key. |
Numpad4 | 148 | Key code constant: Numeric keypad '4' key. |
Numpad5 | 149 | Key code constant: Numeric keypad '5' key. |
Numpad6 | 150 | Key code constant: Numeric keypad '6' key. |
Numpad7 | 151 | Key code constant: Numeric keypad '7' key. |
Numpad8 | 152 | Key code constant: Numeric keypad '8' key. |
Numpad9 | 153 | Key code constant: Numeric keypad '9' key. |
NumpadDivide | 154 | Key code constant: Numeric keypad '/' key (for division). |
NumpadMultiply | 155 | Key code constant: Numeric keypad '*' key (for multiplication). |
NumpadSubtract | 156 | Key code constant: Numeric keypad '-' key (for subtraction). |
NumpadAdd | 157 | Key code constant: Numeric keypad '+' key (for addition). |
NumpadDot | 158 | Key code constant: Numeric keypad '.' key (for decimals or digit grouping). |
NumpadComma | 159 | Key code constant: Numeric keypad ',' key (for decimals or digit grouping). |
NumpadEnter | 160 | Key code constant: Numeric keypad Enter key. |
NumpadEquals | 161 | Key code constant: Numeric keypad '=' key. |
NumpadLeftParen | 162 | Key code constant: Numeric keypad '(' key. |
NumpadRightParen | 163 | Key code constant: Numeric keypad ')' key. |
VolumeMute | 164 | |
Info | 165 | Key code constant: Info key. Common on TV remotes to show additional information related to what is currently being viewed. |
ChannelUp | 166 | Key code constant: Channel up key. On TV remotes, increments the television channel. |
ChannelDown | 167 | Key code constant: Channel down key. On TV remotes, decrements the television channel. |
ZoomIn | 168 | Key code constant: Zoom in key. |
ZoomOut | 169 | Key code constant: Zoom out key. |
Tv | 170 | Key code constant: TV key. On TV remotes, switches to viewing live TV. |
Window | 171 | Key code constant: Window key. On TV remotes, toggles picture-in-picture mode or other windowing functions. |
Guide | 172 | Key code constant: Guide key. On TV remotes, shows a programming guide. |
Dvr | 173 | Key code constant: DVR key. On some TV remotes, switches to a DVR mode for recorded shows. |
Bookmark | 174 | Key code constant: Bookmark key. On some TV remotes, bookmarks content or web pages. |
Captions | 175 | Key code constant: Toggle captions key. Switches the mode for closed-captioning text, for example during television shows. |
Settings | 176 | Key code constant: Settings key. Starts the system settings activity. |
TvPower | 177 | Key code constant: TV power key. On TV remotes, toggles the power on a television screen. |
TvInput | 178 | Key code constant: TV input key. On TV remotes, switches the input on a television screen. |
StbPower | 179 | Key code constant: Set-top-box power key. On TV remotes, toggles the power on an external Set-top-box. |
StbInput | 180 | Key code constant: Set-top-box input key. On TV remotes, switches the input mode on an external Set-top-box. |
AvrPower | 181 | Key code constant: A/V Receiver power key. On TV remotes, toggles the power on an external A/V Receiver. |
AvrInput | 182 | Key code constant: A/V Receiver input key. On TV remotes, switches the input mode on an external A/V Receiver. |
ProgRed | 183 | Key code constant: Red "programmable" key. On TV remotes, acts as a contextual/programmable key. |
ProgGreen | 184 | Key code constant: Green "programmable" key. On TV remotes, actsas a contextual/programmable key. |
ProgYellow | 185 | Key code constant: Yellow "programmable" key. On TV remotes, acts as a contextual/programmable key. |
ProgBlue | 186 | Key code constant: Blue "programmable" key. On TV remotes, acts as a contextual/programmable key. |
AppSwitch | 187 | Key code constant: App switch key. Should bring up the application switcher dialog. |
Button1 | 188 | Key code constant: Generic Game Pad Button #1. |
Button2 | 189 | Key code constant: Generic Game Pad Button #2. |
Button3 | 190 | Key code constant: Generic Game Pad Button #3. |
Button4 | 191 | Key code constant: Generic Game Pad Button #4. |
Button5 | 192 | Key code constant: Generic Game Pad Button #5. |
Button6 | 193 | Key code constant: Generic Game Pad Button #6. |
Button7 | 194 | Key code constant: Generic Game Pad Button #7. |
Button8 | 195 | Key code constant: Generic Game Pad Button #8. |
Button9 | 196 | Key code constant: Generic Game Pad Button #9. |
Button10 | 197 | Key code constant: Generic Game Pad Button #10. |
Button11 | 198 | Key code constant: Generic Game Pad Button #11. |
Button12 | 199 | Key code constant: Generic Game Pad Button #12. |
Button13 | 200 | Key code constant: Generic Game Pad Button #13. |
Button14 | 201 | Key code constant: Generic Game Pad Button #14. |
Button15 | 202 | Key code constant: Generic Game Pad Button #15. |
Button16 | 203 | Key code constant: Generic Game Pad Button #16. |
LanguageSwitch | 204 | Key code constant: Language Switch key. Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard. |
MannerMode | 205 | Key code constant: Manner Mode key. Toggles silent or vibrate mode on and off to make the device behave more politely in certain settings such as on a crowded train. |
ThreeDMode | 206 | Key code constant: 3D Mode key. Toggles the display between 2D and 3D mode. |
Contacts | 207 | Key code constant: Contacts special function key. Used to launch an address book application. |
Calendar | 208 | Key code constant: Calendar special function key. Used to launch a calendar application. |
Music | 209 | Key code constant: Music special function key. Used to launch a music player application. |
Calculator | 210 | Key code constant: Calculator special function key. Used to launch a calculator application. |
ZenkakuHankaku | 211 | Key code constant: Japanese full-width / half-width key. |
Eisu | 212 | Key code constant: Japanese alphanumeric key. |
Muhenkan | 213 | Key code constant: Japanese non-conversion key. |
Henkan | 214 | Key code constant: Japanese conversion key. |
KatakanaHiragana | 215 | Key code constant: Japanese katakana / hiragana key. |
Yen | 216 | Key code constant: Japanese Yen key. |
Ro | 217 | Key code constant: Japanese Ro key. |
Kana | 218 | Key code constant: Japanese kana key. |
Assist | 219 | Key code constant: Assist key. Launches the global assist activity. |
BrightnessDown | 220 | Key code constant: Brightness Down key. Adjusts the screen brightness down. |
BrightnessUp | 221 | Key code constant: Brightness Up key. Adjusts the screen brightness up. |
MediaAudioTrack | 222 | |
Sleep | 223 | |
Wakeup | 224 | |
Pairing | 225 | |
MediaTopMenu | 226 | |
K11 | 227 | |
K12 | 228 | |
LastChannel | 229 | |
TvDataService | 230 | |
VoiceAssist | 231 | |
TvRadioService | 232 | |
TvTeletext | 233 | |
TvNumberEntry | 234 | |
TvTerrestrialAnalog | 235 | |
TvTerrestrialDigital | 236 | |
TvSatellite | 237 | |
TvSatelliteBs | 238 | |
TvSatelliteCs | 239 | |
TvSatelliteService | 240 | |
TvNetwork | 241 | |
TvAntennaCable | 242 | |
TvInputHdmi1 | 243 | |
TvInputHdmi2 | 244 | |
TvInputHdmi3 | 245 | |
TvInputHdmi4 | 246 | |
TvInputComposite1 | 247 | |
TvInputComposite2 | 248 | |
TvInputComponent1 | 249 | |
TvInputComponent2 | 250 | |
TvInputVga1 | 251 | |
TvAudioDescription | 252 | |
TvAudioDescriptionMixUp | 253 | |
TvAudioDescriptionMixDown | 254 | |
TvZoomMode | 255 | |
TvContentsMenu | 256 | |
TvMediaContextMenu | 257 | |
TvTimerProgramming | 258 | |
Help | 259 | |
NavigatePrevious | 260 | |
NavigateNext | 261 | |
NavigateIn | 262 | |
NavigateOut | 263 | |
StemPrimary | 264 | |
Stem1 | 265 | |
Stem2 | 266 | |
Stem3 | 267 | |
DpadUpLeft | 268 | |
DpadDownLeft | 269 | |
DpadUpRight | 270 | |
DpadDownRight | 271 | |
MediaSkipForward | 272 | |
MediaSkipBackward | 273 | |
MediaStepForward | 274 | |
MediaStepBackward | 275 | |
SoftSleep | 276 | |
Cut | 277 | |
Copy | 278 | |
Paste | 279 | |
SystemNavigationUp | 280 | |
SystemNavigationDown | 281 | |
SystemNavigationLeft | 282 | |
SystemNavigationRight | 283 | |
AllApps | 284 | |
Refresh | 285 | |
ThumbsUp | 286 | |
ThumbsDown | 287 | |
ProfileSwitch | 288 | |
VideoApp1 | 289 | |
VideoApp2 | 290 | |
VideoApp3 | 291 | |
VideoApp4 | 292 | |
VideoApp5 | 293 | |
VideoApp6 | 294 | |
VideoApp7 | 295 | |
VideoApp8 | 296 | |
FeaturedApp1 | 297 | |
FeaturedApp2 | 298 | |
FeaturedApp3 | 299 | |
FeaturedApp4 | 300 | |
DemoApp1 | 301 | |
DemoApp2 | 302 | |
DemoApp3 | 303 | |
DemoApp4 | 304 | |
KeyboardBacklightDown | 305 | |
KeyboardBacklightUp | 306 | |
KeyboardBacklightToggle | 307 | |
StylusButtonPrimary | 308 | |
StylusButtonSecondary | 309 | |
StylusButtonTertiary | 310 | |
StylusButtonTail | 311 | |
RecentApps | 312 | |
Macro1 | 313 | |
Macro2 | 314 | |
Macro3 | 315 | |
Macro4 | 316 |
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.