Keyboard Devices

Android supports a variety of keyboard devices including special function keypads (volume and power controls), compact embedded QWERTY keyboards, and fully featured PC-style external keyboards.

This document decribes physical keyboards only. Refer to the Android SDK for information about soft keyboards (Input Method Editors).

Keyboard Classification

An input device is classified as a keyboard if either of the following conditions hold:

  • The input device reports the presence of any Linux key codes used on keyboards including 0 through 0xff or KEY_OK through KEY_MAX.

  • The input device reports the presence of any Linux key codes used on joysticks and gamepads including BTN_0 through BTN_9, BTN_TRIGGER through BTN_DEAD, or BTN_A through BTN_THUMBR.

Joysticks are currently classified as keyboards because joystick and gamepad buttons are reported by EV_KEY events in the same way keyboard keys are reported. Thus joysticks and gamepads also make use of key map files for configuration. Refer to the section on Joystick Devices for more information.

Once an input device has been classified as a keyboard, the system loads the input device configuration file and keyboard layout for the keyboard.

The system then tries to determine additional characteristics of the device.

  • If the input device has any keys that are mapped to KEYCODE_Q, then the device is considered to have an alphabetic keypad (as opposed to numeric). The alphabetic keypad capability is reported in the resource Configuration object as KEYBOARD_QWERTY.

  • If the input device has any keys that are mapped to KEYCODE_DPAD_UP, KEYCODE_DPAD_DOWN, KEYCODE_DPAD_LEFT, KEYCODE_DPAD_RIGHT, and KEYCODE_DPAD_CENTER (all must be present), then the device is considered to have a directional keypad. The directional keypad capability is reported in the resource Configuration object as NAVIGATION_DPAD.

  • If the input device has any keys that are mapped to KEYCODE_BUTTON_A or other gamepad related keys, then the device is considered to have a gamepad.

Keyboard Driver Requirements

  1. Keyboard drivers should only register key codes for the keys that they actually support. Registering excess key codes may confuse the device classification algorithm or cause the system to incorrectly detect the supported keyboard capabilities of the device.

  2. Keyboard drivers should use EV_KEY to report key presses, using a value of 0 to indicate that a key is released, a value of 1 to indicate that a key is pressed, and a value greater than or equal to 2 to indicate that the key is being repeated automatically.

  3. Android performs its own keyboard repeating. Auto-repeat functionality should be disabled in the driver.

  4. Keyboard drivers may optionally indicate the HID usage or low-level scan code by sending EV_MSC with MSC_SCANCODE and a valud indicating the usage or scan code when the key is pressed. This information is not currently used by Android.

  5. Keyboard drivers should support setting LED states when EV_LED is written to the device. The hid-input driver handles this automatically. At the time of this writing, Android uses LED_CAPSLOCK, LED_SCROLLLOCK, and LED_NUMLOCK. These LEDs only need to be supported when the keyboard actually has the associated indicator lights.

  6. Keyboard drivers for embedded keypads (for example, using a GPIO matrix) should make sure to send EV_KEY events with a value of 0 for any keys that are still pressed when the device is going to sleep. Otherwise keys might get stuck down and will auto-repeat forever.

Keyboard Operation

The following is a brief summary of the keyboard operation on Android.

  1. The EventHub reads raw events from the evdev driver and maps Linux key codes (sometimes referred to as scan codes) into Android key codes using the keyboard's key layout map.

  2. The InputReader consumes the raw events and updates the meta key state. For example, if the left shift key is pressed or released, the reader will set or reset the META_SHIFT_LEFT_ON and META_SHIFT_ON bits accordingly.

  3. The InputReader notifies the InputDispatcher about the key event.

  4. The InputDispatcher asks the WindowManagerPolicy what to do with the key event by calling WindowManagerPolicy.interceptKeyBeforeQueueing. This method is part of a critical path that is responsible for waking the device when certain keys are pressed. The EventHub effectively holds a wake lock along this critical path to ensure that it will run to completion.

  5. If an InputFilter is currently in use, the InputDispatcher gives it a chance to consume or transform the key. The InputFilter may be used to implement low-level system-wide accessibility policies.

  6. The InputDispatcher enqueues the key for processing on the dispatch thread.

  7. When the InputDispatcher dequeues the key, it gives the WindowManagerPolicy a second chance to intercept the key event by calling WindowManagerPolicy.interceptKeyBeforeDispatching. This method handles system shortcuts and other functions.

  8. The InputDispatcher then identifies the key event target (the focused window) and waits for them to become ready. Then, the InputDispatcher delivers the key event to the application.

  9. Inside the application, the key event propagates down the view hierarchy to the focused view for pre-IME key dispatch.

  10. If the key event is not handled in the pre-IME dispatch and an IME is in use, the key event is delivered to the IME.

  11. If the key event was not consumed by the IME, then the key event propagates down the view hierarchy to the focused view for standard key dispatch.

  12. The application reports back to the InputDispatcher as to whether the key event was consumed. If the event was not consumed, the InputDispatcher calls WindowManagerPolicy.dispatchUnhandledKey to apply “fallback” behavior. Depending on the fallback action, the key event dispatch cycle may be restarted using a different key code. For example, if an application does not handle KEYCODE_ESCAPE, the system may redispatch the key event as KEYCODE_BACK instead.

Keyboard Configuration

Keyboard behavior is determined by the keyboard's key layout, key character map and input device configuration.

Refer to the following sections for more details about the files that participate in keyboard configuration:

Properties

The following input device configuration properties are used for keyboards.

keyboard.layout

Definition: keyboard.layout = <name>

Specifies the name of the key layout file associated with the input device, excluding the .kl extension. If this file is not found, the input system will use the default key layout instead.

Spaces in the name are converted to underscores during lookup.

Refer to the key layout file documentation for more details.

keyboard.characterMap

Definition: keyboard.characterMap = <name>

Specifies the name of the key character map file associated with the input device, excluding the .kcm extension. If this file is not found, the input system will use the default key character map instead.

Spaces in the name are converted to underscores during lookup.

Refer to the key character map file documentation for more details.

keyboard.orientationAware

Definition: keyboard.orientationAware = 0 | 1

Specifies whether the keyboard should react to display orientation changes.

  • If the value is 1, the directional keypad keys are rotated when the associated display orientation changes.

  • If the value is 0, the keyboard is immune to display orientation changes.

The default value is 0.

Orientation awareness is used to support rotation of directional keypad keys, such as on the Motorola Droid. For example, when the device is rotated clockwise 90 degrees from its natural orientation, KEYCODE_DPAD_UP is remapped to produce KEYCODE_DPAD_RIGHT since the ‘up’ key ends up pointing ‘right’ when the device is held in that orientation.

keyboard.builtIn

Definition: keyboard.builtIn = 0 | 1

Specifies whether the keyboard is the built-in (physically attached) keyboard.

The default value is 1 if the device name ends with -keypad, 0 otherwise.

The built-in keyboard is always assigned a device id of 0. Other keyboards that are not built-in are assigned unique non-zero device ids.

Using an id of 0 for the built-in keyboard is important for maintaining compatibility with the KeyCharacterMap.BUILT_IN_KEYBOARD field, which specifies the id of the built-in keyboard and has a value of 0. This field has been deprecated in the API but older applications might still be using it.

A special-function keyboard (one whose key character map specifies a type of SPECIAL_FUNCTION) will never be registered as the built-in keyboard, regardless of the setting of this property. This is because a special-function keyboard is by definition not intended to be used for general purpose typing.

Example Configurations

# This is an example input device configuration file for a built-in
# keyboard that has a DPad.

# The keyboard is internal because it is part of the device.
device.internal = 1

# The keyboard is the default built-in keyboard so it should be assigned
# an id of 0.
keyboard.builtIn = 1

# The keyboard includes a DPad which is mounted on the device.  As the device
# is rotated the orientation of the DPad rotates along with it, so the DPad must
# be aware of the display orientation.  This ensures that pressing 'up' on the
# DPad always means 'up' from the perspective of the user, even when the entire
# device has been rotated.
keyboard.orientationAware = 1

Compatibility Notes

Prior to Honeycomb, the keyboard input mapper did not use any configuration properties. All keyboards were assumed to be physically attached and orientation aware. The default key layout and key character map was named qwerty instead of Generic. The key character map format was also very different and the framework did not support PC-style full keyboards or external keyboards.

When upgrading devices to Honeycomb, make sure to create or update the necessary configuration and key map files.

HID Usages, Linux Key Codes and Android Key Codes

The system refers to keys using several different identifiers, depending on the layer of abstraction.

For HID devices, each key has an associated HID usage. The Linux hid-input driver and related vendor and device-specific HID drivers are responsible for parsing HID reports and mapping HID usages to Linux key codes.

As Android reads EV_KEY events from the Linux kernel, it translates each Linux key code into its corresponding Android key code according to the key layout file of the device.

When the key event is dispatched to an application, the android.view.KeyEvent instance reports the Linux key code as the value of getScanCode() and the Android key code as the value of getKeyCode(). For the purposes of the framework, only the value of getKeyCode() is important.

Note that the HID usage information is not used by Android itself or passed to applications.

Code Tables

The following tables show how HID usages, Linux key codes and Android key codes are related to one another.

The LKC column specifies the Linux key code in hexadecimal.

The AKC column specifies the Android key code in hexadecimal.

The Notes column refers to notes that are posted after the table.

The Version column specifies the first version of the Android platform to have included this key in its default key map. Multiple rows are shown in cases where the default key map has changed between versions. The oldest version indicated is 1.6.

  • In Gingerbread (2.3) and earlier releases, the default key map was qwerty.kl. This key map was only intended for use with the Android Emulator and was not intended to be used to support arbitrary external keyboards. Nevertheless, a few OEMs added Bluetooth keyboard support to the platform and relied on qwerty.kl to provide the necessary keyboard mappings. Consequently these older mappings may be of interest to OEMs who are building peripherals for these particular devices. Note that the mappings are substantially different from the current ones, particularly with respect to the treatment of the HOME key. It is recommended that all new peripherals be developed according to the Honeycomb or more recent key maps (ie. standard HID).

  • As of Honeycomb (3.0), the default key map is Generic.kl. This key map was designed to support full PC style keyboards. Most functionality of standard HID keyboards should just work out of the box.

The key code mapping may vary across versions of the Linux kernel and Android. When changes are known to have occurred in the Android default key maps, they are indicated in the version column.

Device-specific HID drivers and key maps may apply different mappings than are indicated here.

HID Keyboard and Keypad Page (0x07)

HID UsageHID Usage NameLKCLinux Key Code NameVersionAKCAndroid Key Code NameNotes
0x07 0x0001Keyboard Error Roll Over
0x07 0x0002Keyboard POST Fail
0x07 0x0003Keyboard Error Undefined
0x07 0x0004Keyboard a and A0x001eKEY_A1.60x001dKEYCODE_A1
0x07 0x0005Keyboard b and B0x0030KEY_B1.60x001eKEYCODE_B1
0x07 0x0006Keyboard c and C0x002eKEY_C1.60x001fKEYCODE_C1
0x07 0x0007Keyboard d and D0x0020KEY_D1.60x0020KEYCODE_D1
0x07 0x0008Keyboard e and E0x0012KEY_E1.60x0021KEYCODE_E1
0x07 0x0009Keyboard f and F0x0021KEY_F1.60x0022KEYCODE_F1
0x07 0x000aKeyboard g and G0x0022KEY_G1.60x0023KEYCODE_G1
0x07 0x000bKeyboard h and H0x0023KEY_H1.60x0024KEYCODE_H1
0x07 0x000cKeyboard i and I0x0017KEY_I1.60x0025KEYCODE_I1
0x07 0x000dKeyboard j and J0x0024KEY_J1.60x0026KEYCODE_J1
0x07 0x000eKeyboard k and K0x0025KEY_K1.60x0027KEYCODE_K1
0x07 0x000fKeyboard l and L0x0026KEY_L1.60x0028KEYCODE_L1
0x07 0x0010Keyboard m and M0x0032KEY_M1.60x0029KEYCODE_M1
0x07 0x0011Keyboard n and N0x0031KEY_N1.60x002aKEYCODE_N1
0x07 0x0012Keyboard o and O0x0018KEY_O1.60x002bKEYCODE_O1
0x07 0x0013Keyboard p and P0x0019KEY_P1.60x002cKEYCODE_P1
0x07 0x0014Keyboard q and Q0x0010KEY_Q1.60x002dKEYCODE_Q1
0x07 0x0015Keyboard r and R0x0013KEY_R1.60x002eKEYCODE_R1
0x07 0x0016Keyboard s and S0x001fKEY_S1.60x002fKEYCODE_S1
0x07 0x0017Keyboard t and T0x0014KEY_T1.60x0030KEYCODE_T1
0x07 0x0018Keyboard u and U0x0016KEY_U1.60x0031KEYCODE_U1
0x07 0x0019Keyboard v and V0x002fKEY_V1.60x0032KEYCODE_V1
0x07 0x001aKeyboard w and W0x0011KEY_W1.60x0033KEYCODE_W1
0x07 0x001bKeyboard x and X0x002dKEY_X1.60x0034KEYCODE_X1
0x07 0x001cKeyboard y and Y0x0015KEY_Y1.60x0035KEYCODE_Y1
0x07 0x001dKeyboard z and Z0x002cKEY_Z1.60x0036KEYCODE_Z1
0x07 0x001eKeyboard 1 and !0x0002KEY_11.60x0008KEYCODE_11
0x07 0x001fKeyboard 2 and @0x0003KEY_21.60x0009KEYCODE_21
0x07 0x0020Keyboard 3 and #0x0004KEY_31.60x000aKEYCODE_31
0x07 0x0021Keyboard 4 and $0x0005KEY_41.60x000bKEYCODE_41
0x07 0x0022Keyboard 5 and %0x0006KEY_51.60x000cKEYCODE_51
0x07 0x0023Keyboard 6 and ^0x0007KEY_61.60x000dKEYCODE_61
0x07 0x0024Keyboard 7 and &0x0008KEY_71.60x000eKEYCODE_71
0x07 0x0025Keyboard 8 and *0x0009KEY_81.60x000fKEYCODE_81
0x07 0x0026Keyboard 9 and (0x000aKEY_91.60x0010KEYCODE_91
0x07 0x0027Keyboard 0 and )0x000bKEY_01.60x0007KEYCODE_01
0x07 0x0028Keyboard Return (ENTER)0x001cKEY_ENTER1.60x0042KEYCODE_ENTER1
0x07 0x0029Keyboard ESCAPE0x0001KEY_ESC3.00x006fKEYCODE_ESCAPE
""""""""2.30x0004KEYCODE_BACK
0x07 0x002aKeyboard DELETE (Backspace)0x000eKEY_BACKSPACE1.60x0043KEYCODE_DEL
0x07 0x002bKeyboard Tab0x000fKEY_TAB1.60x003dKEYCODE_TAB
0x07 0x002cKeyboard Spacebar0x0039KEY_SPACE1.60x003eKEYCODE_SPACE
0x07 0x002dKeyboard - and _0x000cKEY_MINUS1.60x0045KEYCODE_MINUS1
0x07 0x002eKeyboard = and +0x000dKEY_EQUAL1.60x0046KEYCODE_EQUALS1
0x07 0x002fKeyboard [ and {0x001aKEY_LEFTBRACE1.60x0047KEYCODE_LEFT_BRACKET1
0x07 0x0030Keyboard ] and }0x001bKEY_RIGHTBRACE1.60x0048KEYCODE_RIGHT_BRACKET1
0x07 0x0031Keyboard \ and |0x002bKEY_BACKSLASH1.60x0049KEYCODE_BACKSLASH1
0x07 0x0032Keyboard Non-US # and ~0x002bKEY_BACKSLASH1.60x0049KEYCODE_BACKSLASH1
0x07 0x0033Keyboard ; and :0x0027KEY_SEMICOLON1.60x004aKEYCODE_SEMICOLON1
0x07 0x0034Keyboard ' and "0x0028KEY_APOSTROPHE1.60x004bKEYCODE_APOSTROPHE1
0x07 0x0035Keyboard ` and ~0x0029KEY_GRAVE3.00x0044KEYCODE_GRAVE1
0x07 0x0036Keyboard , and <0x0033KEY_COMMA1.60x0037KEYCODE_COMMA1
0x07 0x0037Keyboard . and >0x0034KEY_DOT1.60x0038KEYCODE_PERIOD1
0x07 0x0038Keyboard / and ?0x0035KEY_SLASH1.60x004cKEYCODE_SLASH1
0x07 0x0039Keyboard Caps Lock0x003aKEY_CAPSLOCK3.00x0073KEYCODE_CAPS_LOCK
0x07 0x003aKeyboard F10x003bKEY_F13.00x0083KEYCODE_F1
""""""""1.60x0052KEYCODE_MENU
0x07 0x003bKeyboard F20x003cKEY_F23.00x0084KEYCODE_F2
""""""""1.60x0002KEYCODE_SOFT_RIGHT
0x07 0x003cKeyboard F30x003dKEY_F33.00x0085KEYCODE_F3
""""""""1.60x0005KEYCODE_CALL
0x07 0x003dKeyboard F40x003eKEY_F43.00x0086KEYCODE_F4
""""""""1.60x0006KEYCODE_ENDCALL
0x07 0x003eKeyboard F50x003fKEY_F53.00x0087KEYCODE_F5
0x07 0x003fKeyboard F60x0040KEY_F63.00x0088KEYCODE_F6
0x07 0x0040Keyboard F70x0041KEY_F73.00x0089KEYCODE_F7
0x07 0x0041Keyboard F80x0042KEY_F83.00x008aKEYCODE_F8
0x07 0x0042Keyboard F90x0043KEY_F93.00x008bKEYCODE_F9
0x07 0x0043Keyboard F100x0044KEY_F103.00x008cKEYCODE_F10
""""""""2.30x0052KEYCODE_MENU
0x07 0x0044Keyboard F110x0057KEY_F113.00x008dKEYCODE_F11
0x07 0x0045Keyboard F120x0058KEY_F123.00x008eKEYCODE_F12
0x07 0x0046Keyboard Print Screen0x0063KEY_SYSRQ3.00x0078KEYCODE_SYSRQ
0x07 0x0047Keyboard Scroll Lock0x0046KEY_SCROLLLOCK3.00x0074KEYCODE_SCROLL_LOCK
0x07 0x0048Keyboard Pause0x0077KEY_PAUSE3.00x0079KEYCODE_BREAK
0x07 0x0049Keyboard Insert0x006eKEY_INSERT3.00x007cKEYCODE_INSERT
0x07 0x004aKeyboard Home0x0066KEY_HOME3.00x007aKEYCODE_MOVE_HOME
""""""""1.60x0003KEYCODE_HOME
0x07 0x004bKeyboard Page Up0x0068KEY_PAGEUP3.00x005cKEYCODE_PAGE_UP
0x07 0x004cKeyboard Delete Forward0x006fKEY_DELETE3.00x0070KEYCODE_FORWARD_DEL
0x07 0x004dKeyboard End0x006bKEY_END3.00x007bKEYCODE_MOVE_END
""""""""1.60x0006KEYCODE_ENDCALL
0x07 0x004eKeyboard Page Down0x006dKEY_PAGEDOWN3.00x005dKEYCODE_PAGE_DOWN
0x07 0x004fKeyboard Right Arrow0x006aKEY_RIGHT1.60x0016KEYCODE_DPAD_RIGHT
0x07 0x0050Keyboard Left Arrow0x0069KEY_LEFT1.60x0015KEYCODE_DPAD_LEFT
0x07 0x0051Keyboard Down Arrow0x006cKEY_DOWN1.60x0014KEYCODE_DPAD_DOWN
0x07 0x0052Keyboard Up Arrow0x0067KEY_UP1.60x0013KEYCODE_DPAD_UP
0x07 0x0053Keyboard Num Lock and Clear0x0045KEY_NUMLOCK3.00x008fKEYCODE_NUM_LOCK
0x07 0x0054Keypad /0x0062KEY_KPSLASH3.00x009aKEYCODE_NUMPAD_DIVIDE
0x07 0x0055Keypad *0x0037KEY_KPASTERISK3.00x009bKEYCODE_NUMPAD_MULTIPLY
0x07 0x0056Keypad -0x004aKEY_KPMINUS3.00x009cKEYCODE_NUMPAD_SUBTRACT
0x07 0x0057Keypad +0x004eKEY_KPPLUS3.00x009dKEYCODE_NUMPAD_ADD
0x07 0x0058Keypad ENTER0x0060KEY_KPENTER3.00x00a0KEYCODE_NUMPAD_ENTER
0x07 0x0059Keypad 1 and End0x004fKEY_KP13.00x0091KEYCODE_NUMPAD_1
0x07 0x005aKeypad 2 and Down Arrow0x0050KEY_KP23.00x0092KEYCODE_NUMPAD_2
0x07 0x005bKeypad 3 and PageDn0x0051KEY_KP33.00x0093KEYCODE_NUMPAD_3
0x07 0x005cKeypad 4 and Left Arrow0x004bKEY_KP43.00x0094KEYCODE_NUMPAD_4
0x07 0x005dKeypad 50x004cKEY_KP53.00x0095KEYCODE_NUMPAD_5
0x07 0x005eKeypad 6 and Right Arrow0x004dKEY_KP63.00x0096KEYCODE_NUMPAD_6
0x07 0x005fKeypad 7 and Home0x0047KEY_KP73.00x0097KEYCODE_NUMPAD_7
0x07 0x0060Keypad 8 and Up Arrow0x0048KEY_KP83.00x0098KEYCODE_NUMPAD_8
0x07 0x0061Keypad 9 and Page Up0x0049KEY_KP93.00x0099KEYCODE_NUMPAD_9
0x07 0x0062Keypad 0 and Insert0x0052KEY_KP03.00x0090KEYCODE_NUMPAD_0
0x07 0x0063Keypad . and Delete0x0053KEY_KPDOT3.00x009eKEYCODE_NUMPAD_DOT
0x07 0x0064Keyboard Non-US \ and |0x0056KEY_102ND4.00x0049KEYCODE_BACKSLASH1
0x07 0x0065Keyboard Application0x007fKEY_COMPOSE3.00x0052KEYCODE_MENU
""""""""1.60x0054KEYCODE_SEARCH
0x07 0x0066Keyboard Power0x0074KEY_POWER1.60x001aKEYCODE_POWER
0x07 0x0067Keypad =0x0075KEY_KPEQUAL3.00x00a1KEYCODE_NUMPAD_EQUALS
0x07 0x0068Keyboard F130x00b7KEY_F13
0x07 0x0069Keyboard F140x00b8KEY_F14
0x07 0x006aKeyboard F150x00b9KEY_F15
0x07 0x006bKeyboard F160x00baKEY_F16
0x07 0x006cKeyboard F170x00bbKEY_F17
0x07 0x006dKeyboard F180x00bcKEY_F18
0x07 0x006eKeyboard F190x00bdKEY_F19
0x07 0x006fKeyboard F200x00beKEY_F20
0x07 0x0070Keyboard F210x00bfKEY_F21
0x07 0x0071Keyboard F220x00c0KEY_F22
0x07 0x0072Keyboard F230x00c1KEY_F23
0x07 0x0073Keyboard F240x00c2KEY_F24
0x07 0x0074Keyboard Execute0x0086KEY_OPEN
0x07 0x0075Keyboard Help0x008aKEY_HELP
0x07 0x0076Keyboard Menu0x0082KEY_PROPS
0x07 0x0077Keyboard Select0x0084KEY_FRONT
0x07 0x0078Keyboard Stop0x0080KEY_STOP3.00x0056KEYCODE_MEDIA_STOP
0x07 0x0079Keyboard Again0x0081KEY_AGAIN
0x07 0x007aKeyboard Undo0x0083KEY_UNDO
0x07 0x007bKeyboard Cut0x0089KEY_CUT
0x07 0x007cKeyboard Copy0x0085KEY_COPY
0x07 0x007dKeyboard Paste0x0087KEY_PASTE
0x07 0x007eKeyboard Find0x0088KEY_FIND
0x07 0x007fKeyboard Mute0x0071KEY_MUTE3.00x00a4KEYCODE_VOLUME_MUTE
0x07 0x0080Keyboard Volume Up0x0073KEY_VOLUMEUP1.60x0018KEYCODE_VOLUME_UP
0x07 0x0081Keyboard Volume Down0x0072KEY_VOLUMEDOWN1.60x0019KEYCODE_VOLUME_DOWN
0x07 0x0082Keyboard Locking Caps Lock
0x07 0x0083Keyboard Locking Num Lock
0x07 0x0084Keyboard Locking Scroll Lock
0x07 0x0085Keypad Comma0x0079KEY_KPCOMMA3.00x009fKEYCODE_NUMPAD_COMMA
0x07 0x0086Keypad Equal Sign
0x07 0x0087Keyboard International10x0059KEY_RO
0x07 0x0088Keyboard International20x005dKEY_KATAKANAHIRAGANA
0x07 0x0089Keyboard International30x007cKEY_YEN
0x07 0x008aKeyboard International40x005cKEY_HENKAN
0x07 0x008bKeyboard International50x005eKEY_MUHENKAN
0x07 0x008cKeyboard International60x005fKEY_KPJPCOMMA
0x07 0x008dKeyboard International7
0x07 0x008eKeyboard International8
0x07 0x008fKeyboard International9
0x07 0x0090Keyboard LANG10x007aKEY_HANGEUL
0x07 0x0091Keyboard LANG20x007bKEY_HANJA
0x07 0x0092Keyboard LANG30x005aKEY_KATAKANA
0x07 0x0093Keyboard LANG40x005bKEY_HIRAGANA
0x07 0x0094Keyboard LANG50x0055KEY_ZENKAKUHANKAKU
0x07 0x0095Keyboard LANG6
0x07 0x0096Keyboard LANG7
0x07 0x0097Keyboard LANG8
0x07 0x0098Keyboard LANG9
0x07 0x0099Keyboard Alternate Erase
0x07 0x009aKeyboard SysReq/Attention
0x07 0x009bKeyboard Cancel
0x07 0x009cKeyboard Clear
0x07 0x009dKeyboard Prior
0x07 0x009eKeyboard Return
0x07 0x009fKeyboard Separator
0x07 0x00a0Keyboard Out
0x07 0x00a1Keyboard Oper
0x07 0x00a2Keyboard Clear/Again
0x07 0x00a3Keyboard CrSel/Props
0x07 0x00a4Keyboard ExSel
0x07 0x00b0Keypad 00
0x07 0x00b1Keypad 000
0x07 0x00b2Thousands Separator
0x07 0x00b3Decimal Separator
0x07 0x00b4Currency Unit
0x07 0x00b5Currency Sub-unit
0x07 0x00b6Keypad (0x00b3KEY_KPLEFTPAREN3.00x00a2KEYCODE_NUMPAD_LEFT_PAREN
0x07 0x00b7Keypad )0x00b4KEY_KPRIGHTPAREN3.00x00a3KEYCODE_NUMPAD_RIGHT_PAREN
0x07 0x00b8Keypad {
0x07 0x00b9Keypad }
0x07 0x00baKeypad Tab
0x07 0x00bbKeypad Backspace
0x07 0x00bcKeypad A
0x07 0x00bdKeypad B
0x07 0x00beKeypad C
0x07 0x00bfKeypad D
0x07 0x00c0Keypad E
0x07 0x00c1Keypad F
0x07 0x00c2Keypad XOR
0x07 0x00c3Keypad ^
0x07 0x00c4Keypad %
0x07 0x00c5Keypad <
0x07 0x00c6Keypad >
0x07 0x00c7Keypad &
0x07 0x00c8Keypad &&
0x07 0x00c9Keypad |
0x07 0x00caKeypad ||
0x07 0x00cbKeypad :
0x07 0x00ccKeypad #
0x07 0x00cdKeypad Space
0x07 0x00ceKeypad @
0x07 0x00cfKeypad !
0x07 0x00d0Keypad Memory Store
0x07 0x00d1Keypad Memory Recall
0x07 0x00d2Keypad Memory Clear
0x07 0x00d3Keypad Memory Add
0x07 0x00d4Keypad Memory Subtract
0x07 0x00d5Keypad Memory Multiply
0x07 0x00d6Keypad Memory Divide
0x07 0x00d7Keypad +/-
0x07 0x00d8Keypad Clear
0x07 0x00d9Keypad Clear Entry
0x07 0x00daKeypad Binary
0x07 0x00dbKeypad Octal
0x07 0x00dcKeypad Decimal
0x07 0x00ddKeypad Hexadecimal
0x07 0x00e0Keyboard Left Control0x001dKEY_LEFTCTRL3.00x0071KEYCODE_CTRL_LEFT
0x07 0x00e1Keyboard Left Shift0x002aKEY_LEFTSHIFT1.60x003bKEYCODE_SHIFT_LEFT
0x07 0x00e2Keyboard Left Alt0x0038KEY_LEFTALT1.60x0039KEYCODE_ALT_LEFT
0x07 0x00e3Keyboard Left GUI0x007dKEY_LEFTMETA3.00x0075KEYCODE_META_LEFT
0x07 0x00e4Keyboard Right Control0x0061KEY_RIGHTCTRL3.00x0072KEYCODE_CTRL_RIGHT
0x07 0x00e5Keyboard Right Shift0x0036KEY_RIGHTSHIFT1.60x003cKEYCODE_SHIFT_RIGHT
0x07 0x00e6Keyboard Right Alt0x0064KEY_RIGHTALT1.60x003aKEYCODE_ALT_RIGHT
0x07 0x00e7Keyboard Right GUI0x007eKEY_RIGHTMETA3.00x0076KEYCODE_META_RIGHT
0x07 0x00e80x00a4KEY_PLAYPAUSE3.00x0055KEYCODE_MEDIA_PLAY_PAUSE
0x07 0x00e90x00a6KEY_STOPCD3.00x0056KEYCODE_MEDIA_STOP
0x07 0x00ea0x00a5KEY_PREVIOUSSONG3.00x0058KEYCODE_MEDIA_PREVIOUS
0x07 0x00eb0x00a3KEY_NEXTSONG3.00x0057KEYCODE_MEDIA_NEXT
0x07 0x00ec0x00a1KEY_EJECTCD3.00x0081KEYCODE_MEDIA_EJECT
0x07 0x00ed0x0073KEY_VOLUMEUP1.60x0018KEYCODE_VOLUME_UP
0x07 0x00ee0x0072KEY_VOLUMEDOWN1.60x0019KEYCODE_VOLUME_DOWN
0x07 0x00ef0x0071KEY_MUTE3.00x00a4KEYCODE_VOLUME_MUTE
0x07 0x00f00x0096KEY_WWW1.60x0040KEYCODE_EXPLORER
0x07 0x00f10x009eKEY_BACK1.60x0004KEYCODE_BACK
0x07 0x00f20x009fKEY_FORWARD3.00x007dKEYCODE_FORWARD
0x07 0x00f30x0080KEY_STOP3.00x0056KEYCODE_MEDIA_STOP
0x07 0x00f40x0088KEY_FIND
0x07 0x00f50x00b1KEY_SCROLLUP3.00x005cKEYCODE_PAGE_UP
0x07 0x00f60x00b2KEY_SCROLLDOWN3.00x005dKEYCODE_PAGE_DOWN
0x07 0x00f70x00b0KEY_EDIT
0x07 0x00f80x008eKEY_SLEEP
0x07 0x00f90x0098KEY_COFFEE4.00x001aKEYCODE_POWER
0x07 0x00fa0x00adKEY_REFRESH
0x07 0x00fb0x008cKEY_CALC4.0.30x00d2KEYCODE_CALCULATOR

HID Generic Desktop Page (0x01)

HID UsageHID Usage NameLKCLinux Key Code NameVersionAKCAndroid Key Code NameNotes
0x01 0x0081System Power Down0x0074KEY_POWER1.60x001aKEYCODE_POWER
0x01 0x0082System Sleep0x008eKEY_SLEEP4.00x001aKEYCODE_POWER
0x01 0x0083System Wake Up0x008fKEY_WAKEUP4.00x001aKEYCODE_POWER
0x01 0x0084System Context Menu
0x01 0x0085System Main Menu
0x01 0x0086System App Menu
0x01 0x0087System Menu Help
0x01 0x0088System Menu Exit
0x01 0x0089System Menu Select
0x01 0x008aSystem Menu Right
0x01 0x008bSystem Menu Left
0x01 0x008cSystem Menu Up
0x01 0x008dSystem Menu Down
0x01 0x008eSystem Cold Restart
0x01 0x008fSystem Warm Restart
0x01 0x00a0System Dock
0x01 0x00a1System Undock
0x01 0x00a2System Setup
0x01 0x00a3System Break
0x01 0x00a4System Debugger Break
0x01 0x00a5Application Break
0x01 0x00a6Application Debugger Break
0x01 0x00a7System Speaker Mute
0x01 0x00a8System Hibernate
0x01 0x00b0System Display Invert
0x01 0x00b1System Display Internal
0x01 0x00b2System Display External
0x01 0x00b3System Display Both
0x01 0x00b4System Display Dual
0x01 0x00b5System Display Toggle Int/Ext
0x01 0x00b6System Display Swap Prim./Sec.
0x01 0x00b7System Display LCD Autoscale

HID Consumer Page (0x0c)

HID UsageHID Usage NameLKCLinux Key Code NameVersionAKCAndroid Key Code NameNotes
0x0c 0x0030Power
0x0c 0x0031Reset
0x0c 0x0032Sleep
0x0c 0x0033Sleep After
0x0c 0x0034Sleep Mode0x008eKEY_SLEEP4.00x001aKEYCODE_POWER
0x0c 0x0040Menu0x008bKEY_MENU1.60x0052KEYCODE_MENU
0x0c 0x0041Menu Pick
0x0c 0x0042Menu Up
0x0c 0x0043Menu Down
0x0c 0x0044Menu Left
0x0c 0x0045Menu Right0x0181KEY_RADIO
0x0c 0x0046Menu Escape
0x0c 0x0047Menu Value Increase
0x0c 0x0048Menu Value Decrease
0x0c 0x0081Assign Selection
0x0c 0x0082Mode Step
0x0c 0x0083Recall Last0x0195KEY_LAST
0x0c 0x0084Enter Channel
0x0c 0x0085Order Movie
0x0c 0x0088Media Select Computer0x0178KEY_PC
0x0c 0x0089Media Select TV0x0179KEY_TV3.00x00aaKEYCODE_TV
0x0c 0x008aMedia Select WWW0x0096KEY_WWW1.60x0040KEYCODE_EXPLORER
0x0c 0x008bMedia Select DVD0x0185KEY_DVD
0x0c 0x008cMedia Select Telephone0x00a9KEY_PHONE3.00x0005KEYCODE_CALL
0x0c 0x008dMedia Select Program Guide0x016aKEY_PROGRAM3.00x00acKEYCODE_GUIDE
0x0c 0x008eMedia Select Video Phone0x01a0KEY_VIDEOPHONE
0x0c 0x008fMedia Select Games0x01a1KEY_GAMES
0x0c 0x0090Media Select Messages0x018cKEY_MEMO
0x0c 0x0091Media Select CD0x017fKEY_CD
0x0c 0x0092Media Select VCR0x017bKEY_VCR
0x0c 0x0093Media Select Tuner0x0182KEY_TUNER
0x0c 0x0094Quit0x00aeKEY_EXIT
0x0c 0x0095Help0x008aKEY_HELP
0x0c 0x0096Media Select Tape0x0180KEY_TAPE
0x0c 0x0097Media Select Cable0x017aKEY_TV2
0x0c 0x0098Media Select Satellite0x017dKEY_SAT
0x0c 0x0099Media Select Security
0x0c 0x009aMedia Select Home0x016eKEY_PVR3.00x00adKEYCODE_DVR
0x0c 0x009cChannel Increment0x0192KEY_CHANNELUP3.00x00a6KEYCODE_CHANNEL_UP
0x0c 0x009dChannel Decrement0x0193KEY_CHANNELDOWN3.00x00a7KEYCODE_CHANNEL_DOWN
0x0c 0x009eMedia Select SAP
0x0c 0x00a0VCR Plus0x017cKEY_VCR2
0x0c 0x00a1Once
0x0c 0x00a2Daily
0x0c 0x00a3Weekly
0x0c 0x00a4Monthly
0x0c 0x00b0Play0x00cfKEY_PLAY3.00x007eKEYCODE_MEDIA_PLAY
0x0c 0x00b1Pause0x0077KEY_PAUSE3.00x0079KEYCODE_BREAK
0x0c 0x00b2Record0x00a7KEY_RECORD3.00x0082KEYCODE_MEDIA_RECORD
0x0c 0x00b3Fast Forward0x00d0KEY_FASTFORWARD3.00x005aKEYCODE_MEDIA_FAST_FORWARD
0x0c 0x00b4Rewind0x00a8KEY_REWIND3.00x0059KEYCODE_MEDIA_REWIND
0x0c 0x00b5Scan Next Track0x00a3KEY_NEXTSONG3.00x0057KEYCODE_MEDIA_NEXT
0x0c 0x00b6Scan Previous Track0x00a5KEY_PREVIOUSSONG3.00x0058KEYCODE_MEDIA_PREVIOUS
0x0c 0x00b7Stop0x00a6KEY_STOPCD3.00x0056KEYCODE_MEDIA_STOP
0x0c 0x00b8Eject0x00a1KEY_EJECTCD3.00x0081KEYCODE_MEDIA_EJECT
0x0c 0x00b9Random Play
0x0c 0x00baSelect Disc
0x0c 0x00bbEnter Disc
0x0c 0x00bcRepeat0x01b7KEY_MEDIA_REPEAT
0x0c 0x00beTrack Normal
0x0c 0x00c0Frame Forward
0x0c 0x00c1Frame Back
0x0c 0x00c2Mark
0x0c 0x00c3Clear Mark
0x0c 0x00c4Repeat From Mark
0x0c 0x00c5Return To Mark
0x0c 0x00c6Search Mark Forward
0x0c 0x00c7Search Mark Backwards
0x0c 0x00c8Counter Reset
0x0c 0x00c9Show Counter
0x0c 0x00caTracking Increment
0x0c 0x00cbTracking Decrement
0x0c 0x00ccStop / Eject
0x0c 0x00cdPlay / Pause0x00a4KEY_PLAYPAUSE3.00x0055KEYCODE_MEDIA_PLAY_PAUSE
0x0c 0x00cePlay / Skip
0x0c 0x00e2Mute0x0071KEY_MUTE3.00x00a4KEYCODE_VOLUME_MUTE
0x0c 0x00e5Bass Boost0x00d1KEY_BASSBOOST
0x0c 0x00e6Surround Mode
0x0c 0x00e7Loudness
0x0c 0x00e8MPX
0x0c 0x00e9Volume Increment0x0073KEY_VOLUMEUP1.60x0018KEYCODE_VOLUME_UP
0x0c 0x00eaVolume Decrement0x0072KEY_VOLUMEDOWN1.60x0019KEYCODE_VOLUME_DOWN
0x0c 0x0181AL Launch Button Config. Tool
0x0c 0x0182AL Programmable Button Config.0x009cKEY_BOOKMARKS3.00x00aeKEYCODE_BOOKMARK
0x0c 0x0183AL Consumer Control Config.0x00abKEY_CONFIG4.0.30x00d1KEYCODE_MUSIC
0x0c 0x0184AL Word Processor0x01a5KEY_WORDPROCESSOR
0x0c 0x0185AL Text Editor0x01a6KEY_EDITOR
0x0c 0x0186AL Spreadsheet0x01a7KEY_SPREADSHEET
0x0c 0x0187AL Graphics Editor0x01a8KEY_GRAPHICSEDITOR
0x0c 0x0188AL Presentation App0x01a9KEY_PRESENTATION
0x0c 0x0189AL Database App0x01aaKEY_DATABASE
0x0c 0x018aAL Email Reader0x009bKEY_MAIL1.60x0041KEYCODE_ENVELOPE
0x0c 0x018bAL Newsreader0x01abKEY_NEWS
0x0c 0x018cAL Voicemail0x01acKEY_VOICEMAIL
0x0c 0x018dAL Contacts / Address Book0x01adKEY_ADDRESSBOOK4.0.30x00cfKEYCODE_CONTACTS
0x0c 0x018eAL Calendar / Schedule0x018dKEY_CALENDAR4.0.30x00d0KEYCODE_CALENDAR
0x0c 0x018fAL Task / Project Manager
0x0c 0x0190AL Log / Journal / Timecard
0x0c 0x0191AL Checkbook / Finance0x00dbKEY_FINANCE
0x0c 0x0192AL Calculator0x008cKEY_CALC4.0.30x00d2KEYCODE_CALCULATOR
0x0c 0x0193AL A/V Capture / Playback
0x0c 0x0194AL Local Machine Browser0x0090KEY_FILE
0x0c 0x0195AL LAN/WAN Browser
0x0c 0x0196AL Internet Browser0x0096KEY_WWW1.60x0040KEYCODE_EXPLORER
0x0c 0x0197AL Remote Networking/ISP Connect
0x0c 0x0198AL Network Conference
0x0c 0x0199AL Network Chat0x00d8KEY_CHAT
0x0c 0x019aAL Telephony / Dialer
0x0c 0x019bAL Logon
0x0c 0x019cAL Logoff0x01b1KEY_LOGOFF
0x0c 0x019dAL Logon / Logoff
0x0c 0x019eAL Terminal Lock / Screensaver0x0098KEY_COFFEE4.00x001aKEYCODE_POWER
0x0c 0x019fAL Control Panel
0x0c 0x01a0AL Command Line Processor / Run
0x0c 0x01a1AL Process / Task Manager
0x0c 0x01a2AL Select Task / Application
0x0c 0x01a3AL Next Task / Application
0x0c 0x01a4AL Previous Task / Application
0x0c 0x01a5AL Preemptive Halt Task / App.
0x0c 0x01a6AL Integrated Help Center0x008aKEY_HELP
0x0c 0x01a7AL Documents0x00ebKEY_DOCUMENTS
0x0c 0x01a8AL Thesaurus
0x0c 0x01a9AL Dictionary
0x0c 0x01aaAL Desktop
0x0c 0x01abAL Spell Check0x01b0KEY_SPELLCHECK
0x0c 0x01acAL Grammar Check
0x0c 0x01adAL Wireless Status
0x0c 0x01aeAL Keyboard Layout
0x0c 0x01afAL Virus Protection
0x0c 0x01b0AL Encryption
0x0c 0x01b1AL Screen Saver
0x0c 0x01b2AL Alarms
0x0c 0x01b3AL Clock
0x0c 0x01b4AL File Browser
0x0c 0x01b5AL Power Status
0x0c 0x01b6AL Image Browser0x00e2KEY_MEDIA3.00x004fKEYCODE_HEADSETHOOK
0x0c 0x01b7AL Audio Browser0x00d5KEY_SOUND4.0.30x00d1KEYCODE_MUSIC
0x0c 0x01b8AL Movie Browser
0x0c 0x01b9AL Digital Rights Manager
0x0c 0x01baAL Digital Wallet
0x0c 0x01bcAL Instant Messaging0x01aeKEY_MESSENGER
0x0c 0x01bdAL OEM Features / Tips Browser0x0166KEY_INFO
0x0c 0x01beAL OEM Help
0x0c 0x01bfAL Online Community
0x0c 0x01c0AL Entertainment Content Browser
0x0c 0x01c1AL Online Shopping Browser
0x0c 0x01c2AL SmartCard Information / Help
0x0c 0x01c3AL Market / Finance Browser
0x0c 0x01c4AL Customized Corp. News Browser
0x0c 0x01c5AL Online Activity Browser
0x0c 0x01c6AL Research / Search Browser
0x0c 0x01c7AL Audio Player
0x0c 0x0201AC New0x00b5KEY_NEW
0x0c 0x0202AC Open0x0086KEY_OPEN
0x0c 0x0203AC Close0x00ceKEY_CLOSE
0x0c 0x0204AC Exit0x00aeKEY_EXIT
0x0c 0x0205AC Maximize
0x0c 0x0206AC Minimize
0x0c 0x0207AC Save0x00eaKEY_SAVE
0x0c 0x0208AC Print0x00d2KEY_PRINT
0x0c 0x0209AC Properties0x0082KEY_PROPS
0x0c 0x021aAC Undo0x0083KEY_UNDO
0x0c 0x021bAC Copy0x0085KEY_COPY
0x0c 0x021cAC Cut0x0089KEY_CUT
0x0c 0x021dAC Paste0x0087KEY_PASTE
0x0c 0x021eAC Select All
0x0c 0x021fAC Find0x0088KEY_FIND
0x0c 0x0220AC Find and Replace
0x0c 0x0221AC Search0x00d9KEY_SEARCH1.60x0054KEYCODE_SEARCH
0x0c 0x0222AC Go To0x0162KEY_GOTO
0x0c 0x0223AC Home0x00acKEY_HOMEPAGE3.00x0003KEYCODE_HOME
0x0c 0x0224AC Back0x009eKEY_BACK1.60x0004KEYCODE_BACK
0x0c 0x0225AC Forward0x009fKEY_FORWARD3.00x007dKEYCODE_FORWARD
0x0c 0x0226AC Stop0x0080KEY_STOP3.00x0056KEYCODE_MEDIA_STOP
0x0c 0x0227AC Refresh0x00adKEY_REFRESH
0x0c 0x0228AC Previous Link
0x0c 0x0229AC Next Link
0x0c 0x022aAC Bookmarks0x009cKEY_BOOKMARKS3.00x00aeKEYCODE_BOOKMARK
0x0c 0x022bAC History
0x0c 0x022cAC Subscriptions
0x0c 0x022dAC Zoom In0x01a2KEY_ZOOMIN
0x0c 0x022eAC Zoom Out0x01a3KEY_ZOOMOUT
0x0c 0x022fAC Zoom0x01a4KEY_ZOOMRESET2
0x0c 0x0230AC Full Screen View
0x0c 0x0231AC Normal View
0x0c 0x0232AC View Toggle
0x0c 0x0233AC Scroll Up0x00b1KEY_SCROLLUP3.00x005cKEYCODE_PAGE_UP
0x0c 0x0234AC Scroll Down0x00b2KEY_SCROLLDOWN3.00x005dKEYCODE_PAGE_DOWN
0x0c 0x0236AC Pan Left
0x0c 0x0237AC Pan Right
0x0c 0x0239AC New Window
0x0c 0x023aAC Tile Horizontally
0x0c 0x023bAC Tile Vertically
0x0c 0x023cAC Format
0x0c 0x023dAC Edit
0x0c 0x023eAC Bold
0x0c 0x023fAC Italics
0x0c 0x0240AC Underline
0x0c 0x0241AC Strikethrough
0x0c 0x0242AC Subscript
0x0c 0x0243AC Superscript
0x0c 0x0244AC All Caps
0x0c 0x0245AC Rotate
0x0c 0x0246AC Resize
0x0c 0x0247AC Flip horizontal
0x0c 0x0248AC Flip Vertical
0x0c 0x0249AC Mirror Horizontal
0x0c 0x024aAC Mirror Vertical
0x0c 0x024bAC Font Select
0x0c 0x024cAC Font Color
0x0c 0x024dAC Font Size
0x0c 0x024eAC Justify Left
0x0c 0x024fAC Justify Center H
0x0c 0x0250AC Justify Right
0x0c 0x0251AC Justify Block H
0x0c 0x0252AC Justify Top
0x0c 0x0253AC Justify Center V
0x0c 0x0254AC Justify Bottom
0x0c 0x0255AC Justify Block V
0x0c 0x0256AC Indent Decrease
0x0c 0x0257AC Indent Increase
0x0c 0x0258AC Numbered List
0x0c 0x0259AC Restart Numbering
0x0c 0x025aAC Bulleted List
0x0c 0x025bAC Promote
0x0c 0x025cAC Demote
0x0c 0x025dAC Yes
0x0c 0x025eAC No
0x0c 0x025fAC Cancel0x00dfKEY_CANCEL
0x0c 0x0260AC Catalog
0x0c 0x0261AC Buy / Checkout
0x0c 0x0262AC Add to Cart
0x0c 0x0263AC Expand
0x0c 0x0264AC Expand All
0x0c 0x0265AC Collapse
0x0c 0x0266AC Collapse All
0x0c 0x0267AC Print Preview
0x0c 0x0268AC Paste Special
0x0c 0x0269AC Insert Mode
0x0c 0x026aAC Delete
0x0c 0x026bAC Lock
0x0c 0x026cAC Unlock
0x0c 0x026dAC Protect
0x0c 0x026eAC Unprotect
0x0c 0x026fAC Attach Comment
0x0c 0x0270AC Delete Comment
0x0c 0x0271AC View Comment
0x0c 0x0272AC Select Word
0x0c 0x0273AC Select Sentence
0x0c 0x0274AC Select Paragraph
0x0c 0x0275AC Select Column
0x0c 0x0276AC Select Row
0x0c 0x0277AC Select Table
0x0c 0x0278AC Select Object
0x0c 0x0279AC Redo / Repeat0x00b6KEY_REDO
0x0c 0x027aAC Sort
0x0c 0x027bAC Sort Ascending
0x0c 0x027cAC Sort Descending
0x0c 0x027dAC Filter
0x0c 0x027eAC Set Clock
0x0c 0x027fAC View Clock
0x0c 0x0280AC Select Time Zone
0x0c 0x0281AC Edit Time Zones
0x0c 0x0282AC Set Alarm
0x0c 0x0283AC Clear Alarm
0x0c 0x0284AC Snooze Alarm
0x0c 0x0285AC Reset Alarm
0x0c 0x0286AC Synchronize
0x0c 0x0287AC Send/Receive
0x0c 0x0288AC Send To
0x0c 0x0289AC Reply0x00e8KEY_REPLY
0x0c 0x028aAC Reply All
0x0c 0x028bAC Forward Msg0x00e9KEY_FORWARDMAIL
0x0c 0x028cAC Send0x00e7KEY_SEND
0x0c 0x028dAC Attach File
0x0c 0x028eAC Upload
0x0c 0x028fAC Download (Save Target As)
0x0c 0x0290AC Set Borders
0x0c 0x0291AC Insert Row
0x0c 0x0292AC Insert Column
0x0c 0x0293AC Insert File
0x0c 0x0294AC Insert Picture
0x0c 0x0295AC Insert Object
0x0c 0x0296AC Insert Symbol
0x0c 0x0297AC Save and Close
0x0c 0x0298AC Rename
0x0c 0x0299AC Merge
0x0c 0x029aAC Split
0x0c 0x029bAC Distribute Horizontally
0x0c 0x029cAC Distribute Vertically

Additional non-HID Mappings

These mappings describe functions that do not appear in HID but for which Linux key codes exist.

LKCLinux Key Code NameVersionAKCAndroid Key Code NameNotes
0x01d0KEY_FN3.00x0077KEYCODE_FUNCTION
0x01d1KEY_FN_ESC3.00x006fKEYCODE_ESCAPE3
0x01d2KEY_FN_F13.00x0083KEYCODE_F13
0x01d3KEY_FN_F23.00x0084KEYCODE_F23
0x01d4KEY_FN_F33.00x0085KEYCODE_F33
0x01d5KEY_FN_F43.00x0086KEYCODE_F43
0x01d6KEY_FN_F53.00x0087KEYCODE_F53
0x01d7KEY_FN_F63.00x0088KEYCODE_F63
0x01d8KEY_FN_F73.00x0089KEYCODE_F73
0x01d9KEY_FN_F83.00x008aKEYCODE_F83
0x01daKEY_FN_F93.00x008bKEYCODE_F93
0x01dbKEY_FN_F103.00x008cKEYCODE_F103
0x01dcKEY_FN_F113.00x008dKEYCODE_F113
0x01ddKEY_FN_F123.00x008eKEYCODE_F123
0x01deKEY_FN_13.00x0008KEYCODE_13
0x01dfKEY_FN_23.00x0009KEYCODE_23
0x01e0KEY_FN_D3.00x0020KEYCODE_D3
0x01e1KEY_FN_E3.00x0021KEYCODE_E3
0x01e2KEY_FN_F3.00x0022KEYCODE_F3
0x01e3KEY_FN_S3.00x002fKEYCODE_S3
0x01e4KEY_FN_B3.00x001eKEYCODE_B3

Legacy Unsupported Keys

These mappings appeared in previous versions of Android but were inconsistent with HID or used non-standard Linux key codes. They are no longer supported.

LKCLinux Key Code NameVersionAKCAndroid Key Code NameNotes
0x00dbKEY_EMAIL1.60x004dKEYCODE_AT4
""""4.04
0x00e3KEY_STAR1.60x0011KEYCODE_STAR4
""""4.04
0x00e4KEY_SHARP1.60x0012KEYCODE_POUND4
""""4.04
0x00e5KEY_SOFT11.60x0052KEYCODE_MENU4
""""4.04
0x00e6KEY_SOFT21.60x0002KEYCODE_SOFT_RIGHT4
""""4.04
0x00e7KEY_SEND1.60x0005KEYCODE_CALL4
""""4.04
0x00e8KEY_CENTER1.60x0017KEYCODE_DPAD_CENTER4
""""4.04
0x00e9KEY_HEADSETHOOK1.60x004fKEYCODE_HEADSETHOOK4
""""4.04
0x00eaKEY_0_51.64
0x00ebKEY_2_51.64

Notes

  1. The Android key code associated with common alphanumeric and symbolic keys may vary based on the keyboard layout and language. For historical reasons, the physical scan codes and HID usages associated with keys on a keyboard are often defined positionally even though the labels printed on those keys may vary from one language to another.

    On a US English (QWERTY) keyboard, the top-left alphabetic key is labeled Q. On a French (AZERTY) keyboard, the key in the same position is labeled A. Despite the label, on both keyboards the top-left alphabetic key is referred to using the HID usage 0x07 0x0014 which is mapped to the Linux key code KEY_Q.

    When Android is configured with a US English keyboard layout, then the Linux key code KEY_Q will be mapped to the Android key code KEYCODE_Q and will produce the characters ‘Q’ and ‘q’. However, when Android is configured with a French keyboard layout, then the Linux key code KEY_Q will be mapped to the Android key code KEYCODE_A and will produce the characters ‘A’ and ‘a’.

    The Android key code typically reflects the language-specific interpretation of the key, so a different Android key code may be used for different languages.

  2. 0x0c 0x022f AC Zoom is defined in the HID as a linear control but the kernel maps it as a key, which is probably incorrect.

  3. The Linux function keys KEY_FN_* are mapped to simpler key codes but are dispatched with the META_FUNCTION meta state bit set to true.

  4. Prior to Android Ice Cream Sandwich 4.0, the default key layout contained mappings for some extra key codes that were not defined in the mainline Linux kernel headers. These mappings have since been removed because these previously undefined key codes have since been assigned different meanings in more recent versions of the Linux kernel.

Sources

  1. USB HID Usage Tables v1.12
  2. Linux 2.6.39 kernel: include/linux/input.h, drivers/hid/hid-input.c
  3. Android ICS: qwerty.kl, Generic.kl, KeyEvent.java