概要

NDKでキーコードを取得するときにJAVA側のキーコードを引っ張ってくるのが面倒なのでメモメモ

KEYCODE_UNKNOWN00x0Unknown key code.
KEYCODE_SOFT_LEFT10x1Soft Left key.
KEYCODE_SOFT_RIGHT20x2Soft Right key.
KEYCODE_HOME30x3Home key.
KEYCODE_BACK40x4Back key.
KEYCODE_CALL50x5Call key.
KEYCODE_ENDCALL60x6End Call key.
KEYCODE_070x7'0' key.
KEYCODE_180x8'1' key.
KEYCODE_290x9'2' key.
KEYCODE_3100xA'3' key.
KEYCODE_4110xB'4' key.
KEYCODE_5120xC'5' key.
KEYCODE_6130xD'6' key.
KEYCODE_7140xE'7' key.
KEYCODE_8150xF'8' key.
KEYCODE_9160x10'9' key.
KEYCODE_STAR170x11'*' key.
KEYCODE_POUND180x12'#' key.
KEYCODE_DPAD_UP190x13Directional Pad Up key.* May also be synthesized from trackball motions.
KEYCODE_DPAD_DOWN200x14Directional Pad Down key.* May also be synthesized from trackball motions.
KEYCODE_DPAD_LEFT210x15Directional Pad Left key.* May also be synthesized from trackball motions.
KEYCODE_DPAD_RIGHT220x16Directional Pad Right key. * May also be synthesized from trackball motions.
KEYCODE_DPAD_CENTER230x17Directional Pad Center key. * May also be synthesized from trackball motions.
KEYCODE_VOLUME_UP240x18Volume Up key. * Adjusts the speaker volume up.
KEYCODE_VOLUME_DOWN250x19Volume Down key. * Adjusts the speaker volume down.
KEYCODE_POWER260x1APower key.
KEYCODE_CAMERA270x1BCamera key. * Used to launch a camera application or take pictures.
KEYCODE_CLEAR280x1CClear key.
KEYCODE_A290x1D'A' key.
KEYCODE_B300x1E'B' key.
KEYCODE_C310x1F'C' key.
KEYCODE_D320x20'D' key.
KEYCODE_E330x21'E' key.
KEYCODE_F340x22'F' key.
KEYCODE_G350x23'G' key.
KEYCODE_H360x24'H' key.
KEYCODE_I370x25'I' key.
KEYCODE_J380x26'J' key.
KEYCODE_K390x27'K' key.
KEYCODE_L400x28'L' key.
KEYCODE_M410x29'M' key.
KEYCODE_N420x2A'N' key.
KEYCODE_O430x2B'O' key.
KEYCODE_P440x2C'P' key.
KEYCODE_Q450x2D'Q' key.
KEYCODE_R460x2E'R' key.
KEYCODE_S470x2F'S' key.
KEYCODE_T480x30'T' key.
KEYCODE_U490x31'U' key.
KEYCODE_V500x32'V' key.
KEYCODE_W510x33'W' key.
KEYCODE_X520x34'X' key.
KEYCODE_Y530x35'Y' key.
KEYCODE_Z540x36'Z' key.
KEYCODE_COMMA550x37',' key.
KEYCODE_PERIOD560x38'.' key.
KEYCODE_ALT_LEFT570x39Left Alt modifier key.
KEYCODE_ALT_RIGHT580x3ARight Alt modifier key.
KEYCODE_SHIFT_LEFT590x3BLeft Shift modifier key.
KEYCODE_SHIFT_RIGHT600x3CRight Shift modifier key.
KEYCODE_TAB610x3DTab key.
KEYCODE_SPACE620x3ESpace key.
KEYCODE_SYM630x3FSymbol modifier key. * Used to enter alternate symbols.
KEYCODE_EXPLORER640x40Explorer special function key. * Used to launch a browser application.
KEYCODE_ENVELOPE650x41Envelope special function key. * Used to launch a mail application.
KEYCODE_ENTER660x42Enter key.
KEYCODE_DEL670x43Backspace key. * Deletes characters before the insertion point, unlike {@link #KEYCODE_FORWARD_DEL}.
KEYCODE_GRAVE680x44'`' (backtick) key.
KEYCODE_MINUS690x45'-'.
KEYCODE_EQUALS700x46'=' key.
KEYCODE_LEFT_BRACKET710x47'[' key.
KEYCODE_RIGHT_BRACKET720x48']' key.
KEYCODE_BACKSLASH730x49'\' key.
KEYCODE_SEMICOLON740x4A';' key.
KEYCODE_APOSTROPHE750x4B''' (apostrophe) key.
KEYCODE_SLASH760x4C'/' key.
KEYCODE_AT770x4D'@' key.
KEYCODE_NUM780x4ENumber modifier key. * interpreted as an ALT key by {@link android.text.method.MetaKeyKeyListener}.
KEYCODE_HEADSETHOOK790x4FHeadset Hook key.* Used to hang up calls and stop media.
KEYCODE_FOCUS800x50Camera Focus key.* Used to focus the camera.
KEYCODE_PLUS810x51'+' key.
KEYCODE_MENU820x52Menu key.
KEYCODE_NOTIFICATION830x53Notification key.
KEYCODE_SEARCH840x54Search key.
KEYCODE_MEDIA_PLAY_PAUSE850x55Play/Pause media key.
KEYCODE_MEDIA_STOP860x56Stop media key.
KEYCODE_MEDIA_NEXT870x57Play Next media key.
KEYCODE_MEDIA_PREVIOUS880x58Play Previous media key.
KEYCODE_MEDIA_REWIND890x59Rewind media key.
KEYCODE_MEDIA_FAST_FORWARD900x5AFast Forward media key.
KEYCODE_MUTE910x5BMute key. * Mutes the microphone, unlike {@link #KEYCODE_VOLUME_MUTE}.
KEYCODE_PAGE_UP920x5CPage Up key.
KEYCODE_PAGE_DOWN930x5DPage Down key.
KEYCODE_PICTSYMBOLS940x5EPicture Symbols modifier key.* Used to switch symbol sets (Emoji, Kao-moji).
KEYCODE_SWITCH_CHARSET950x5Fswitch char-sets (Kanji,Katakana)
KEYCODE_BUTTON_A960x60Key code constant: B Button key.
KEYCODE_BUTTON_B970x61B Button key.
KEYCODE_BUTTON_C980x62C Button key.
KEYCODE_BUTTON_X990x63X Button key.
KEYCODE_BUTTON_Y1000x64Y Button key.
KEYCODE_BUTTON_Z1010x65Z Button key.
KEYCODE_BUTTON_L11020x66L1 Button key.
KEYCODE_BUTTON_R11030x67R1 Button key.
KEYCODE_BUTTON_L21040x68L2 Button key.
KEYCODE_BUTTON_R21050x69R2 Button key.
KEYCODE_BUTTON_THUMBL1060x6ALeft Thumb Button key.
KEYCODE_BUTTON_THUMBR1070x6BRight Thumb Button key.
KEYCODE_BUTTON_START1080x6CStart Button key.
KEYCODE_BUTTON_SELECT1090x6DSelect Button key.
KEYCODE_BUTTON_MODE1100x6EMode Button key.
KEYCODE_ESCAPE1110x6FEscape key.
KEYCODE_FORWARD_DEL1120x70Forward Delete key.
KEYCODE_CTRL_LEFT1130x71Left Control modifier key.
KEYCODE_CTRL_RIGHT1140x72Right Control modifier key.
KEYCODE_CAPS_LOCK1150x73Caps Lock key.
KEYCODE_SCROLL_LOCK1160x74Scroll Lock key.
KEYCODE_META_LEFT1170x75Left Meta modifier key.
KEYCODE_META_RIGHT1180x76Right Meta modifier key.
KEYCODE_FUNCTION1190x77Function modifier key.
KEYCODE_SYSRQ1200x78System Request / Print Screen key.
KEYCODE_BREAK1210x79Break / Pause key.
KEYCODE_MOVE_HOME1220x7AHome Movement key.
KEYCODE_MOVE_END1230x7BEnd Movement key.
KEYCODE_INSERT1240x7CInsert key.
KEYCODE_FORWARD1250x7DForward key.
KEYCODE_MEDIA_PLAY1260x7EPlay media key.
KEYCODE_MEDIA_PAUSE1270x7FPause media key.
KEYCODE_MEDIA_CLOSE1280x80Close media key.
KEYCODE_MEDIA_EJECT1290x81Eject media key.
KEYCODE_MEDIA_RECORD1300x82Record media key.
KEYCODE_F11310x83F1 key.
KEYCODE_F21320x84F2 key.
KEYCODE_F31330x85F3 key.
KEYCODE_F41340x86F4 key.
KEYCODE_F51350x87F5 key.
KEYCODE_F61360x88F6 key.
KEYCODE_F71370x89F7 key.
KEYCODE_F81380x8AF8 key.
KEYCODE_F91390x8BF9 key.
KEYCODE_F101400x8CF10 key.
KEYCODE_F111410x8DF11 key.
KEYCODE_F121420x8EF12 key.
KEYCODE_NUM_LOCK1430x8FNum Lock key.
KEYCODE_NUMPAD_01440x90Numeric keypad '0' key.
KEYCODE_NUMPAD_11450x91Numeric keypad '1' key.
KEYCODE_NUMPAD_21460x92Numeric keypad '2' key.
KEYCODE_NUMPAD_31470x93Numeric keypad '3' key.
KEYCODE_NUMPAD_41480x94Numeric keypad '4' key.
KEYCODE_NUMPAD_51490x95Numeric keypad '5' key.
KEYCODE_NUMPAD_61500x96Numeric keypad '6' key.
KEYCODE_NUMPAD_71510x97Numeric keypad '7' key.
KEYCODE_NUMPAD_81520x98Numeric keypad '8' key.
KEYCODE_NUMPAD_91530x99Numeric keypad '9' key.
KEYCODE_NUMPAD_DIVIDE1540x9ANumeric keypad '/' key (for division).
KEYCODE_NUMPAD_MULTIPLY1550x9BNumeric keypad '*' key (for multiplication).
KEYCODE_NUMPAD_SUBTRACT1560x9CNumeric keypad '-' key (for subtraction).
KEYCODE_NUMPAD_ADD1570x9DNumeric keypad '+' key (for addition).
KEYCODE_NUMPAD_DOT1580x9ENumeric keypad '.' key (for decimals or digit grouping).
KEYCODE_NUMPAD_COMMA1590x9FNumeric keypad ',' key (for decimals or digit grouping).
KEYCODE_NUMPAD_ENTER1600xA0Numeric keypad Enter key.
KEYCODE_NUMPAD_EQUALS1610xA1Numeric keypad '=' key.
KEYCODE_NUMPAD_LEFT_PAREN1620xA2Numeric keypad '(' key.
KEYCODE_NUMPAD_RIGHT_PAREN1630xA3Numeric keypad ')' key.
KEYCODE_VOLUME_MUTE1640xA4Volume Mute key.
KEYCODE_INFO1650xA5Info key.
KEYCODE_CHANNEL_UP1660xA6Channel up key.
KEYCODE_CHANNEL_DOWN1670xA7Channel down key.
KEYCODE_ZOOM_IN1680xA8Zoom in key.
KEYCODE_ZOOM_OUT1690xA9Zoom out key.
KEYCODE_TV1700xAATV key.
KEYCODE_WINDOW1710xABWindow key.
KEYCODE_GUIDE1720xACGuide key.
KEYCODE_DVR1730xADDVR key.
KEYCODE_BOOKMARK1740xAEBookmark key.
KEYCODE_CAPTIONS1750xAFToggle captions key.
KEYCODE_SETTINGS1760xB0Settings key.
KEYCODE_TV_POWER1770xB1TV power key.
KEYCODE_TV_INPUT1780xB2TV input key.
KEYCODE_STB_POWER1790xB3Set-top-box power key.
KEYCODE_STB_INPUT1800xB4Set-top-box input key.
KEYCODE_AVR_POWER1810xB5A/V Receiver power key.
KEYCODE_AVR_INPUT1820xB6A/V Receiver input key.
KEYCODE_PROG_RED1830xB7Red "programmable" key.
KEYCODE_PROG_GREEN1840xB8Green "programmable" key.
KEYCODE_PROG_YELLOW1850xB9Yellow "programmable" key.
KEYCODE_PROG_BLUE1860xBABlue "programmable" key.
KEYCODE_APP_SWITCH1870xBBApp switch key.
KEYCODE_BUTTON_11880xBCGeneric Game Pad Button #1.
KEYCODE_BUTTON_21890xBDGeneric Game Pad Button #2.
KEYCODE_BUTTON_31900xBEGeneric Game Pad Button #3.
KEYCODE_BUTTON_41910xBFGeneric Game Pad Button #4.
KEYCODE_BUTTON_51920xC0Generic Game Pad Button #5.
KEYCODE_BUTTON_61930xC1Generic Game Pad Button #6.
KEYCODE_BUTTON_71940xC2Generic Game Pad Button #7.
KEYCODE_BUTTON_81950xC3Generic Game Pad Button #8.
KEYCODE_BUTTON_91960xC4Generic Game Pad Button #9.
KEYCODE_BUTTON_101970xC5Generic Game Pad Button #10.
KEYCODE_BUTTON_111980xC6Generic Game Pad Button #11.
KEYCODE_BUTTON_121990xC7Generic Game Pad Button #12.
KEYCODE_BUTTON_132000xC8Generic Game Pad Button #13.
KEYCODE_BUTTON_142010xC9Generic Game Pad Button #14.
KEYCODE_BUTTON_152020xCAGeneric Game Pad Button #15.
KEYCODE_BUTTON_162030xCBGeneric Game Pad Button #16.
KEYCODE_LANGUAGE_SWITCH2040xCCLanguage Switch key.
KEYCODE_MANNER_MODE2050xCDManner Mode key.
KEYCODE_3D_MODE2060xCE3D Mode key.
KEYCODE_CONTACTS2070xCFContacts special function key.
KEYCODE_CALENDAR2080xD0Calendar special function key.
KEYCODE_MUSIC2090xD1Music special function key.
KEYCODE_CALCULATOR2100xD2Calculator special function key.
KEYCODE_ZENKAKU_HANKAKU2110xD3Japanese full-width / half-width key.
KEYCODE_EISU2120xD4Japanese alphanumeric key.
KEYCODE_MUHENKAN2130xD5Japanese non-conversion key.
KEYCODE_HENKAN2140xD6Japanese conversion key.
KEYCODE_KATAKANA_HIRAGANA2150xD7Japanese katakana / hiragana key.
KEYCODE_YEN2160xD8Japanese Yen key.
KEYCODE_RO2170xD9Japanese Ro key.
KEYCODE_KANA2180xDAJapanese kana key.
KEYCODE_ASSIST2190xDBAssist key.
KEYCODE_BRIGHTNESS_DOWN2200xDCBrightness Down key.
KEYCODE_BRIGHTNESS_UP2210xDDBrightness Up key.
KEYCODE_MEDIA_AUDIO_TRACK2220xDEAudio Track key