Android Key Code Reference

Find a key by its name or category and read the corresponding Android constant. Check the Android API reference when version-specific availability matters.

Runs locally in your browser

Device & system keys

KEYCODE_CALLCall5
KEYCODE_ENDCALLEnd call6
KEYCODE_HOMEHome3
KEYCODE_MENUMenu82
KEYCODE_BACKBack4
KEYCODE_SEARCHSearch84
KEYCODE_CAMERACamera27
KEYCODE_FOCUSCamera focus80
KEYCODE_POWERPower26
KEYCODE_NOTIFICATIONNotifications83
KEYCODE_MUTEMicrophone mute91
KEYCODE_VOLUME_MUTESpeaker mute164
KEYCODE_VOLUME_UPVolume up24
KEYCODE_VOLUME_DOWNVolume down25

Navigation & editing

KEYCODE_ENTEREnter66
KEYCODE_ESCAPEEscape111
KEYCODE_DPAD_CENTERD-pad center23
KEYCODE_DPAD_UPD-pad up19
KEYCODE_DPAD_DOWND-pad down20
KEYCODE_DPAD_LEFTD-pad left21
KEYCODE_DPAD_RIGHTD-pad right22
KEYCODE_MOVE_HOMEGo to line start122
KEYCODE_MOVE_ENDGo to line end123
KEYCODE_PAGE_UPPage up92
KEYCODE_PAGE_DOWNPage down93
KEYCODE_DELBackspace67
KEYCODE_FORWARD_DELForward delete112
KEYCODE_INSERTInsert124
KEYCODE_TABTab61
KEYCODE_NUM_LOCKNum Lock143
KEYCODE_CAPS_LOCKCaps Lock115
KEYCODE_BREAKBreak / Pause121
KEYCODE_SCROLL_LOCKScroll Lock116
KEYCODE_ZOOM_INZoom in168
KEYCODE_ZOOM_OUTZoom out169

Modifier keys

KEYCODE_ALT_LEFTLeft Alt57
KEYCODE_ALT_RIGHTRight Alt58
KEYCODE_CTRL_LEFTLeft Ctrl113
KEYCODE_CTRL_RIGHTRight Ctrl114
KEYCODE_SHIFT_LEFTLeft Shift59
KEYCODE_SHIFT_RIGHTRight Shift60

Letters & digits

KEYCODE_0Digit 07
KEYCODE_1Digit 18
KEYCODE_2Digit 29
KEYCODE_3Digit 310
KEYCODE_4Digit 411
KEYCODE_5Digit 512
KEYCODE_6Digit 613
KEYCODE_7Digit 714
KEYCODE_8Digit 815
KEYCODE_9Digit 916
KEYCODE_ALetter A29
KEYCODE_BLetter B30
KEYCODE_CLetter C31
KEYCODE_DLetter D32
KEYCODE_ELetter E33
KEYCODE_FLetter F34
KEYCODE_GLetter G35
KEYCODE_HLetter H36
KEYCODE_ILetter I37
KEYCODE_JLetter J38
KEYCODE_KLetter K39
KEYCODE_LLetter L40
KEYCODE_MLetter M41
KEYCODE_NLetter N42
KEYCODE_OLetter O43
KEYCODE_PLetter P44
KEYCODE_QLetter Q45
KEYCODE_RLetter R46
KEYCODE_SLetter S47
KEYCODE_TLetter T48
KEYCODE_ULetter U49
KEYCODE_VLetter V50
KEYCODE_WLetter W51
KEYCODE_XLetter X52
KEYCODE_YLetter Y53
KEYCODE_ZLetter Z54

Symbols

KEYCODE_PLUSPlus81
KEYCODE_MINUSMinus69
KEYCODE_STARAsterisk17
KEYCODE_SLASHSlash76
KEYCODE_EQUALSEquals70
KEYCODE_ATAt sign77
KEYCODE_POUNDNumber sign18
KEYCODE_APOSTROPHEApostrophe75
KEYCODE_BACKSLASHBackslash73
KEYCODE_COMMAComma55
KEYCODE_PERIODPeriod56
KEYCODE_LEFT_BRACKETLeft bracket71
KEYCODE_RIGHT_BRACKETRight bracket72
KEYCODE_SEMICOLONSemicolon74
KEYCODE_GRAVEGrave accent68
KEYCODE_SPACESpace62

Numeric keypad

KEYCODE_NUMPAD_0Keypad 0144
KEYCODE_NUMPAD_1Keypad 1145
KEYCODE_NUMPAD_2Keypad 2146
KEYCODE_NUMPAD_3Keypad 3147
KEYCODE_NUMPAD_4Keypad 4148
KEYCODE_NUMPAD_5Keypad 5149
KEYCODE_NUMPAD_6Keypad 6150
KEYCODE_NUMPAD_7Keypad 7151
KEYCODE_NUMPAD_8Keypad 8152
KEYCODE_NUMPAD_9Keypad 9153
KEYCODE_NUMPAD_ADDKeypad plus157
KEYCODE_NUMPAD_SUBTRACTKeypad minus156
KEYCODE_NUMPAD_MULTIPLYKeypad asterisk155
KEYCODE_NUMPAD_DIVIDEKeypad slash154
KEYCODE_NUMPAD_EQUALSKeypad equals161
KEYCODE_NUMPAD_COMMAKeypad comma159
KEYCODE_NUMPAD_DOTKeypad period158
KEYCODE_NUMPAD_LEFT_PARENKeypad left parenthesis162
KEYCODE_NUMPAD_RIGHT_PARENKeypad right parenthesis163
KEYCODE_NUMPAD_ENTERKeypad Enter160

Function keys

KEYCODE_F1F1131
KEYCODE_F2F2132
KEYCODE_F3F3133
KEYCODE_F4F4134
KEYCODE_F5F5135
KEYCODE_F6F6136
KEYCODE_F7F7137
KEYCODE_F8F8138
KEYCODE_F9F9139
KEYCODE_F10F10140
KEYCODE_F11F11141
KEYCODE_F12F12142

Media controls

KEYCODE_MEDIA_PLAYPlay126
KEYCODE_MEDIA_STOPStop86
KEYCODE_MEDIA_PAUSEPause127
KEYCODE_MEDIA_PLAY_PAUSEPlay / Pause toggle85
KEYCODE_MEDIA_FAST_FORWARDFast forward90
KEYCODE_MEDIA_REWINDRewind89
KEYCODE_MEDIA_NEXTNext track87
KEYCODE_MEDIA_PREVIOUSPrevious track88
KEYCODE_MEDIA_CLOSEClose media128
KEYCODE_MEDIA_EJECTEject129
KEYCODE_MEDIA_RECORDRecord130

Game controller buttons

KEYCODE_BUTTON_1Button 1188
KEYCODE_BUTTON_2Button 2189
KEYCODE_BUTTON_3Button 3190
KEYCODE_BUTTON_4Button 4191
KEYCODE_BUTTON_5Button 5192
KEYCODE_BUTTON_6Button 6193
KEYCODE_BUTTON_7Button 7194
KEYCODE_BUTTON_8Button 8195
KEYCODE_BUTTON_9Button 9196
KEYCODE_BUTTON_10Button 10197
KEYCODE_BUTTON_11Button 11198
KEYCODE_BUTTON_12Button 12199
KEYCODE_BUTTON_13Button 13200
KEYCODE_BUTTON_14Button 14201
KEYCODE_BUTTON_15Button 15202
KEYCODE_BUTTON_16Button 16203
KEYCODE_BUTTON_AButton A96
KEYCODE_BUTTON_BButton B97
KEYCODE_BUTTON_CButton C98
KEYCODE_BUTTON_XButton X99
KEYCODE_BUTTON_YButton Y100
KEYCODE_BUTTON_ZButton Z101
KEYCODE_BUTTON_L1Left shoulder 1102
KEYCODE_BUTTON_L2Left shoulder 2104
KEYCODE_BUTTON_R1Right shoulder 1103
KEYCODE_BUTTON_R2Right shoulder 2105
KEYCODE_BUTTON_MODEMode110
KEYCODE_BUTTON_SELECTSelect109
KEYCODE_BUTTON_STARTStart108
KEYCODE_BUTTON_THUMBLLeft stick press106
KEYCODE_BUTTON_THUMBRRight stick press107

Additional keys

KEYCODE_NUMNumeric input modifier78
KEYCODE_INFOInfo165
KEYCODE_APP_SWITCHApp switcher187
KEYCODE_BOOKMARKBookmark174
KEYCODE_AVR_INPUTA/V receiver input182
KEYCODE_AVR_POWERA/V receiver power181
KEYCODE_CAPTIONSToggle captions175
KEYCODE_CHANNEL_DOWNChannel down167
KEYCODE_CHANNEL_UPChannel up166
KEYCODE_CLEARClear28
KEYCODE_DVRDVR mode173
KEYCODE_ENVELOPEMail65
KEYCODE_EXPLORERBrowser64
KEYCODE_FORWARDHistory forward125
KEYCODE_FUNCTIONFunction modifier119
KEYCODE_GUIDETV guide172
KEYCODE_HEADSETHOOKHeadset hook79
KEYCODE_META_LEFTLeft Meta117
KEYCODE_META_RIGHTRight Meta118
KEYCODE_PICTSYMBOLSPicture symbols modifier94
KEYCODE_PROG_BLUEBlue programmable186
KEYCODE_PROG_GREENGreen programmable184
KEYCODE_PROG_REDRed programmable183
KEYCODE_PROG_YELLOWYellow programmable185
KEYCODE_SETTINGSSettings176
KEYCODE_SOFT_LEFTSoft left1
KEYCODE_SOFT_RIGHTSoft right2
KEYCODE_STB_INPUTSet-top box input180
KEYCODE_STB_POWERSet-top box power179
KEYCODE_SWITCH_CHARSETCharacter set switch95
KEYCODE_SYMSymbol modifier63
KEYCODE_SYSRQPrint screen / SysRq120
KEYCODE_TVLive TV170
KEYCODE_TV_INPUTTV input178
KEYCODE_TV_POWERTV power177
KEYCODE_WINDOWPicture-in-picture171
KEYCODE_UNKNOWNUnknown0

How to look up a key code

204 constants in ten groups, each with the literal name, the key it stands for and the integer that reaches your code. The values were checked one by one against the android.view.KeyEvent constants in the AOSP source.

The page is static: the table ships with it, the search field filters rows inside the browser, and nothing you type is sent anywhere.

  1. Type in the search field above the table to filter by constant, meaning or value: volume keeps the three KEYCODE_VOLUME_* rows, 112 keeps KEYCODE_FORWARD_DEL. Clear brings back all 204 rows.
  2. Read across the row: column one is the constant to write in code, column two says which key it is, column three is the number KeyEvent reports.
  3. Press the copy button inside the constant cell to copy just that name.
  4. Watch the pairs that look alike: KEYCODE_DEL is 67 while KEYCODE_FORWARD_DEL is 112; KEYCODE_MUTE (91) silences the microphone and KEYCODE_VOLUME_MUTE (164) the speaker.

What the numbers mean

Where the values come from

Every number matches the constant of the same name in android.view.KeyEvent, taken from the AOSP source. KEYCODE_0 is 7, KEYCODE_A is 29, KEYCODE_UNKNOWN is 0 — these are the values the system delivers, not a row number on this page.

Digits 0–9 occupy 7–16 and the letters A–Z occupy 29–54; the numeric keypad is a separate block that starts at KEYCODE_NUMPAD_0 = 144.

Keys the framework keeps to itself

KEYCODE_HOME (3) is handled by the framework and is never delivered to applications, so an app that waits for it never gets the callback. KEYCODE_MENU and KEYCODE_BACK do arrive normally, which is why they are listed apart from the keys an app can only observe.

Some entries are hardware-specific: KEYCODE_PROG_*, KEYCODE_STB_* and KEYCODE_TV_* belong to TV remotes, and KEYCODE_BUTTON_* arrives from gamepads and joysticks through the same KeyEvent channel.

What is not in the list

This table holds 204 constants; the KeyEvent class in the current AOSP source declares 338. Rare and newer entries — KEYCODE_ASSIST, KEYCODE_SCREENSHOT, the TV input matrix, F13–F24 — are not listed, so check the Android API reference when something you expect is missing.

Only the filter and the copy buttons need JavaScript. The values themselves are plain HTML and readable with scripts switched off.

Recent tools: