Keycode Enum

Definition

Enumerates values returned by several types and taken as a parameter of several types.

public enum Keycode
type Keycode = 
Inheritance
Keycode

Fields

A 29

Key code constant: 'A' key.

AllApps 284
AltLeft 57

Key code constant: Left Alt modifier key.

AltRight 58

Key code constant: Right Alt modifier key.

Apostrophe 75

Key code constant: ''' (apostrophe) key.

AppSwitch 187

Key code constant: App switch key. Should bring up the application switcher dialog.

Assist 219

Key code constant: Assist key. Launches the global assist activity.

At 77

Key code constant: '@' key.

AvrInput 182

Key code constant: A/V Receiver input key. On TV remotes, switches the input mode on an external A/V Receiver.

AvrPower 181

Key code constant: A/V Receiver power key. On TV remotes, toggles the power on an external A/V Receiver.

B 30

Key code constant: 'B' key.

Back 4

Key code constant: Back key.

Backslash 73

Key code constant: '' key.

Bookmark 174

Key code constant: Bookmark key. On some TV remotes, bookmarks content or web pages.

Break 121

Key code constant: Break / Pause key.

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.

Button1 188

Key code constant: Generic Game Pad Button #1.

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.

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.

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.

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.

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.

ButtonMode 110

Key code constant: Mode Button key. On a game controller, the button labeled Mode.

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.

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.

ButtonSelect 109

Key code constant: Select Button key. On a game controller, the button labeled Select.

ButtonStart 108

Key code constant: Start Button key. On a game controller, the button labeled Start.

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.

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.

C 31

Key code constant: 'C' key.

Calculator 210

Key code constant: Calculator special function key. Used to launch a calculator application.

Calendar 208

Key code constant: Calendar special function key. Used to launch a calendar application.

Call 5

Key code constant: Call key.

Camera 27

Key code constant: Camera key. Used to launch a camera application or take pictures.

CapsLock 115

Key code constant: Caps Lock key.

Captions 175

Key code constant: Toggle captions key. Switches the mode for closed-captioning text, for example during television shows.

ChannelDown 167

Key code constant: Channel down key. On TV remotes, decrements the television channel.

ChannelUp 166

Key code constant: Channel up key. On TV remotes, increments the television channel.

Clear 28

Key code constant: Clear key.

Comma 55

Key code constant: ',' key.

Contacts 207

Key code constant: Contacts special function key. Used to launch an address book application.

Copy 278
CtrlLeft 113

Key code constant: Left Control modifier key.

CtrlRight 114

Key code constant: Right Control modifier key.

Cut 277
D 32

Key code constant: 'D' key.

Del 67

Key code constant: Backspace key. Deletes characters before the insertion point, unlike ForwardDel.

DemoApp1 301
DemoApp2 302
DemoApp3 303
DemoApp4 304
DpadCenter 23

Key code constant: Directional Pad Center key. May also be synthesized from trackball motions.

DpadDown 20

Key code constant: Directional Pad Down key. May also be synthesized from trackball motions.

DpadDownLeft 269
DpadDownRight 271
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.

DpadUp 19

Key code constant: Directional Pad Up key. May also be synthesized from trackball motions.

DpadUpLeft 268
DpadUpRight 270
Dvr 173

Key code constant: DVR key. On some TV remotes, switches to a DVR mode for recorded shows.

E 33

Key code constant: 'E' key.

Eisu 212

Key code constant: Japanese alphanumeric key.

Endcall 6

Key code constant: End Call key.

Enter 66

Key code constant: Enter key.

Envelope 65

Key code constant: Envelope special function key. Used to launch a mail application.

Equals 70

Key code constant: '=' key.

Escape 111

Key code constant: Escape key.

Explorer 64

Key code constant: Explorer special function key. Used to launch a browser application.

F 34

Key code constant: 'F' key.

F1 131

Key code constant: F1 key.

F10 140

Key code constant: F10 key.

F11 141

Key code constant: F11 key.

F12 142

Key code constant: F12 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.

FeaturedApp1 297
FeaturedApp2 298
FeaturedApp3 299
FeaturedApp4 300
Focus 80

Key code constant: Camera Focus key. Used to focus the camera.

Forward 125

Key code constant: Forward key. Navigates forward in the history stack.

ForwardDel 112

Key code constant: Forward Delete key. Deletes characters ahead of the insertion point, unlike Del.

Function 119

Key code constant: Function modifier key.

G 35

Key code constant: 'G' key.

Grave 68

Key code constant: '`' (backtick) key.

Guide 172

Key code constant: Guide key. On TV remotes, shows a programming guide.

H 36

Key code constant: 'H' key.

Headsethook 79

Key code constant: Headset Hook key. Used to hang up calls and stop media.

Help 259
Henkan 214

Key code constant: Japanese conversion key.

Home 3

Key code constant: Home key. This key is handled by the framework and is never delivered to applications.

I 37

Key code constant: 'I' key.

Info 165

Key code constant: Info key. Common on TV remotes to show additional information related to what is currently being viewed.

Insert 124

Key code constant: Insert key. Toggles insert / overwrite edit mode.

J 38

Key code constant: 'J' key.

K 39

Key code constant: 'K' key.

K11 227
K12 228
Kana 218

Key code constant: Japanese kana key.

KatakanaHiragana 215

Key code constant: Japanese katakana / hiragana key.

KeyboardBacklightDown 305
KeyboardBacklightToggle 307
KeyboardBacklightUp 306
L 40

Key code constant: 'L' key.

LanguageSwitch 204

Key code constant: Language Switch key. Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard.

LastChannel 229
LeftBracket 71

Key code constant: '[' key.

M 41

Key code constant: 'M' key.

Macro1 313
Macro2 314
Macro3 315
Macro4 316
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.

MediaAudioTrack 222
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.

MediaFastForward 90

Key code constant: Fast Forward media key.

MediaNext 87

Key code constant: Play Next media key.

MediaPause 127

Key code constant: Pause media key.

MediaPlay 126

Key code constant: Play media key.

MediaPlayPause 85

Key code constant: Play/Pause media key.

MediaPrevious 88

Key code constant: Play Previous media key.

MediaRecord 130

Key code constant: Record media key.

MediaRewind 89

Key code constant: Rewind media key.

MediaSkipBackward 273
MediaSkipForward 272
MediaStepBackward 275
MediaStepForward 274
MediaStop 86

Key code constant: Stop media key.

MediaTopMenu 226
Menu 82

Key code constant: Menu key.

MetaLeft 117

Key code constant: Left Meta modifier key.

MetaRight 118

Key code constant: Right Meta modifier key.

Minus 69

Key code constant: '-'.

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.

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.

Muhenkan 213

Key code constant: Japanese non-conversion key.

Music 209

Key code constant: Music special function key. Used to launch a music player application.

Mute 91

Key code constant: Mute key. Mutes the microphone, unlike VolumeMute.

N 42

Key code constant: 'N' key.

NavigateIn 262
NavigateNext 261
NavigateOut 263
NavigatePrevious 260
Notification 83

Key code constant: Notification key.

Num 78
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.

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.

NumpadAdd 157

Key code constant: Numeric keypad '+' key (for addition).

NumpadComma 159

Key code constant: Numeric keypad ',' key (for decimals or digit grouping).

NumpadDivide 154

Key code constant: Numeric keypad '/' key (for division).

NumpadDot 158

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.

NumpadMultiply 155

Key code constant: Numeric keypad '*' key (for multiplication).

NumpadRightParen 163

Key code constant: Numeric keypad ')' key.

NumpadSubtract 156

Key code constant: Numeric keypad '-' key (for subtraction).

O 43

Key code constant: 'O' key.

P 44

Key code constant: 'P' key.

PageDown 93

Key code constant: Page Down key.

PageUp 92

Key code constant: Page Up key.

Pairing 225
Paste 279
Period 56

Key code constant: '.' key.

Pictsymbols 94

Key code constant: Picture Symbols modifier key. Used to switch symbol sets (Emoji, Kao-moji).

Plus 81

Key code constant: '+' key.

Pound 18

Key code constant: '#' key.

Power 26

Key code constant: Power key.

ProfileSwitch 288
ProgBlue 186

Key code constant: Blue "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.

ProgRed 183

Key code constant: Red "programmable" key. On TV remotes, acts as a contextual/programmable key.

ProgYellow 185

Key code constant: Yellow "programmable" key. On TV remotes, acts as a contextual/programmable key.

Q 45

Key code constant: 'Q' key.

R 46

Key code constant: 'R' key.

RecentApps 312
Refresh 285
RightBracket 72

Key code constant: ']' key.

Ro 217

Key code constant: Japanese Ro key.

S 47

Key code constant: 'S' key.

ScrollLock 116

Key code constant: Scroll Lock key.

84

Key code constant: Search key.

Semicolon 74

Key code constant: ';' key.

Settings 176

Key code constant: Settings key. Starts the system settings activity.

ShiftLeft 59

Key code constant: Left Shift modifier key.

ShiftRight 60

Key code constant: Right Shift modifier key.

Slash 76

Key code constant: '/' key.

Sleep 223
SoftLeft 1
SoftRight 2
SoftSleep 276
Space 62

Key code constant: Space key.

Star 17

Key code constant: '*' key.

StbInput 180

Key code constant: Set-top-box input key. On TV remotes, switches the input mode on an external Set-top-box.

StbPower 179

Key code constant: Set-top-box power key. On TV remotes, toggles the power on an external Set-top-box.

Stem1 265
Stem2 266
Stem3 267
StemPrimary 264
StylusButtonPrimary 308
StylusButtonSecondary 309
StylusButtonTail 311
StylusButtonTertiary 310
SwitchCharset 95

Key code constant: Switch Charset modifier key. Used to switch character sets (Kanji, Katakana).

Sym 63

Key code constant: Symbol modifier key. Used to enter alternate symbols.

Sysrq 120

Key code constant: System Request / Print Screen key.

SystemNavigationDown 281
SystemNavigationLeft 282
SystemNavigationRight 283
SystemNavigationUp 280
T 48

Key code constant: 'T' key.

Tab 61

Key code constant: Tab key.

ThreeDMode 206

Key code constant: 3D Mode key. Toggles the display between 2D and 3D mode.

ThumbsDown 287
ThumbsUp 286
Tv 170

Key code constant: TV key. On TV remotes, switches to viewing live TV.

TvAntennaCable 242
TvAudioDescription 252
TvAudioDescriptionMixDown 254
TvAudioDescriptionMixUp 253
TvContentsMenu 256
TvDataService 230
TvInput 178

Key code constant: TV input key. On TV remotes, switches the input on a television screen.

TvInputComponent1 249
TvInputComponent2 250
TvInputComposite1 247
TvInputComposite2 248
TvInputHdmi1 243
TvInputHdmi2 244
TvInputHdmi3 245
TvInputHdmi4 246
TvInputVga1 251
TvMediaContextMenu 257
TvNetwork 241
TvNumberEntry 234
TvPower 177

Key code constant: TV power key. On TV remotes, toggles the power on a television screen.

TvRadioService 232
TvSatellite 237
TvSatelliteBs 238
TvSatelliteCs 239
TvSatelliteService 240
TvTeletext 233
TvTerrestrialAnalog 235
TvTerrestrialDigital 236
TvTimerProgramming 258
TvZoomMode 255
U 49

Key code constant: 'U' key.

Unknown 0

Key code constant: Unknown key code.

V 50

Key code constant: 'V' key.

VideoApp1 289
VideoApp2 290
VideoApp3 291
VideoApp4 292
VideoApp5 293
VideoApp6 294
VideoApp7 295
VideoApp8 296
VoiceAssist 231
VolumeDown 25

Key code constant: Volume Down key. Adjusts the speaker volume down.

VolumeMute 164
VolumeUp 24

Key code constant: Volume Up key. Adjusts the speaker volume up.

W 51

Key code constant: 'W' key.

Wakeup 224
Window 171

Key code constant: Window key. On TV remotes, toggles picture-in-picture mode or other windowing functions.

X 52

Key code constant: 'X' key.

Y 53

Key code constant: 'Y' key.

Yen 216

Key code constant: Japanese Yen key.

Z 54

Key code constant: 'Z' key.

ZenkakuHankaku 211

Key code constant: Japanese full-width / half-width key.

ZoomIn 168

Key code constant: Zoom in key.

ZoomOut 169

Key code constant: Zoom out key.

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.

Applies to