Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/view/KeyEvent#nestedclasses) \| [Constants](https://developer.android.com/reference/android/view/KeyEvent#constants) \| [Inherited Constants](https://developer.android.com/reference/android/view/KeyEvent#inhconstants) \| [Fields](https://developer.android.com/reference/android/view/KeyEvent#lfields) \| [Inherited Fields](https://developer.android.com/reference/android/view/KeyEvent#inhfields) \| [Ctors](https://developer.android.com/reference/android/view/KeyEvent#pubctors) \| [Methods](https://developer.android.com/reference/android/view/KeyEvent#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/KeyEvent#inhmethods)

# KeyEvent

*** ** * ** ***


`
public


class
KeyEvent
`


`


`

`

extends https://developer.android.com/reference/android/view/InputEvent


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.view.InputEvent](https://developer.android.com/reference/android/view/InputEvent) ||
|   | ↳ | android.view.KeyEvent |

<br />

*** ** * ** ***

Object used to report key and button events.


Each key press is described by a sequence of key events. A key press
starts with a key event with `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN`. If the key is held
sufficiently long that it repeats, then the initial down is followed
additional key events with `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` and a non-zero value for
`https://developer.android.com/reference/android/view/KeyEvent#getRepeatCount()`. The last key event is a `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`
for the key up. If the key press is canceled, the key up event will have the
`https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED` flag set.


Key events are generally accompanied by a key code (`https://developer.android.com/reference/android/view/KeyEvent#getKeyCode()`),
scan code (`https://developer.android.com/reference/android/view/KeyEvent#getScanCode()`) and meta state (`https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`).
Key code constants are defined in this class. Scan code constants are raw
device-specific codes obtained from the OS and so are not generally meaningful
to applications unless interpreted using the `https://developer.android.com/reference/android/view/KeyCharacterMap`.
Meta states describe the pressed state of key modifiers
such as `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON` or `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`.


Key codes typically correspond one-to-one with individual keys on an input device.
Many keys and key combinations serve quite different functions on different
input devices so care must be taken when interpreting them. Always use the
`https://developer.android.com/reference/android/view/KeyCharacterMap` associated with the input device when mapping keys
to characters. Be aware that there may be multiple key input devices active
at the same time and each will have its own key character map.


As soft input methods can use multiple and inventive ways of inputting text,
there is no guarantee that any key press on a soft keyboard will generate a key
event: this is left to the IME's discretion, and in fact sending such events is
discouraged. You should never rely on receiving KeyEvents for any key on a soft
input method. In particular, the default software keyboard will never send any
key event to any application targetting Jelly Bean or later, and will only send
events for some presses of the delete and return keys to applications targetting
Ice Cream Sandwich or earlier. Be aware that other software input methods may
never send key events regardless of the version. Consider using editor actions
like `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_DONE` if you need
specific interaction with the software keyboard, as it gives more visibility to
the user as to how your application will react to key presses.


In general, the framework cannot guarantee that the key events it delivers
to a view always constitute complete key sequences since some events may be dropped
or modified by containing views before they are delivered. The view implementation
should be prepared to handle `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED` and should tolerate anomalous
situations such as receiving a new `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` without first having
received an `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` for the prior key press.


Refer to `https://developer.android.com/reference/android/view/InputDevice` for more information about how different kinds of
input devices and sources represent keys and buttons.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` interface` | `https://developer.android.com/reference/android/view/KeyEvent.Callback` |
| ` class` | `https://developer.android.com/reference/android/view/KeyEvent.DispatcherState` Use with `https://developer.android.com/reference/android/view/KeyEvent#dispatch(android.view.KeyEvent.Callback,%20android.view.KeyEvent.DispatcherState,%20java.lang.Object)` for more advanced key dispatching, such as long presses. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` `https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: the key has been pressed down. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#ACTION_MULTIPLE` *This constant was deprecated in API level 29. No longer used by the input system. `https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: multiple duplicate key events have occurred in a row, or a complex string is being delivered. If the key code is not `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN` then the `https://developer.android.com/reference/android/view/KeyEvent#getRepeatCount()` method returns the number of times the given key code should be executed. Otherwise, if the key code is `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN`, then this is a sequence of characters as returned by `https://developer.android.com/reference/android/view/KeyEvent#getCharacters()`.* |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` `https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: the key has been released. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED` When associated with up key events, this indicates that the key press has been canceled. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED_LONG_PRESS` Set when a key event has `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED` set because a long press action was executed while it was down. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_EDITOR_ACTION` This mask is used for compatibility, to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done". |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_FALLBACK` Set when a key event has been synthesized to implement default behavior for an event that the application did not handle. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_FROM_SYSTEM` This mask is set if an event was known to come from a trusted part of the system. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_KEEP_TOUCH_MODE` This mask is set if we don't want the key event to cause us to leave touch mode. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_LONG_PRESS` This flag is set for the first key repeat that occurs after the long press timeout. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_SOFT_KEYBOARD` This mask is set if the key event was generated by a software keyboard. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_TRACKING` Set for `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` when this event's key code is still being tracked from its initial down. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_VIRTUAL_HARD_KEY` This key event was generated by a virtual (on-screen) hard key area. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#FLAG_WOKE_HERE` *This constant was deprecated in API level 20. This flag will never be set by the system since the system consumes all wake keys itself.* |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_0` Key code constant: '0' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_1` Key code constant: '1' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_11` Key code constant: '11' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_12` Key code constant: '12' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_2` Key code constant: '2' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_3` Key code constant: '3' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_3D_MODE` Key code constant: 3D Mode key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_4` Key code constant: '4' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_5` Key code constant: '5' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_6` Key code constant: '6' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_7` Key code constant: '7' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_8` Key code constant: '8' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_9` Key code constant: '9' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_A` Key code constant: 'A' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ACCESSIBILITY` Key code constant: System Accessibility key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALL_APPS` Key code constant: Show all apps. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT` Key code constant: Left Alt modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_RIGHT` Key code constant: Right Alt modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_APOSTROPHE` Key code constant: ''' (apostrophe) key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_APP_SWITCH` Key code constant: App switch key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ASSIST` Key code constant: Assist key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_AT` Key code constant: '@' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_AVR_INPUT` Key code constant: A/V Receiver input key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_AVR_POWER` Key code constant: A/V Receiver power key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_B` Key code constant: 'B' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BACK` Key code constant: Back key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BACKSLASH` Key code constant: '\\' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BOOKMARK` Key code constant: Bookmark key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BREAK` Key code constant: Break / Pause key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BRIGHTNESS_DOWN` Key code constant: Brightness Down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BRIGHTNESS_UP` Key code constant: Brightness Up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_1` Key code constant: Generic Game Pad Button #1. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_10` Key code constant: Generic Game Pad Button #10. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_11` Key code constant: Generic Game Pad Button #11. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_12` Key code constant: Generic Game Pad Button #12. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_13` Key code constant: Generic Game Pad Button #13. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_14` Key code constant: Generic Game Pad Button #14. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_15` Key code constant: Generic Game Pad Button #15. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_16` Key code constant: Generic Game Pad Button #16. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_2` Key code constant: Generic Game Pad Button #2. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_3` Key code constant: Generic Game Pad Button #3. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_4` Key code constant: Generic Game Pad Button #4. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_5` Key code constant: Generic Game Pad Button #5. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_6` Key code constant: Generic Game Pad Button #6. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_7` Key code constant: Generic Game Pad Button #7. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_8` Key code constant: Generic Game Pad Button #8. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_9` Key code constant: Generic Game Pad Button #9. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_A` Key code constant: A Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_B` Key code constant: B Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_C` Key code constant: C Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_L1` Key code constant: L1 Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_L2` Key code constant: L2 Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_MODE` Key code constant: Mode Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_R1` Key code constant: R1 Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_R2` Key code constant: R2 Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_SELECT` Key code constant: Select Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_START` Key code constant: Start Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_THUMBL` Key code constant: Left Thumb Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_THUMBR` Key code constant: Right Thumb Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_X` Key code constant: X Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_Y` Key code constant: Y Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_Z` Key code constant: Z Button key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_C` Key code constant: 'C' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CALCULATOR` Key code constant: Calculator special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CALENDAR` Key code constant: Calendar special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CALL` Key code constant: Call key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAMERA` Key code constant: Camera key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK` Key code constant: Caps Lock key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPTIONS` Key code constant: Toggle captions key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CHANNEL_DOWN` Key code constant: Channel down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CHANNEL_UP` Key code constant: Channel up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CLEAR` Key code constant: Clear key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CLOSE` Key code constant: AC Close. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_COMMA` Key code constant: ',' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CONTACTS` Key code constant: Contacts special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CONTEXTUAL_INSERT` Key code constant: Contextual Insert key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CONTEXTUAL_QUERY` Key code constant: Contextual Query key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CONTEXTUAL_SEARCH` Key code constant: Contextual Search key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_COPY` Key code constant: Copy key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_LEFT` Key code constant: Left Control modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_RIGHT` Key code constant: Right Control modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CUT` Key code constant: Cut key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_D` Key code constant: 'D' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEL` Key code constant: Backspace key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEMO_APP_1` Key code constant: Demo Application key #1. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEMO_APP_2` Key code constant: Demo Application key #2. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEMO_APP_3` Key code constant: Demo Application key #3. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEMO_APP_4` Key code constant: Demo Application key #4. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DICTATE` Key code constant: To start dictate to an input field |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DO_NOT_DISTURB` Key code constant: To toggle 'Do Not Disturb' mode. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER` Key code constant: Directional Pad Center key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN` Key code constant: Directional Pad Down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN_LEFT` Key code constant: Directional Pad Down-Left. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN_RIGHT` Key code constant: Directional Pad Down-Right. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_LEFT` Key code constant: Directional Pad Left key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_RIGHT` Key code constant: Directional Pad Right key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_UP` Key code constant: Directional Pad Up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_UP_LEFT` Key code constant: Directional Pad Up-Left. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_UP_RIGHT` Key code constant: Directional Pad Up-Right. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DVR` Key code constant: DVR key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_E` Key code constant: 'E' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_EISU` Key code constant: Japanese alphanumeric key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_EMOJI_PICKER` Key code constant: To open emoji picker. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENDCALL` Key code constant: End Call key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER` Key code constant: Enter key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENVELOPE` Key code constant: Envelope special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_EQUALS` Key code constant: '=' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ESCAPE` Key code constant: Escape key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_EXPLORER` Key code constant: Explorer special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F` Key code constant: 'F' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F1` Key code constant: F1 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F10` Key code constant: F10 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F11` Key code constant: F11 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F12` Key code constant: F12 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F13` Key code constant: F13 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F14` Key code constant: F14 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F15` Key code constant: F15 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F16` Key code constant: F16 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F17` Key code constant: F17 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F18` Key code constant: F18 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F19` Key code constant: F19 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F2` Key code constant: F2 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F20` Key code constant: F20 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F21` Key code constant: F21 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F22` Key code constant: F22 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F23` Key code constant: F23 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F24` Key code constant: F24 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F3` Key code constant: F3 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F4` Key code constant: F4 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F5` Key code constant: F5 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F6` Key code constant: F6 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F7` Key code constant: F7 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F8` Key code constant: F8 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_F9` Key code constant: F9 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FEATURED_APP_1` Key code constant: Featured Application key #1. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FEATURED_APP_2` Key code constant: Featured Application key #2. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FEATURED_APP_3` Key code constant: Featured Application key #3. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FEATURED_APP_4` Key code constant: Featured Application key #4. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FOCUS` Key code constant: Camera Focus key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FORWARD` Key code constant: Forward key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FORWARD_DEL` Key code constant: Forward Delete key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FULLSCREEN` Key code constant: To toggle fullscreen mode (on the current application). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FUNCTION` Key code constant: Function modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_G` Key code constant: 'G' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_GRAVE` Key code constant: '\`' (backtick) key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_GUIDE` Key code constant: Guide key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_H` Key code constant: 'H' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_HEADSETHOOK` Key code constant: Headset Hook key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_HELP` Key code constant: Help key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_HENKAN` Key code constant: Japanese conversion key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_HOME` Key code constant: Home key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_I` Key code constant: 'I' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_INFO` Key code constant: Info key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_INSERT` Key code constant: Insert key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_J` Key code constant: 'J' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_K` Key code constant: 'K' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_KANA` Key code constant: Japanese kana key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_KATAKANA_HIRAGANA` Key code constant: Japanese katakana / hiragana key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_KEYBOARD_BACKLIGHT_DOWN` Key code constant: Keyboard backlight down. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_KEYBOARD_BACKLIGHT_TOGGLE` Key code constant: Keyboard backlight toggle. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_KEYBOARD_BACKLIGHT_UP` Key code constant: Keyboard backlight up. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_L` Key code constant: 'L' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_LANGUAGE_SWITCH` Key code constant: Language Switch key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_LAST_CHANNEL` Key code constant: Last Channel key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_LEFT_BRACKET` Key code constant: '\[' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_LOCK` Key code constant: To lock the screen. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_M` Key code constant: 'M' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MACRO_1` Key code constant: A button whose usage can be customized by the user through the system. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MACRO_2` Key code constant: A button whose usage can be customized by the user through the system. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MACRO_3` Key code constant: A button whose usage can be customized by the user through the system. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MACRO_4` Key code constant: A button whose usage can be customized by the user through the system. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MANNER_MODE` Key code constant: Manner Mode key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_AUDIO_TRACK` Key code constant: Audio Track key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_CLOSE` Key code constant: Close media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_EJECT` Key code constant: Eject media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_FAST_FORWARD` Key code constant: Fast Forward media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_NEXT` Key code constant: Play Next media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PAUSE` Key code constant: Pause media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PLAY` Key code constant: Play media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PLAY_PAUSE` Key code constant: Play/Pause media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PREVIOUS` Key code constant: Play Previous media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_RECORD` Key code constant: Record media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_REWIND` Key code constant: Rewind media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_SKIP_BACKWARD` Key code constant: Skip backward media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_SKIP_FORWARD` Key code constant: Skip forward media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_STEP_BACKWARD` Key code constant: Step backward media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_STEP_FORWARD` Key code constant: Step forward media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_STOP` Key code constant: Stop media key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_TOP_MENU` Key code constant: Media Top Menu key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MENU` Key code constant: Menu key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_LEFT` Key code constant: Left Meta modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_RIGHT` Key code constant: Right Meta modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MINUS` Key code constant: '-'. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MOVE_END` Key code constant: End Movement key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MOVE_HOME` Key code constant: Home Movement key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MUHENKAN` Key code constant: Japanese non-conversion key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MUSIC` Key code constant: Music special function key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MUTE` Key code constant: Mute key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_N` Key code constant: 'N' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NAVIGATE_IN` Key code constant: Navigate in key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NAVIGATE_NEXT` Key code constant: Navigate to next key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NAVIGATE_OUT` Key code constant: Navigate out key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NAVIGATE_PREVIOUS` Key code constant: Navigate to previous key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NEW` Key code constant: AC New. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NOTIFICATION` Key code constant: Notification key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM` Key code constant: Number modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_0` Key code constant: Numeric keypad '0' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_1` Key code constant: Numeric keypad '1' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_2` Key code constant: Numeric keypad '2' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_3` Key code constant: Numeric keypad '3' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_4` Key code constant: Numeric keypad '4' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_5` Key code constant: Numeric keypad '5' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_6` Key code constant: Numeric keypad '6' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_7` Key code constant: Numeric keypad '7' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_8` Key code constant: Numeric keypad '8' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_9` Key code constant: Numeric keypad '9' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_ADD` Key code constant: Numeric keypad '+' key (for addition). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_COMMA` Key code constant: Numeric keypad ',' key (for decimals or digit grouping). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_DIVIDE` Key code constant: Numeric keypad '/' key (for division). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_DOT` Key code constant: Numeric keypad '.' key (for decimals or digit grouping). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_ENTER` Key code constant: Numeric keypad Enter key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_EQUALS` Key code constant: Numeric keypad '=' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_LEFT_PAREN` Key code constant: Numeric keypad '(' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_MULTIPLY` Key code constant: Numeric keypad '\*' key (for multiplication). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_RIGHT_PAREN` Key code constant: Numeric keypad ')' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUMPAD_SUBTRACT` Key code constant: Numeric keypad '-' key (for subtraction). |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` Key code constant: Num Lock key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_O` Key code constant: 'O' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_P` Key code constant: 'P' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PAGE_DOWN` Key code constant: Page Down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PAGE_UP` Key code constant: Page Up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PAIRING` Key code constant: Pairing key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PASTE` Key code constant: Paste key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PERIOD` Key code constant: '.' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PICTSYMBOLS` Key code constant: Picture Symbols modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PLUS` Key code constant: '+' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_POUND` Key code constant: '#' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_POWER` Key code constant: Power key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PRINT` Key code constant: To print. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PROFILE_SWITCH` Key code constant: Used to switch current `https://developer.android.com/reference/android/accounts/Account` that is consuming content. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PROG_BLUE` Key code constant: Blue "programmable" key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PROG_GREEN` Key code constant: Green "programmable" key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PROG_RED` Key code constant: Red "programmable" key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_PROG_YELLOW` Key code constant: Yellow "programmable" key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_Q` Key code constant: 'Q' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_R` Key code constant: 'R' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_RECENT_APPS` Key code constant: To open recent apps view (a.k.a. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_REFRESH` Key code constant: Refresh key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_RIGHT_BRACKET` Key code constant: '\]' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_RO` Key code constant: Japanese Ro key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_S` Key code constant: 'S' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCREENSHOT` Key code constant: To take a screenshot. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK` Key code constant: Scroll Lock key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SEARCH` Key code constant: Search key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SEMICOLON` Key code constant: ';' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SETTINGS` Key code constant: Settings key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_LEFT` Key code constant: Left Shift modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_RIGHT` Key code constant: Right Shift modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SLASH` Key code constant: '/' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SLEEP` Key code constant: Sleep key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SOFT_LEFT` Key code constant: Soft Left key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SOFT_RIGHT` Key code constant: Soft Right key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SOFT_SLEEP` Key code constant: Put device to sleep unless a wakelock is held. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SPACE` Key code constant: Space key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STAR` Key code constant: '\*' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STB_INPUT` Key code constant: Set-top-box input key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STB_POWER` Key code constant: Set-top-box power key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STEM_1` Key code constant: Generic stem key 1 for Wear. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STEM_2` Key code constant: Generic stem key 2 for Wear. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STEM_3` Key code constant: Generic stem key 3 for Wear. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STEM_PRIMARY` Key code constant: Primary stem key for Wear. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STYLUS_BUTTON_PRIMARY` Key code constant: The primary button on the barrel of a stylus. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STYLUS_BUTTON_SECONDARY` Key code constant: The secondary button on the barrel of a stylus. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STYLUS_BUTTON_TAIL` Key code constant: A button on the tail end of a stylus. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_STYLUS_BUTTON_TERTIARY` Key code constant: The tertiary button on the barrel of a stylus. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SWITCH_CHARSET` Key code constant: Switch Charset modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYM` Key code constant: Symbol modifier key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSRQ` Key code constant: System Request / Print Screen key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSTEM_NAVIGATION_DOWN` Key code constant: Consumed by the system for navigation down. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSTEM_NAVIGATION_LEFT` Key code constant: Consumed by the system for navigation left. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSTEM_NAVIGATION_RIGHT` Key code constant: Consumed by the system for navigation right. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSTEM_NAVIGATION_UP` Key code constant: Consumed by the system for navigation up. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_T` Key code constant: 'T' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TAB` Key code constant: Tab key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_THUMBS_DOWN` Key code constant: Thumbs down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_THUMBS_UP` Key code constant: Thumbs up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV` Key code constant: TV key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_ANTENNA_CABLE` Key code constant: Antenna/Cable key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_AUDIO_DESCRIPTION` Key code constant: Audio description key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN` Key code constant: Audio description mixing volume down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP` Key code constant: Audio description mixing volume up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_CONTENTS_MENU` Key code constant: Contents menu key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_DATA_SERVICE` Key code constant: TV data service key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT` Key code constant: TV input key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_COMPONENT_1` Key code constant: Component #1 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_COMPONENT_2` Key code constant: Component #2 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_COMPOSITE_1` Key code constant: Composite #1 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_COMPOSITE_2` Key code constant: Composite #2 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_HDMI_1` Key code constant: HDMI #1 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_HDMI_2` Key code constant: HDMI #2 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_HDMI_3` Key code constant: HDMI #3 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_HDMI_4` Key code constant: HDMI #4 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_INPUT_VGA_1` Key code constant: VGA #1 key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_MEDIA_CONTEXT_MENU` Key code constant: Media context menu key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_NETWORK` Key code constant: Toggle Network key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_NUMBER_ENTRY` Key code constant: Number entry key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_POWER` Key code constant: TV power key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_RADIO_SERVICE` Key code constant: Radio key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_SATELLITE` Key code constant: Satellite key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_SATELLITE_BS` Key code constant: BS key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_SATELLITE_CS` Key code constant: CS key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_SATELLITE_SERVICE` Key code constant: BS/CS key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_TELETEXT` Key code constant: Teletext key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_TERRESTRIAL_ANALOG` Key code constant: Analog Terrestrial key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_TERRESTRIAL_DIGITAL` Key code constant: Digital Terrestrial key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_TIMER_PROGRAMMING` Key code constant: Timer programming key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_TV_ZOOM_MODE` Key code constant: Zoom mode key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_U` Key code constant: 'U' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN` Key code constant: Unknown key code. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_V` Key code constant: 'V' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_1` Key code constant: Video Application key #1. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_2` Key code constant: Video Application key #2. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_3` Key code constant: Video Application key #3. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_4` Key code constant: Video Application key #4. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_5` Key code constant: Video Application key #5. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_6` Key code constant: Video Application key #6. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_7` Key code constant: Video Application key #7. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VIDEO_APP_8` Key code constant: Video Application key #8. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOICE_ASSIST` Key code constant: Voice Assist key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_DOWN` Key code constant: Volume Down key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_MUTE` Key code constant: Volume Mute key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_UP` Key code constant: Volume Up key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_W` Key code constant: 'W' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_WAKEUP` Key code constant: Wakeup key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_WINDOW` Key code constant: Window key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_X` Key code constant: 'X' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_Y` Key code constant: 'Y' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_YEN` Key code constant: Japanese Yen key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_Z` Key code constant: 'Z' key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ZENKAKU_HANKAKU` Key code constant: Japanese full-width / half-width key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ZOOM_IN` Key code constant: Zoom in key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ZOOM_OUT` Key code constant: Zoom out key. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#MAX_KEYCODE` *This constant was deprecated in API level 15. There are now more than MAX_KEYCODE keycodes. Use `https://developer.android.com/reference/android/view/KeyEvent#getMaxKeyCode()` instead.* |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON` <br /> This mask is used to check whether the left ALT meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_MASK` This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_RIGHT_ON`. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON` <br /> This mask is used to check whether one of the ALT meta keys is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_RIGHT_ON` <br /> This mask is used to check whether the right the ALT meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON` <br /> This mask is used to check whether the CAPS LOCK meta key is on. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_LEFT_ON` <br /> This mask is used to check whether the left CTRL meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_MASK` This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_LEFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_RIGHT_ON`. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON` <br /> This mask is used to check whether one of the CTRL meta keys is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_RIGHT_ON` <br /> This mask is used to check whether the right CTRL meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_FUNCTION_ON` <br /> This mask is used to check whether the FUNCTION meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_META_LEFT_ON` <br /> This mask is used to check whether the left META meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_META_MASK` This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_META_LEFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_META_RIGHT_ON`. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON` <br /> This mask is used to check whether one of the META meta keys is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_META_RIGHT_ON` <br /> This mask is used to check whether the right META meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON` <br /> This mask is used to check whether the NUM LOCK meta key is on. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` <br /> This mask is used to check whether the SCROLL LOCK meta key is on. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON` <br /> This mask is used to check whether the left SHIFT meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_MASK` This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_RIGHT_ON`. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON` <br /> This mask is used to check whether one of the SHIFT meta keys is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_RIGHT_ON` <br /> This mask is used to check whether the right SHIFT meta key is pressed. |
| `int` | `https://developer.android.com/reference/android/view/KeyEvent#META_SYM_ON` <br /> This mask is used to check whether the SYM meta key is pressed. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/KeyEvent>` | `https://developer.android.com/reference/android/view/KeyEvent#CREATOR` |

| ### Inherited fields |
|---|
| From class `https://developer.android.com/reference/android/view/InputEvent` |---|---| | ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/InputEvent>` | `https://developer.android.com/reference/android/view/InputEvent#CREATOR` | |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent origEvent) ` Make an exact copy of an existing key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(android.view.KeyEvent,%20long,%20int)(https://developer.android.com/reference/android/view/KeyEvent origEvent, long eventTime, int newRepeat) ` *This constructor is deprecated. Use `https://developer.android.com/reference/android/view/KeyEvent#changeTimeRepeat(android.view.KeyEvent,%20long,%20int)` instead.* |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(int,%20int)(int action, int code) ` Create a new key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20java.lang.String,%20int,%20int)(long time, https://developer.android.com/reference/java/lang/String characters, int deviceId, int flags) ` Create a new key event for a string of characters. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20long,%20int,%20int,%20int)(long downTime, long eventTime, int action, int code, int repeat) ` Create a new key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20long,%20int,%20int,%20int,%20int)(long downTime, long eventTime, int action, int code, int repeat, int metaState) ` Create a new key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20long,%20int,%20int,%20int,%20int,%20int,%20int)(long downTime, long eventTime, int action, int code, int repeat, int metaState, int deviceId, int scancode) ` Create a new key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20long,%20int,%20int,%20int,%20int,%20int,%20int,%20int)(long downTime, long eventTime, int action, int code, int repeat, int metaState, int deviceId, int scancode, int flags) ` Create a new key event. |
| ` https://developer.android.com/reference/android/view/KeyEvent#KeyEvent(long,%20long,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int)(long downTime, long eventTime, int action, int code, int repeat, int metaState, int deviceId, int scancode, int flags, int source) ` Create a new key event. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/view/KeyEvent` | ` https://developer.android.com/reference/android/view/KeyEvent#changeAction(android.view.KeyEvent,%20int)(https://developer.android.com/reference/android/view/KeyEvent event, int action) ` Create a new key event that is the same as the given one, but whose action is replaced with the given value. |
| ` static https://developer.android.com/reference/android/view/KeyEvent` | ` https://developer.android.com/reference/android/view/KeyEvent#changeFlags(android.view.KeyEvent,%20int)(https://developer.android.com/reference/android/view/KeyEvent event, int flags) ` Create a new key event that is the same as the given one, but whose flags are replaced with the given value. |
| ` static https://developer.android.com/reference/android/view/KeyEvent` | ` https://developer.android.com/reference/android/view/KeyEvent#changeTimeRepeat(android.view.KeyEvent,%20long,%20int,%20int)(https://developer.android.com/reference/android/view/KeyEvent event, long eventTime, int newRepeat, int newFlags) ` Create a new key event that is the same as the given one, but whose event time and repeat count are replaced with the given value. |
| ` static https://developer.android.com/reference/android/view/KeyEvent` | ` https://developer.android.com/reference/android/view/KeyEvent#changeTimeRepeat(android.view.KeyEvent,%20long,%20int)(https://developer.android.com/reference/android/view/KeyEvent event, long eventTime, int newRepeat) ` Create a new key event that is the same as the given one, but whose event time and repeat count are replaced with the given value. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#dispatch(android.view.KeyEvent.Callback,%20android.view.KeyEvent.DispatcherState,%20java.lang.Object)(https://developer.android.com/reference/android/view/KeyEvent.Callback receiver, https://developer.android.com/reference/android/view/KeyEvent.DispatcherState state, https://developer.android.com/reference/java/lang/Object target) ` Deliver this key event to a `https://developer.android.com/reference/android/view/KeyEvent.Callback` interface. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#dispatch(android.view.KeyEvent.Callback)(https://developer.android.com/reference/android/view/KeyEvent.Callback receiver) ` *This method was deprecated in API level 15. Use `https://developer.android.com/reference/android/view/KeyEvent#dispatch(android.view.KeyEvent.Callback,%20android.view.KeyEvent.DispatcherState,%20java.lang.Object)` instead.* |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getAction()() ` Retrieve the action of this key event. |
| ` final https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/KeyEvent#getCharacters()() ` *This method was deprecated in API level 29. no longer used by the input system.* |
| ` static int` | ` https://developer.android.com/reference/android/view/KeyEvent#getDeadChar(int,%20int)(int accent, int c) ` Get the character that is produced by putting accent on the character c. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getDeviceId()() ` Gets the id for the device that this event came from. |
| ` char` | ` https://developer.android.com/reference/android/view/KeyEvent#getDisplayLabel()() ` Gets the primary character for this key. |
| ` final long` | ` https://developer.android.com/reference/android/view/KeyEvent#getDownTime()() ` Retrieve the time of the most recent key down event, in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. |
| ` final long` | ` https://developer.android.com/reference/android/view/KeyEvent#getEventTime()() ` Retrieve the time this event occurred, in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getFlags()() ` Returns the flags for this key event. |
| ` final https://developer.android.com/reference/android/view/KeyCharacterMap` | ` https://developer.android.com/reference/android/view/KeyEvent#getKeyCharacterMap()() ` Gets the `https://developer.android.com/reference/android/view/KeyCharacterMap` associated with the keyboard device. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getKeyCode()() ` Retrieve the key code of the key event. |
| ` boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#getKeyData(android.view.KeyCharacterMap.KeyData)(https://developer.android.com/reference/android/view/KeyCharacterMap.KeyData results) ` *This method was deprecated in API level 15. instead use `https://developer.android.com/reference/android/view/KeyEvent#getDisplayLabel()`, `https://developer.android.com/reference/android/view/KeyEvent#getNumber()` or `https://developer.android.com/reference/android/view/KeyEvent#getUnicodeChar(int)`.* |
| ` char` | ` https://developer.android.com/reference/android/view/KeyEvent#getMatch(char[],%20int)(char[] chars, int metaState) ` Gets the first character in the character array that can be generated by the specified key code. |
| ` char` | ` https://developer.android.com/reference/android/view/KeyEvent#getMatch(char[])(char[] chars) ` Gets the first character in the character array that can be generated by the specified key code. |
| ` static int` | ` https://developer.android.com/reference/android/view/KeyEvent#getMaxKeyCode()() ` Returns the maximum keycode. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getMetaState()() ` <br /> Returns the state of the meta keys. |
| ` static int` | ` https://developer.android.com/reference/android/view/KeyEvent#getModifierMetaStateMask()() ` Gets a mask that includes all valid modifier key meta state bits. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getModifiers()() ` Returns the state of the modifier keys. |
| ` char` | ` https://developer.android.com/reference/android/view/KeyEvent#getNumber()() ` Gets the number or symbol associated with the key. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getRepeatCount()() ` Retrieve the repeat count of the event. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getScanCode()() ` Retrieve the hardware key id of this key event. These values are not reliable and vary from device to device. |
| ` final int` | ` https://developer.android.com/reference/android/view/KeyEvent#getSource()() ` Gets the source of the event. |
| ` int` | ` https://developer.android.com/reference/android/view/KeyEvent#getUnicodeChar(int)(int metaState) ` Gets the Unicode character generated by the specified key and meta key state combination. |
| ` int` | ` https://developer.android.com/reference/android/view/KeyEvent#getUnicodeChar()() ` Gets the Unicode character generated by the specified key and meta key state combination. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#hasModifiers(int)(int modifiers) ` Returns true if only the specified modifiers keys are pressed. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#hasNoModifiers()() ` Returns true if no modifier keys are pressed. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isAltPressed()() ` <br /> Returns the pressed state of the ALT meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isCanceled()() ` For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` events, indicates that the event has been canceled as per `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED`. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isCapsLockOn()() ` <br /> Returns the locked state of the CAPS LOCK meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isCtrlPressed()() ` <br /> Returns the pressed state of the CTRL meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isFunctionPressed()() ` <br /> Returns the pressed state of the FUNCTION meta key. |
| ` static final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isGamepadButton(int)(int keyCode) ` Returns true if the specified keycode is a gamepad button. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isLongPress()() ` For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` events, indicates that the event has been canceled as per `https://developer.android.com/reference/android/view/KeyEvent#FLAG_LONG_PRESS`. |
| ` static final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isMediaSessionKey(int)(int keyCode) ` Returns whether this key will be sent to the `https://developer.android.com/reference/android/media/session/MediaSession.Callback` if not handled. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isMetaPressed()() ` <br /> Returns the pressed state of the META meta key. |
| ` static boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isModifierKey(int)(int keyCode) ` Returns true if this key code is a modifier key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isNumLockOn()() ` <br /> Returns the locked state of the NUM LOCK meta key. |
| ` boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isPrintingKey()() ` Returns true if this key produces a glyph. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isScrollLockOn()() ` <br /> Returns the locked state of the SCROLL LOCK meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isShiftPressed()() ` <br /> Returns the pressed state of the SHIFT meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isSymPressed()() ` <br /> Returns the pressed state of the SYM meta key. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isSystem()() ` Is this a system key? System keys can not be used for menu shortcuts. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#isTracking()() ` For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` events, indicates that the event is still being tracked from its initial down event as per `https://developer.android.com/reference/android/view/KeyEvent#FLAG_TRACKING`. |
| ` static int` | ` https://developer.android.com/reference/android/view/KeyEvent#keyCodeFromString(java.lang.String)(https://developer.android.com/reference/java/lang/String symbolicName) ` Gets a keycode by its symbolic name such as "KEYCODE_A" or an equivalent numeric constant such as "29". |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/KeyEvent#keyCodeToString(int)(int keyCode) ` Returns a string that represents the symbolic name of the specified keycode such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant such as "1001" if unknown. |
| ` static boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#metaStateHasModifiers(int,%20int)(int metaState, int modifiers) ` Returns true if only the specified modifier keys are pressed according to the specified meta state. |
| ` static boolean` | ` https://developer.android.com/reference/android/view/KeyEvent#metaStateHasNoModifiers(int)(int metaState) ` Returns true if no modifiers keys are pressed according to the specified meta state. |
| ` static int` | ` https://developer.android.com/reference/android/view/KeyEvent#normalizeMetaState(int)(int metaState) ` Normalizes the specified meta state. |
| ` final void` | ` https://developer.android.com/reference/android/view/KeyEvent#setSource(int)(int source) ` |
| ` final void` | ` https://developer.android.com/reference/android/view/KeyEvent#startTracking()() ` Call this during `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)` to have the system track the key through its final up (possibly including a long press). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/KeyEvent#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/view/KeyEvent#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel out, int flags) ` Flatten this object in to a Parcel. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/view/InputEvent ` |---|---| | ` int` | ` https://developer.android.com/reference/android/view/InputEvent#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` final https://developer.android.com/reference/android/view/InputDevice` | ` https://developer.android.com/reference/android/view/InputEvent#getDevice()() ` Gets the device that this event came from. | | ` abstract int` | ` https://developer.android.com/reference/android/view/InputEvent#getDeviceId()() ` Gets the id for the device that this event came from. | | ` abstract long` | ` https://developer.android.com/reference/android/view/InputEvent#getEventTime()() ` Retrieve the time this event occurred, in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. | | ` abstract int` | ` https://developer.android.com/reference/android/view/InputEvent#getSource()() ` Gets the source of the event. | | ` boolean` | ` https://developer.android.com/reference/android/view/InputEvent#isFromSource(int)(int source) ` Determines whether the event is from the given source. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### ACTION_DOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DOWN
```

`https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: the key has been pressed down.

<br />

Constant Value:

0
(0x00000000)


### ACTION_MULTIPLE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_MULTIPLE
```


**This constant was deprecated
in API level 29.**   

No longer used by the input system.
`https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: multiple duplicate key events have
occurred in a row, or a complex string is being delivered. If the
key code is not `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN` then the
`https://developer.android.com/reference/android/view/KeyEvent#getRepeatCount()` method returns the number of times
the given key code should be executed.
Otherwise, if the key code is `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN`, then
this is a sequence of characters as returned by `https://developer.android.com/reference/android/view/KeyEvent#getCharacters()`.

<br />

<br />

Constant Value:

2
(0x00000002)


### ACTION_UP

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_UP
```

`https://developer.android.com/reference/android/view/KeyEvent#getAction()` value: the key has been released.

<br />

Constant Value:

1
(0x00000001)


### FLAG_CANCELED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_CANCELED
```

When associated with up key events, this indicates that the key press
has been canceled. Typically this is used with virtual touch screen
keys, where the user can slide from the virtual key area on to the
display: in that case, the application will receive a canceled up
event and should not perform the action normally associated with the
key. Note that for this to work, the application can not perform an
action for a key until it receives an up or the long press timeout has
expired.

<br />

Constant Value:

32
(0x00000020)


### FLAG_CANCELED_LONG_PRESS

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_CANCELED_LONG_PRESS
```

Set when a key event has `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED` set because a long
press action was executed while it was down.

<br />

Constant Value:

256
(0x00000100)


### FLAG_EDITOR_ACTION

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_EDITOR_ACTION
```

This mask is used for compatibility, to identify enter keys that are
coming from an IME whose enter key has been auto-labelled "next" or
"done". This allows TextView to dispatch these as normal enter keys
for old applications, but still do the appropriate action when
receiving them.

<br />

Constant Value:

16
(0x00000010)


### FLAG_FALLBACK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_FALLBACK
```

Set when a key event has been synthesized to implement default behavior
for an event that the application did not handle.
Fallback key events are generated by unhandled trackball motions
(to emulate a directional keypad) and by certain unhandled key presses
that are declared in the key map (such as special function numeric keypad
keys when numlock is off).

<br />

Constant Value:

1024
(0x00000400)


### FLAG_FROM_SYSTEM

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_FROM_SYSTEM
```

This mask is set if an event was known to come from a trusted part
of the system. That is, the event is known to come from the user,
and could not have been spoofed by a third party component.

<br />

Constant Value:

8
(0x00000008)


### FLAG_KEEP_TOUCH_MODE

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_KEEP_TOUCH_MODE
```

This mask is set if we don't want the key event to cause us to leave
touch mode.

<br />

Constant Value:

4
(0x00000004)


### FLAG_LONG_PRESS

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_LONG_PRESS
```

This flag is set for the first key repeat that occurs after the
long press timeout.

<br />

Constant Value:

128
(0x00000080)


### FLAG_SOFT_KEYBOARD

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SOFT_KEYBOARD
```

This mask is set if the key event was generated by a software keyboard.

<br />

Constant Value:

2
(0x00000002)


### FLAG_TRACKING

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_TRACKING
```

Set for `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` when this event's key code is still being
tracked from its initial down. That is, somebody requested that tracking
started on the key down and a long press has not caused
the tracking to be canceled.

<br />

Constant Value:

512
(0x00000200)


### FLAG_VIRTUAL_HARD_KEY

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_VIRTUAL_HARD_KEY
```

This key event was generated by a virtual (on-screen) hard key area.
Typically this is an area of the touchscreen, outside of the regular
display, dedicated to "hardware" buttons.

<br />

Constant Value:

64
(0x00000040)


### FLAG_WOKE_HERE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_WOKE_HERE
```


**This constant was deprecated
in API level 20.**   

This flag will never be set by the system since the system
consumes all wake keys itself.

This mask is set if the device woke because of this key event.

<br />

Constant Value:

1
(0x00000001)


### KEYCODE_0

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_0
```

Key code constant: '0' key.

<br />

Constant Value:

7
(0x00000007)


### KEYCODE_1

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_1
```

Key code constant: '1' key.

<br />

Constant Value:

8
(0x00000008)


### KEYCODE_11

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_11
```

Key code constant: '11' key.

<br />

Constant Value:

227
(0x000000e3)


### KEYCODE_12

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_12
```

Key code constant: '12' key.

<br />

Constant Value:

228
(0x000000e4)


### KEYCODE_2

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_2
```

Key code constant: '2' key.

<br />

Constant Value:

9
(0x00000009)


### KEYCODE_3

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_3
```

Key code constant: '3' key.

<br />

Constant Value:

10
(0x0000000a)


### KEYCODE_3D_MODE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_3D_MODE
```

Key code constant: 3D Mode key.


Toggles the display between 2D and 3D mode.

<br />

Constant Value:

206
(0x000000ce)


### KEYCODE_4

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_4
```

Key code constant: '4' key.

<br />

Constant Value:

11
(0x0000000b)


### KEYCODE_5

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_5
```

Key code constant: '5' key.

<br />

Constant Value:

12
(0x0000000c)


### KEYCODE_6

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_6
```

Key code constant: '6' key.

<br />

Constant Value:

13
(0x0000000d)


### KEYCODE_7

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_7
```

Key code constant: '7' key.

<br />

Constant Value:

14
(0x0000000e)


### KEYCODE_8

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_8
```

Key code constant: '8' key.

<br />

Constant Value:

15
(0x0000000f)


### KEYCODE_9

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_9
```

Key code constant: '9' key.

<br />

Constant Value:

16
(0x00000010)


### KEYCODE_A

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_A
```

Key code constant: 'A' key.

<br />

Constant Value:

29
(0x0000001d)


### KEYCODE_ACCESSIBILITY

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ACCESSIBILITY
```

Key code constant: System Accessibility key.


Introduced by HUTRR116, toggles the system bound accessibility UI/command
(i.e. invoke system-specific accessibility UI or user-customized accessibility
feature). Some example usages could be to toggle Talkback or toggle display
color inversion. Applications will not receive this keycode.

<br />

Constant Value:

338
(0x00000152)


### KEYCODE_ALL_APPS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ALL_APPS
```

Key code constant: Show all apps.

<br />

Constant Value:

284
(0x0000011c)


### KEYCODE_ALT_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ALT_LEFT
```

Key code constant: Left Alt modifier key.

<br />

Constant Value:

57
(0x00000039)


### KEYCODE_ALT_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ALT_RIGHT
```

Key code constant: Right Alt modifier key.

<br />

Constant Value:

58
(0x0000003a)


### KEYCODE_APOSTROPHE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_APOSTROPHE
```

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

<br />

Constant Value:

75
(0x0000004b)


### KEYCODE_APP_SWITCH

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_APP_SWITCH
```

Key code constant: App switch key.


Should bring up the application switcher dialog.

<br />

Constant Value:

187
(0x000000bb)


### KEYCODE_ASSIST

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ASSIST
```

Key code constant: Assist key.


Launches the global assist activity.
Not delivered to applications.

<br />

Constant Value:

219
(0x000000db)


### KEYCODE_AT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_AT
```

Key code constant: '@' key.

<br />

Constant Value:

77
(0x0000004d)


### KEYCODE_AVR_INPUT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_AVR_INPUT
```

Key code constant: A/V Receiver input key.


On TV remotes, switches the input mode on an external A/V Receiver.

<br />

Constant Value:

182
(0x000000b6)


### KEYCODE_AVR_POWER

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_AVR_POWER
```

Key code constant: A/V Receiver power key.


On TV remotes, toggles the power on an external A/V Receiver.

<br />

Constant Value:

181
(0x000000b5)


### KEYCODE_B

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_B
```

Key code constant: 'B' key.

<br />

Constant Value:

30
(0x0000001e)


### KEYCODE_BACK

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BACK
```

Key code constant: Back key.

<br />

Constant Value:

4
(0x00000004)


### KEYCODE_BACKSLASH

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BACKSLASH
```

Key code constant: '\\' key.

<br />

Constant Value:

73
(0x00000049)


### KEYCODE_BOOKMARK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BOOKMARK
```

Key code constant: Bookmark key.


On some TV remotes, bookmarks content or web pages.

<br />

Constant Value:

174
(0x000000ae)


### KEYCODE_BREAK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BREAK
```

Key code constant: Break / Pause key.

<br />

Constant Value:

121
(0x00000079)


### KEYCODE_BRIGHTNESS_DOWN

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BRIGHTNESS_DOWN
```

Key code constant: Brightness Down key.


Adjusts the screen brightness down.

<br />

Constant Value:

220
(0x000000dc)


### KEYCODE_BRIGHTNESS_UP

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BRIGHTNESS_UP
```

Key code constant: Brightness Up key.


Adjusts the screen brightness up.

<br />

Constant Value:

221
(0x000000dd)


### KEYCODE_BUTTON_1

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_1
```

Key code constant: Generic Game Pad Button #1.

<br />

Constant Value:

188
(0x000000bc)


### KEYCODE_BUTTON_10

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_10
```

Key code constant: Generic Game Pad Button #10.

<br />

Constant Value:

197
(0x000000c5)


### KEYCODE_BUTTON_11

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_11
```

Key code constant: Generic Game Pad Button #11.

<br />

Constant Value:

198
(0x000000c6)


### KEYCODE_BUTTON_12

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_12
```

Key code constant: Generic Game Pad Button #12.

<br />

Constant Value:

199
(0x000000c7)


### KEYCODE_BUTTON_13

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_13
```

Key code constant: Generic Game Pad Button #13.

<br />

Constant Value:

200
(0x000000c8)


### KEYCODE_BUTTON_14

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_14
```

Key code constant: Generic Game Pad Button #14.

<br />

Constant Value:

201
(0x000000c9)


### KEYCODE_BUTTON_15

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_15
```

Key code constant: Generic Game Pad Button #15.

<br />

Constant Value:

202
(0x000000ca)


### KEYCODE_BUTTON_16

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_16
```

Key code constant: Generic Game Pad Button #16.

<br />

Constant Value:

203
(0x000000cb)


### KEYCODE_BUTTON_2

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_2
```

Key code constant: Generic Game Pad Button #2.

<br />

Constant Value:

189
(0x000000bd)


### KEYCODE_BUTTON_3

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_3
```

Key code constant: Generic Game Pad Button #3.

<br />

Constant Value:

190
(0x000000be)


### KEYCODE_BUTTON_4

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_4
```

Key code constant: Generic Game Pad Button #4.

<br />

Constant Value:

191
(0x000000bf)


### KEYCODE_BUTTON_5

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_5
```

Key code constant: Generic Game Pad Button #5.

<br />

Constant Value:

192
(0x000000c0)


### KEYCODE_BUTTON_6

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_6
```

Key code constant: Generic Game Pad Button #6.

<br />

Constant Value:

193
(0x000000c1)


### KEYCODE_BUTTON_7

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_7
```

Key code constant: Generic Game Pad Button #7.

<br />

Constant Value:

194
(0x000000c2)


### KEYCODE_BUTTON_8

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_8
```

Key code constant: Generic Game Pad Button #8.

<br />

Constant Value:

195
(0x000000c3)


### KEYCODE_BUTTON_9

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_9
```

Key code constant: Generic Game Pad Button #9.

<br />

Constant Value:

196
(0x000000c4)


### KEYCODE_BUTTON_A

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_A
```

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.

<br />

Constant Value:

96
(0x00000060)


### KEYCODE_BUTTON_B

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_B
```

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.

<br />

Constant Value:

97
(0x00000061)


### KEYCODE_BUTTON_C

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_C
```

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.

<br />

Constant Value:

98
(0x00000062)


### KEYCODE_BUTTON_L1

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_L1
```

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.

<br />

Constant Value:

102
(0x00000066)


### KEYCODE_BUTTON_L2

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_L2
```

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.

<br />

Constant Value:

104
(0x00000068)


### KEYCODE_BUTTON_MODE

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_MODE
```

Key code constant: Mode Button key.


On a game controller, the button labeled Mode.

<br />

Constant Value:

110
(0x0000006e)


### KEYCODE_BUTTON_R1

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_R1
```

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.

<br />

Constant Value:

103
(0x00000067)


### KEYCODE_BUTTON_R2

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_R2
```

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.

<br />

Constant Value:

105
(0x00000069)


### KEYCODE_BUTTON_SELECT

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_SELECT
```

Key code constant: Select Button key.


On a game controller, the button labeled Select.

<br />

Constant Value:

109
(0x0000006d)


### KEYCODE_BUTTON_START

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_START
```

Key code constant: Start Button key.


On a game controller, the button labeled Start.

<br />

Constant Value:

108
(0x0000006c)


### KEYCODE_BUTTON_THUMBL

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_THUMBL
```

Key code constant: Left Thumb Button key.


On a game controller, the left thumb button indicates that the left (or only)
joystick is pressed.

<br />

Constant Value:

106
(0x0000006a)


### KEYCODE_BUTTON_THUMBR

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_THUMBR
```

Key code constant: Right Thumb Button key.


On a game controller, the right thumb button indicates that the right
joystick is pressed.

<br />

Constant Value:

107
(0x0000006b)


### KEYCODE_BUTTON_X

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_X
```

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.

<br />

Constant Value:

99
(0x00000063)


### KEYCODE_BUTTON_Y

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_Y
```

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.

<br />

Constant Value:

100
(0x00000064)


### KEYCODE_BUTTON_Z

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_BUTTON_Z
```

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.

<br />

Constant Value:

101
(0x00000065)


### KEYCODE_C

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_C
```

Key code constant: 'C' key.

<br />

Constant Value:

31
(0x0000001f)


### KEYCODE_CALCULATOR

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CALCULATOR
```

Key code constant: Calculator special function key.


Used to launch a calculator application.

<br />

Constant Value:

210
(0x000000d2)


### KEYCODE_CALENDAR

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CALENDAR
```

Key code constant: Calendar special function key.


Used to launch a calendar application.

<br />

Constant Value:

208
(0x000000d0)


### KEYCODE_CALL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CALL
```

Key code constant: Call key.

<br />

Constant Value:

5
(0x00000005)


### KEYCODE_CAMERA

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CAMERA
```

Key code constant: Camera key.


Used to launch a camera application or take pictures.

<br />

Constant Value:

27
(0x0000001b)


### KEYCODE_CAPS_LOCK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CAPS_LOCK
```

Key code constant: Caps Lock key.

<br />

Constant Value:

115
(0x00000073)


### KEYCODE_CAPTIONS

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CAPTIONS
```

Key code constant: Toggle captions key.


Switches the mode for closed-captioning text, for example during television shows.

<br />

Constant Value:

175
(0x000000af)


### KEYCODE_CHANNEL_DOWN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CHANNEL_DOWN
```

Key code constant: Channel down key.


On TV remotes, decrements the television channel.

<br />

Constant Value:

167
(0x000000a7)


### KEYCODE_CHANNEL_UP

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CHANNEL_UP
```

Key code constant: Channel up key.


On TV remotes, increments the television channel.

<br />

Constant Value:

166
(0x000000a6)


### KEYCODE_CLEAR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CLEAR
```

Key code constant: Clear key.

<br />

Constant Value:

28
(0x0000001c)


### KEYCODE_CLOSE

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CLOSE
```

Key code constant: AC Close.


e.g. To close current instance of the application window, close the current tab, etc.

<br />

Constant Value:

321
(0x00000141)


### KEYCODE_COMMA

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_COMMA
```

Key code constant: ',' key.

<br />

Constant Value:

55
(0x00000037)


### KEYCODE_CONTACTS

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CONTACTS
```

Key code constant: Contacts special function key.


Used to launch an address book application.

<br />

Constant Value:

207
(0x000000cf)


### KEYCODE_CONTEXTUAL_INSERT

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CONTEXTUAL_INSERT
```

Key code constant: Contextual Insert key.


Introduced by HUTRR119, triggers a contextual overlay that enables the
user to search, retrieve, and generate content for immediate insertion
into the active focused element.

<br />

Constant Value:

340
(0x00000154)


### KEYCODE_CONTEXTUAL_QUERY

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int KEYCODE_CONTEXTUAL_QUERY
```

Key code constant: Contextual Query key.


Introduced by HUTRR119, triggers contextual suggestions on active or
hovered screen elements (e.g. an image or a paragraph) to discover
available actions.

<br />

Constant Value:

341
(0x00000155)


### KEYCODE_CONTEXTUAL_SEARCH

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CONTEXTUAL_SEARCH
```

Key code constant: Contextual Search key.


Introduced by HUTRR119, invokes an AI agent to perform an action on the
content currently selected by the user (e.g., highlighted text, active
image, or selected file) or invoke a selection experience. Often referred
to as "Select to Search" or "Summarize Selection."

This key is fully handled by the framework and will not be sent to the
foreground app.

<br />

Constant Value:

339
(0x00000153)


### KEYCODE_COPY

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_COPY
```

Key code constant: Copy key.

<br />

Constant Value:

278
(0x00000116)


### KEYCODE_CTRL_LEFT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CTRL_LEFT
```

Key code constant: Left Control modifier key.

<br />

Constant Value:

113
(0x00000071)


### KEYCODE_CTRL_RIGHT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CTRL_RIGHT
```

Key code constant: Right Control modifier key.

<br />

Constant Value:

114
(0x00000072)


### KEYCODE_CUT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_CUT
```

Key code constant: Cut key.

<br />

Constant Value:

277
(0x00000115)


### KEYCODE_D

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_D
```

Key code constant: 'D' key.

<br />

Constant Value:

32
(0x00000020)


### KEYCODE_DEL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DEL
```

Key code constant: Backspace key.


Deletes characters before the insertion point, unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FORWARD_DEL`.

<br />

Constant Value:

67
(0x00000043)


### KEYCODE_DEMO_APP_1

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DEMO_APP_1
```

Key code constant: Demo Application key #1.

<br />

Constant Value:

301
(0x0000012d)


### KEYCODE_DEMO_APP_2

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DEMO_APP_2
```

Key code constant: Demo Application key #2.

<br />

Constant Value:

302
(0x0000012e)


### KEYCODE_DEMO_APP_3

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DEMO_APP_3
```

Key code constant: Demo Application key #3.

<br />

Constant Value:

303
(0x0000012f)


### KEYCODE_DEMO_APP_4

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DEMO_APP_4
```

Key code constant: Demo Application key #4.

<br />

Constant Value:

304
(0x00000130)


### KEYCODE_DICTATE

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DICTATE
```

Key code constant: To start dictate to an input field

<br />

Constant Value:

319
(0x0000013f)


### KEYCODE_DO_NOT_DISTURB

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DO_NOT_DISTURB
```

Key code constant: To toggle 'Do Not Disturb' mode.

<br />

Constant Value:

322
(0x00000142)


### KEYCODE_DPAD_CENTER

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_CENTER
```

Key code constant: Directional Pad Center key.


May also be synthesized from trackball motions.

<br />

Constant Value:

23
(0x00000017)


### KEYCODE_DPAD_DOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_DOWN
```

Key code constant: Directional Pad Down key.


May also be synthesized from trackball motions.

<br />

Constant Value:

20
(0x00000014)


### KEYCODE_DPAD_DOWN_LEFT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_DOWN_LEFT
```

Key code constant: Directional Pad Down-Left.

<br />

Constant Value:

269
(0x0000010d)


### KEYCODE_DPAD_DOWN_RIGHT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_DOWN_RIGHT
```

Key code constant: Directional Pad Down-Right.

<br />

Constant Value:

271
(0x0000010f)


### KEYCODE_DPAD_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_LEFT
```

Key code constant: Directional Pad Left key.


May also be synthesized from trackball motions.

<br />

Constant Value:

21
(0x00000015)


### KEYCODE_DPAD_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_RIGHT
```

Key code constant: Directional Pad Right key.


May also be synthesized from trackball motions.

<br />

Constant Value:

22
(0x00000016)


### KEYCODE_DPAD_UP

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_UP
```

Key code constant: Directional Pad Up key.


May also be synthesized from trackball motions.

<br />

Constant Value:

19
(0x00000013)


### KEYCODE_DPAD_UP_LEFT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_UP_LEFT
```

Key code constant: Directional Pad Up-Left.

<br />

Constant Value:

268
(0x0000010c)


### KEYCODE_DPAD_UP_RIGHT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DPAD_UP_RIGHT
```

Key code constant: Directional Pad Up-Right.

<br />

Constant Value:

270
(0x0000010e)


### KEYCODE_DVR

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_DVR
```

Key code constant: DVR key.


On some TV remotes, switches to a DVR mode for recorded shows.

<br />

Constant Value:

173
(0x000000ad)


### KEYCODE_E

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_E
```

Key code constant: 'E' key.

<br />

Constant Value:

33
(0x00000021)


### KEYCODE_EISU

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_EISU
```

Key code constant: Japanese alphanumeric key.

<br />

Constant Value:

212
(0x000000d4)


### KEYCODE_EMOJI_PICKER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_EMOJI_PICKER
```

Key code constant: To open emoji picker.

<br />

Constant Value:

317
(0x0000013d)


### KEYCODE_ENDCALL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ENDCALL
```

Key code constant: End Call key.

<br />

Constant Value:

6
(0x00000006)


### KEYCODE_ENTER

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ENTER
```

Key code constant: Enter key.

<br />

Constant Value:

66
(0x00000042)


### KEYCODE_ENVELOPE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ENVELOPE
```

Key code constant: Envelope special function key.


Used to launch a mail application.

<br />

Constant Value:

65
(0x00000041)


### KEYCODE_EQUALS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_EQUALS
```

Key code constant: '=' key.

<br />

Constant Value:

70
(0x00000046)


### KEYCODE_ESCAPE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ESCAPE
```

Key code constant: Escape key.

<br />

Constant Value:

111
(0x0000006f)


### KEYCODE_EXPLORER

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_EXPLORER
```

Key code constant: Explorer special function key.


Used to launch a browser application.

<br />

Constant Value:

64
(0x00000040)


### KEYCODE_F

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F
```

Key code constant: 'F' key.

<br />

Constant Value:

34
(0x00000022)


### KEYCODE_F1

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F1
```

Key code constant: F1 key.

<br />

Constant Value:

131
(0x00000083)


### KEYCODE_F10

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F10
```

Key code constant: F10 key.

<br />

Constant Value:

140
(0x0000008c)


### KEYCODE_F11

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F11
```

Key code constant: F11 key.

<br />

Constant Value:

141
(0x0000008d)


### KEYCODE_F12

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F12
```

Key code constant: F12 key.

<br />

Constant Value:

142
(0x0000008e)


### KEYCODE_F13

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F13
```

Key code constant: F13 key.

<br />

Constant Value:

326
(0x00000146)


### KEYCODE_F14

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F14
```

Key code constant: F14 key.

<br />

Constant Value:

327
(0x00000147)


### KEYCODE_F15

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F15
```

Key code constant: F15 key.

<br />

Constant Value:

328
(0x00000148)


### KEYCODE_F16

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F16
```

Key code constant: F16 key.

<br />

Constant Value:

329
(0x00000149)


### KEYCODE_F17

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F17
```

Key code constant: F17 key.

<br />

Constant Value:

330
(0x0000014a)


### KEYCODE_F18

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F18
```

Key code constant: F18 key.

<br />

Constant Value:

331
(0x0000014b)


### KEYCODE_F19

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F19
```

Key code constant: F19 key.

<br />

Constant Value:

332
(0x0000014c)


### KEYCODE_F2

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F2
```

Key code constant: F2 key.

<br />

Constant Value:

132
(0x00000084)


### KEYCODE_F20

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F20
```

Key code constant: F20 key.

<br />

Constant Value:

333
(0x0000014d)


### KEYCODE_F21

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F21
```

Key code constant: F21 key.

<br />

Constant Value:

334
(0x0000014e)


### KEYCODE_F22

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F22
```

Key code constant: F22 key.

<br />

Constant Value:

335
(0x0000014f)


### KEYCODE_F23

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F23
```

Key code constant: F23 key.

<br />

Constant Value:

336
(0x00000150)


### KEYCODE_F24

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F24
```

Key code constant: F24 key.

<br />

Constant Value:

337
(0x00000151)


### KEYCODE_F3

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F3
```

Key code constant: F3 key.

<br />

Constant Value:

133
(0x00000085)


### KEYCODE_F4

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F4
```

Key code constant: F4 key.

<br />

Constant Value:

134
(0x00000086)


### KEYCODE_F5

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F5
```

Key code constant: F5 key.

<br />

Constant Value:

135
(0x00000087)


### KEYCODE_F6

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F6
```

Key code constant: F6 key.

<br />

Constant Value:

136
(0x00000088)


### KEYCODE_F7

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F7
```

Key code constant: F7 key.

<br />

Constant Value:

137
(0x00000089)


### KEYCODE_F8

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F8
```

Key code constant: F8 key.

<br />

Constant Value:

138
(0x0000008a)


### KEYCODE_F9

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_F9
```

Key code constant: F9 key.

<br />

Constant Value:

139
(0x0000008b)


### KEYCODE_FEATURED_APP_1

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FEATURED_APP_1
```

Key code constant: Featured Application key #1.

<br />

Constant Value:

297
(0x00000129)


### KEYCODE_FEATURED_APP_2

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FEATURED_APP_2
```

Key code constant: Featured Application key #2.

<br />

Constant Value:

298
(0x0000012a)


### KEYCODE_FEATURED_APP_3

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FEATURED_APP_3
```

Key code constant: Featured Application key #3.

<br />

Constant Value:

299
(0x0000012b)


### KEYCODE_FEATURED_APP_4

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FEATURED_APP_4
```

Key code constant: Featured Application key #4.

<br />

Constant Value:

300
(0x0000012c)


### KEYCODE_FOCUS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FOCUS
```

Key code constant: Camera Focus key.


Used to focus the camera.

<br />

Constant Value:

80
(0x00000050)


### KEYCODE_FORWARD

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FORWARD
```

Key code constant: Forward key.


Navigates forward in the history stack. Complement of `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BACK`.

<br />

Constant Value:

125
(0x0000007d)


### KEYCODE_FORWARD_DEL

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FORWARD_DEL
```

Key code constant: Forward Delete key.


Deletes characters ahead of the insertion point, unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DEL`.

<br />

Constant Value:

112
(0x00000070)


### KEYCODE_FULLSCREEN

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FULLSCREEN
```

Key code constant: To toggle fullscreen mode (on the current application).

<br />

Constant Value:

325
(0x00000145)


### KEYCODE_FUNCTION

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_FUNCTION
```

Key code constant: Function modifier key.

<br />

Constant Value:

119
(0x00000077)


### KEYCODE_G

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_G
```

Key code constant: 'G' key.

<br />

Constant Value:

35
(0x00000023)


### KEYCODE_GRAVE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_GRAVE
```

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

<br />

Constant Value:

68
(0x00000044)


### KEYCODE_GUIDE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_GUIDE
```

Key code constant: Guide key.


On TV remotes, shows a programming guide.

<br />

Constant Value:

172
(0x000000ac)


### KEYCODE_H

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_H
```

Key code constant: 'H' key.

<br />

Constant Value:

36
(0x00000024)


### KEYCODE_HEADSETHOOK

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_HEADSETHOOK
```

Key code constant: Headset Hook key.


Used to hang up calls and stop media.

<br />

Constant Value:

79
(0x0000004f)


### KEYCODE_HELP

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_HELP
```

Key code constant: Help key.

<br />

Constant Value:

259
(0x00000103)


### KEYCODE_HENKAN

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_HENKAN
```

Key code constant: Japanese conversion key.

<br />

Constant Value:

214
(0x000000d6)


### KEYCODE_HOME

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_HOME
```

Key code constant: Home key.


This key is handled by the framework and is never delivered to applications.

<br />

Constant Value:

3
(0x00000003)


### KEYCODE_I

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_I
```

Key code constant: 'I' key.

<br />

Constant Value:

37
(0x00000025)


### KEYCODE_INFO

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_INFO
```

Key code constant: Info key.


Common on TV remotes to show additional information related to what is currently
being viewed.

<br />

Constant Value:

165
(0x000000a5)


### KEYCODE_INSERT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_INSERT
```

Key code constant: Insert key.


Toggles insert / overwrite edit mode.

<br />

Constant Value:

124
(0x0000007c)


### KEYCODE_J

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_J
```

Key code constant: 'J' key.

<br />

Constant Value:

38
(0x00000026)


### KEYCODE_K

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_K
```

Key code constant: 'K' key.

<br />

Constant Value:

39
(0x00000027)


### KEYCODE_KANA

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_KANA
```

Key code constant: Japanese kana key.

<br />

Constant Value:

218
(0x000000da)


### KEYCODE_KATAKANA_HIRAGANA

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_KATAKANA_HIRAGANA
```

Key code constant: Japanese katakana / hiragana key.

<br />

Constant Value:

215
(0x000000d7)


### KEYCODE_KEYBOARD_BACKLIGHT_DOWN

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_KEYBOARD_BACKLIGHT_DOWN
```

Key code constant: Keyboard backlight down.

<br />

Constant Value:

305
(0x00000131)


### KEYCODE_KEYBOARD_BACKLIGHT_TOGGLE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_KEYBOARD_BACKLIGHT_TOGGLE
```

Key code constant: Keyboard backlight toggle.

<br />

Constant Value:

307
(0x00000133)


### KEYCODE_KEYBOARD_BACKLIGHT_UP

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_KEYBOARD_BACKLIGHT_UP
```

Key code constant: Keyboard backlight up.

<br />

Constant Value:

306
(0x00000132)


### KEYCODE_L

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_L
```

Key code constant: 'L' key.

<br />

Constant Value:

40
(0x00000028)


### KEYCODE_LANGUAGE_SWITCH

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_LANGUAGE_SWITCH
```

Key code constant: Language Switch key.


Toggles the current input language such as switching between English and Japanese on a
QWERTY keyboard.
On some devices, the same function may be performed by pressing <kbd>Shift + Spacebar</kbd>.

<br />

Constant Value:

204
(0x000000cc)


### KEYCODE_LAST_CHANNEL

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_LAST_CHANNEL
```

Key code constant: Last Channel key.


Goes to the last viewed channel.

<br />

Constant Value:

229
(0x000000e5)


### KEYCODE_LEFT_BRACKET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_LEFT_BRACKET
```

Key code constant: '\[' key.

<br />

Constant Value:

71
(0x00000047)


### KEYCODE_LOCK

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_LOCK
```

Key code constant: To lock the screen.

<br />

Constant Value:

324
(0x00000144)


### KEYCODE_M

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_M
```

Key code constant: 'M' key.

<br />

Constant Value:

41
(0x00000029)


### KEYCODE_MACRO_1

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MACRO_1
```

Key code constant: A button whose usage can be customized by the user through the system.


User customizable key #1.

<br />

Constant Value:

313
(0x00000139)


### KEYCODE_MACRO_2

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MACRO_2
```

Key code constant: A button whose usage can be customized by the user through the system.


User customizable key #2.

<br />

Constant Value:

314
(0x0000013a)


### KEYCODE_MACRO_3

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MACRO_3
```

Key code constant: A button whose usage can be customized by the user through the system.


User customizable key #3.

<br />

Constant Value:

315
(0x0000013b)


### KEYCODE_MACRO_4

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MACRO_4
```

Key code constant: A button whose usage can be customized by the user through the system.


User customizable key #4.

<br />

Constant Value:

316
(0x0000013c)


### KEYCODE_MANNER_MODE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MANNER_MODE
```

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.
On some devices, the key may only operate when long-pressed.

<br />

Constant Value:

205
(0x000000cd)


### KEYCODE_MEDIA_AUDIO_TRACK

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_AUDIO_TRACK
```

Key code constant: Audio Track key.


Switches the audio tracks.

<br />

Constant Value:

222
(0x000000de)


### KEYCODE_MEDIA_CLOSE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_CLOSE
```

Key code constant: Close media key.


May be used to close a CD tray, for example.

<br />

Constant Value:

128
(0x00000080)


### KEYCODE_MEDIA_EJECT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_EJECT
```

Key code constant: Eject media key.


May be used to eject a CD tray, for example.

<br />

Constant Value:

129
(0x00000081)


### KEYCODE_MEDIA_FAST_FORWARD

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_FAST_FORWARD
```

Key code constant: Fast Forward media key.

<br />

Constant Value:

90
(0x0000005a)


### KEYCODE_MEDIA_NEXT

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_NEXT
```

Key code constant: Play Next media key.

<br />

Constant Value:

87
(0x00000057)


### KEYCODE_MEDIA_PAUSE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_PAUSE
```

Key code constant: Pause media key.

<br />

Constant Value:

127
(0x0000007f)


### KEYCODE_MEDIA_PLAY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_PLAY
```

Key code constant: Play media key.

<br />

Constant Value:

126
(0x0000007e)


### KEYCODE_MEDIA_PLAY_PAUSE

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_PLAY_PAUSE
```

Key code constant: Play/Pause media key.

<br />

Constant Value:

85
(0x00000055)


### KEYCODE_MEDIA_PREVIOUS

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_PREVIOUS
```

Key code constant: Play Previous media key.

<br />

Constant Value:

88
(0x00000058)


### KEYCODE_MEDIA_RECORD

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_RECORD
```

Key code constant: Record media key.

<br />

Constant Value:

130
(0x00000082)


### KEYCODE_MEDIA_REWIND

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_REWIND
```

Key code constant: Rewind media key.

<br />

Constant Value:

89
(0x00000059)


### KEYCODE_MEDIA_SKIP_BACKWARD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_SKIP_BACKWARD
```

Key code constant: Skip backward media key.

<br />

Constant Value:

273
(0x00000111)


### KEYCODE_MEDIA_SKIP_FORWARD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_SKIP_FORWARD
```

Key code constant: Skip forward media key.

<br />

Constant Value:

272
(0x00000110)


### KEYCODE_MEDIA_STEP_BACKWARD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_STEP_BACKWARD
```

Key code constant: Step backward media key.


Steps media backward, one frame at a time.

<br />

Constant Value:

275
(0x00000113)


### KEYCODE_MEDIA_STEP_FORWARD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_STEP_FORWARD
```

Key code constant: Step forward media key.


Steps media forward, one frame at a time.

<br />

Constant Value:

274
(0x00000112)


### KEYCODE_MEDIA_STOP

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_STOP
```

Key code constant: Stop media key.

<br />

Constant Value:

86
(0x00000056)


### KEYCODE_MEDIA_TOP_MENU

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MEDIA_TOP_MENU
```

Key code constant: Media Top Menu key.


Goes to the top of media menu.

<br />

Constant Value:

226
(0x000000e2)


### KEYCODE_MENU

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MENU
```

Key code constant: Menu key.

<br />

Constant Value:

82
(0x00000052)


### KEYCODE_META_LEFT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_META_LEFT
```

Key code constant: Left Meta modifier key.

<br />

Constant Value:

117
(0x00000075)


### KEYCODE_META_RIGHT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_META_RIGHT
```

Key code constant: Right Meta modifier key.

<br />

Constant Value:

118
(0x00000076)


### KEYCODE_MINUS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MINUS
```

Key code constant: '-'.

<br />

Constant Value:

69
(0x00000045)


### KEYCODE_MOVE_END

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MOVE_END
```

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.

<br />

Constant Value:

123
(0x0000007b)


### KEYCODE_MOVE_HOME

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MOVE_HOME
```

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.

<br />

Constant Value:

122
(0x0000007a)


### KEYCODE_MUHENKAN

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MUHENKAN
```

Key code constant: Japanese non-conversion key.

<br />

Constant Value:

213
(0x000000d5)


### KEYCODE_MUSIC

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MUSIC
```

Key code constant: Music special function key.


Used to launch a music player application.

<br />

Constant Value:

209
(0x000000d1)


### KEYCODE_MUTE

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_MUTE
```

Key code constant: Mute key.


Mute key for the microphone (unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_VOLUME_MUTE`, which is the speaker
mute key).

<br />

Constant Value:

91
(0x0000005b)


### KEYCODE_N

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_N
```

Key code constant: 'N' key.

<br />

Constant Value:

42
(0x0000002a)


### KEYCODE_NAVIGATE_IN

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NAVIGATE_IN
```

Key code constant: Navigate in key.


Activates the item that currently has focus or expands to the next level of a
navigation hierarchy.

<br />

Constant Value:

262
(0x00000106)


### KEYCODE_NAVIGATE_NEXT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NAVIGATE_NEXT
```

Key code constant: Navigate to next key.


Advances to the next item in an ordered collection of items.

<br />

Constant Value:

261
(0x00000105)


### KEYCODE_NAVIGATE_OUT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NAVIGATE_OUT
```

Key code constant: Navigate out key.


Backs out one level of a navigation hierarchy or collapses the item that currently
has focus.

<br />

Constant Value:

263
(0x00000107)


### KEYCODE_NAVIGATE_PREVIOUS

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NAVIGATE_PREVIOUS
```

Key code constant: Navigate to previous key.


Goes backward by one item in an ordered collection of items.

<br />

Constant Value:

260
(0x00000104)


### KEYCODE_NEW

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NEW
```

Key code constant: AC New.


e.g. To create a new instance of a window, open a new tab, etc.

<br />

Constant Value:

320
(0x00000140)


### KEYCODE_NOTIFICATION

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NOTIFICATION
```

Key code constant: Notification key.

<br />

Constant Value:

83
(0x00000053)


### KEYCODE_NUM

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUM
```

Key code constant: Number modifier key.


Used to enter numeric symbols.
This key is not Num Lock; it is more like `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT` and is
interpreted as an ALT key by `https://developer.android.com/reference/android/text/method/MetaKeyKeyListener`.

<br />

Constant Value:

78
(0x0000004e)


### KEYCODE_NUMPAD_0

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_0
```

Key code constant: Numeric keypad '0' key.

<br />

Constant Value:

144
(0x00000090)


### KEYCODE_NUMPAD_1

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_1
```

Key code constant: Numeric keypad '1' key.

<br />

Constant Value:

145
(0x00000091)


### KEYCODE_NUMPAD_2

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_2
```

Key code constant: Numeric keypad '2' key.

<br />

Constant Value:

146
(0x00000092)


### KEYCODE_NUMPAD_3

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_3
```

Key code constant: Numeric keypad '3' key.

<br />

Constant Value:

147
(0x00000093)


### KEYCODE_NUMPAD_4

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_4
```

Key code constant: Numeric keypad '4' key.

<br />

Constant Value:

148
(0x00000094)


### KEYCODE_NUMPAD_5

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_5
```

Key code constant: Numeric keypad '5' key.

<br />

Constant Value:

149
(0x00000095)


### KEYCODE_NUMPAD_6

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_6
```

Key code constant: Numeric keypad '6' key.

<br />

Constant Value:

150
(0x00000096)


### KEYCODE_NUMPAD_7

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_7
```

Key code constant: Numeric keypad '7' key.

<br />

Constant Value:

151
(0x00000097)


### KEYCODE_NUMPAD_8

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_8
```

Key code constant: Numeric keypad '8' key.

<br />

Constant Value:

152
(0x00000098)


### KEYCODE_NUMPAD_9

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_9
```

Key code constant: Numeric keypad '9' key.

<br />

Constant Value:

153
(0x00000099)


### KEYCODE_NUMPAD_ADD

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_ADD
```

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

<br />

Constant Value:

157
(0x0000009d)


### KEYCODE_NUMPAD_COMMA

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_COMMA
```

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

<br />

Constant Value:

159
(0x0000009f)


### KEYCODE_NUMPAD_DIVIDE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_DIVIDE
```

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

<br />

Constant Value:

154
(0x0000009a)


### KEYCODE_NUMPAD_DOT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_DOT
```

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

<br />

Constant Value:

158
(0x0000009e)


### KEYCODE_NUMPAD_ENTER

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_ENTER
```

Key code constant: Numeric keypad Enter key.

<br />

Constant Value:

160
(0x000000a0)


### KEYCODE_NUMPAD_EQUALS

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_EQUALS
```

Key code constant: Numeric keypad '=' key.

<br />

Constant Value:

161
(0x000000a1)


### KEYCODE_NUMPAD_LEFT_PAREN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_LEFT_PAREN
```

Key code constant: Numeric keypad '(' key.

<br />

Constant Value:

162
(0x000000a2)


### KEYCODE_NUMPAD_MULTIPLY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_MULTIPLY
```

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

<br />

Constant Value:

155
(0x0000009b)


### KEYCODE_NUMPAD_RIGHT_PAREN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_RIGHT_PAREN
```

Key code constant: Numeric keypad ')' key.

<br />

Constant Value:

163
(0x000000a3)


### KEYCODE_NUMPAD_SUBTRACT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUMPAD_SUBTRACT
```

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

<br />

Constant Value:

156
(0x0000009c)


### KEYCODE_NUM_LOCK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_NUM_LOCK
```

Key code constant: Num Lock key.


This is the Num Lock key; it is different from `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM`.
This key alters the behavior of other keys on the numeric keypad.

<br />

Constant Value:

143
(0x0000008f)


### KEYCODE_O

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_O
```

Key code constant: 'O' key.

<br />

Constant Value:

43
(0x0000002b)


### KEYCODE_P

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_P
```

Key code constant: 'P' key.

<br />

Constant Value:

44
(0x0000002c)


### KEYCODE_PAGE_DOWN

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PAGE_DOWN
```

Key code constant: Page Down key.

<br />

Constant Value:

93
(0x0000005d)


### KEYCODE_PAGE_UP

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PAGE_UP
```

Key code constant: Page Up key.

<br />

Constant Value:

92
(0x0000005c)


### KEYCODE_PAIRING

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PAIRING
```

Key code constant: Pairing key.


Initiates peripheral pairing mode.
Useful for pairing remote control devices or game controllers, especially if no other
input mode is available.

<br />

Constant Value:

225
(0x000000e1)


### KEYCODE_PASTE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PASTE
```

Key code constant: Paste key.

<br />

Constant Value:

279
(0x00000117)


### KEYCODE_PERIOD

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PERIOD
```

Key code constant: '.' key.

<br />

Constant Value:

56
(0x00000038)


### KEYCODE_PICTSYMBOLS

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PICTSYMBOLS
```

Key code constant: Picture Symbols modifier key.


Used to switch symbol sets (Emoji, Kao-moji).

<br />

Constant Value:

94
(0x0000005e)


### KEYCODE_PLUS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PLUS
```

Key code constant: '+' key.

<br />

Constant Value:

81
(0x00000051)


### KEYCODE_POUND

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_POUND
```

Key code constant: '#' key.

<br />

Constant Value:

18
(0x00000012)


### KEYCODE_POWER

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_POWER
```

Key code constant: Power key.

<br />

Constant Value:

26
(0x0000001a)


### KEYCODE_PRINT

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PRINT
```

Key code constant: To print.

<br />

Constant Value:

323
(0x00000143)


### KEYCODE_PROFILE_SWITCH

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PROFILE_SWITCH
```

Key code constant: Used to switch current `https://developer.android.com/reference/android/accounts/Account` that is
consuming content.


May be consumed by system to set account globally.

<br />

Constant Value:

288
(0x00000120)


### KEYCODE_PROG_BLUE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PROG_BLUE
```

Key code constant: Blue "programmable" key.


On TV remotes, acts as a contextual/programmable key.

<br />

Constant Value:

186
(0x000000ba)


### KEYCODE_PROG_GREEN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PROG_GREEN
```

Key code constant: Green "programmable" key.


On TV remotes, acts as a contextual/programmable key.

<br />

Constant Value:

184
(0x000000b8)


### KEYCODE_PROG_RED

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PROG_RED
```

Key code constant: Red "programmable" key.


On TV remotes, acts as a contextual/programmable key.

<br />

Constant Value:

183
(0x000000b7)


### KEYCODE_PROG_YELLOW

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_PROG_YELLOW
```

Key code constant: Yellow "programmable" key.


On TV remotes, acts as a contextual/programmable key.

<br />

Constant Value:

185
(0x000000b9)


### KEYCODE_Q

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_Q
```

Key code constant: 'Q' key.

<br />

Constant Value:

45
(0x0000002d)


### KEYCODE_R

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_R
```

Key code constant: 'R' key.

<br />

Constant Value:

46
(0x0000002e)


### KEYCODE_RECENT_APPS

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_RECENT_APPS
```

Key code constant: To open recent apps view (a.k.a. Overview).


This key is handled by the framework and is never delivered to applications.

<br />

Constant Value:

312
(0x00000138)


### KEYCODE_REFRESH

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_REFRESH
```

Key code constant: Refresh key.

<br />

Constant Value:

285
(0x0000011d)


### KEYCODE_RIGHT_BRACKET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_RIGHT_BRACKET
```

Key code constant: '\]' key.

<br />

Constant Value:

72
(0x00000048)


### KEYCODE_RO

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_RO
```

Key code constant: Japanese Ro key.

<br />

Constant Value:

217
(0x000000d9)


### KEYCODE_S

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_S
```

Key code constant: 'S' key.

<br />

Constant Value:

47
(0x0000002f)


### KEYCODE_SCREENSHOT

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SCREENSHOT
```

Key code constant: To take a screenshot.


This key is fully handled by the framework and will not be sent to the foreground app,
unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYSRQ` which is sent to the app first and only if the app doesn't
handle it, the framework handles it (to take a screenshot).

<br />

Constant Value:

318
(0x0000013e)


### KEYCODE_SCROLL_LOCK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SCROLL_LOCK
```

Key code constant: Scroll Lock key.

<br />

Constant Value:

116
(0x00000074)


### KEYCODE_SEARCH

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SEARCH
```

Key code constant: Search key.

<br />

Constant Value:

84
(0x00000054)


### KEYCODE_SEMICOLON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SEMICOLON
```

Key code constant: ';' key.

<br />

Constant Value:

74
(0x0000004a)


### KEYCODE_SETTINGS

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SETTINGS
```

Key code constant: Settings key.


Starts the system settings activity.

<br />

Constant Value:

176
(0x000000b0)


### KEYCODE_SHIFT_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SHIFT_LEFT
```

Key code constant: Left Shift modifier key.

<br />

Constant Value:

59
(0x0000003b)


### KEYCODE_SHIFT_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SHIFT_RIGHT
```

Key code constant: Right Shift modifier key.

<br />

Constant Value:

60
(0x0000003c)


### KEYCODE_SLASH

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SLASH
```

Key code constant: '/' key.

<br />

Constant Value:

76
(0x0000004c)


### KEYCODE_SLEEP

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SLEEP
```

Key code constant: Sleep key.


Puts the device to sleep.
Behaves somewhat like `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_POWER` but it has no effect if the device is
already asleep.

<br />

Constant Value:

223
(0x000000df)


### KEYCODE_SOFT_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SOFT_LEFT
```

Key code constant: Soft Left key.


Usually situated below the display on phones and used as a multi-function feature key for
selecting a software defined function shown on the bottom left of the display.

<br />

Constant Value:

1
(0x00000001)


### KEYCODE_SOFT_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SOFT_RIGHT
```

Key code constant: Soft Right key.


Usually situated below the display on phones and used as a multi-function feature key for
selecting a software defined function shown on the bottom right of the display.

<br />

Constant Value:

2
(0x00000002)


### KEYCODE_SOFT_SLEEP

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SOFT_SLEEP
```

Key code constant: Put device to sleep unless a wakelock is held.

<br />

Constant Value:

276
(0x00000114)


### KEYCODE_SPACE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SPACE
```

Key code constant: Space key.

<br />

Constant Value:

62
(0x0000003e)


### KEYCODE_STAR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STAR
```

Key code constant: '\*' key.

<br />

Constant Value:

17
(0x00000011)


### KEYCODE_STB_INPUT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STB_INPUT
```

Key code constant: Set-top-box input key.


On TV remotes, switches the input mode on an external Set-top-box.

<br />

Constant Value:

180
(0x000000b4)


### KEYCODE_STB_POWER

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STB_POWER
```

Key code constant: Set-top-box power key.


On TV remotes, toggles the power on an external Set-top-box.

<br />

Constant Value:

179
(0x000000b3)


### KEYCODE_STEM_1

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STEM_1
```

Key code constant: Generic stem key 1 for Wear.

<br />

Constant Value:

265
(0x00000109)


### KEYCODE_STEM_2

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STEM_2
```

Key code constant: Generic stem key 2 for Wear.

<br />

Constant Value:

266
(0x0000010a)


### KEYCODE_STEM_3

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STEM_3
```

Key code constant: Generic stem key 3 for Wear.

<br />

Constant Value:

267
(0x0000010b)


### KEYCODE_STEM_PRIMARY

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STEM_PRIMARY
```

Key code constant: Primary stem key for Wear.


Main power/reset button on watch.

<br />

Constant Value:

264
(0x00000108)


### KEYCODE_STYLUS_BUTTON_PRIMARY

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STYLUS_BUTTON_PRIMARY
```

Key code constant: The primary button on the barrel of a stylus.


This is usually the button closest to the tip of the stylus.

<br />

Constant Value:

308
(0x00000134)


### KEYCODE_STYLUS_BUTTON_SECONDARY

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STYLUS_BUTTON_SECONDARY
```

Key code constant: The secondary button on the barrel of a stylus.


This is usually the second button from the tip of the stylus.

<br />

Constant Value:

309
(0x00000135)


### KEYCODE_STYLUS_BUTTON_TAIL

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STYLUS_BUTTON_TAIL
```

Key code constant: A button on the tail end of a stylus.


The use of this button does not usually correspond to the function of an eraser.

<br />

Constant Value:

311
(0x00000137)


### KEYCODE_STYLUS_BUTTON_TERTIARY

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_STYLUS_BUTTON_TERTIARY
```

Key code constant: The tertiary button on the barrel of a stylus.


This is usually the third button from the tip of the stylus.

<br />

Constant Value:

310
(0x00000136)


### KEYCODE_SWITCH_CHARSET

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SWITCH_CHARSET
```

Key code constant: Switch Charset modifier key.


Used to switch character sets (Kanji, Katakana).

<br />

Constant Value:

95
(0x0000005f)


### KEYCODE_SYM

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYM
```

Key code constant: Symbol modifier key.


Used to enter alternate symbols.

<br />

Constant Value:

63
(0x0000003f)


### KEYCODE_SYSRQ

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYSRQ
```

Key code constant: System Request / Print Screen key.


This key is sent to the app first and only if the app doesn't handle it, the framework
handles it (to take a screenshot), unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCREENSHOT` which is fully
handled by the framework.

<br />

Constant Value:

120
(0x00000078)


### KEYCODE_SYSTEM_NAVIGATION_DOWN

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYSTEM_NAVIGATION_DOWN
```

Key code constant: Consumed by the system for navigation down.

<br />

Constant Value:

281
(0x00000119)


### KEYCODE_SYSTEM_NAVIGATION_LEFT

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYSTEM_NAVIGATION_LEFT
```

Key code constant: Consumed by the system for navigation left.

<br />

Constant Value:

282
(0x0000011a)


### KEYCODE_SYSTEM_NAVIGATION_RIGHT

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYSTEM_NAVIGATION_RIGHT
```

Key code constant: Consumed by the system for navigation right.

<br />

Constant Value:

283
(0x0000011b)


### KEYCODE_SYSTEM_NAVIGATION_UP

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_SYSTEM_NAVIGATION_UP
```

Key code constant: Consumed by the system for navigation up.

<br />

Constant Value:

280
(0x00000118)


### KEYCODE_T

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_T
```

Key code constant: 'T' key.

<br />

Constant Value:

48
(0x00000030)


### KEYCODE_TAB

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TAB
```

Key code constant: Tab key.

<br />

Constant Value:

61
(0x0000003d)


### KEYCODE_THUMBS_DOWN

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_THUMBS_DOWN
```

Key code constant: Thumbs down key.


Apps can use this to let user downvote content.

<br />

Constant Value:

287
(0x0000011f)


### KEYCODE_THUMBS_UP

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_THUMBS_UP
```

Key code constant: Thumbs up key.


Apps can use this to let user upvote content.

<br />

Constant Value:

286
(0x0000011e)


### KEYCODE_TV

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV
```

Key code constant: TV key.


On TV remotes, switches to viewing live TV.

<br />

Constant Value:

170
(0x000000aa)


### KEYCODE_TV_ANTENNA_CABLE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_ANTENNA_CABLE
```

Key code constant: Antenna/Cable key.


Toggles broadcast input source between antenna and cable.

<br />

Constant Value:

242
(0x000000f2)


### KEYCODE_TV_AUDIO_DESCRIPTION

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_AUDIO_DESCRIPTION
```

Key code constant: Audio description key.


Toggles audio description off / on.

<br />

Constant Value:

252
(0x000000fc)


### KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN
```

Key code constant: Audio description mixing volume down key.


Lessen audio description volume as compared with normal audio volume.

<br />

Constant Value:

254
(0x000000fe)


### KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP
```

Key code constant: Audio description mixing volume up key.


Louden audio description volume as compared with normal audio volume.

<br />

Constant Value:

253
(0x000000fd)


### KEYCODE_TV_CONTENTS_MENU

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_CONTENTS_MENU
```

Key code constant: Contents menu key.


Goes to the title list.
Corresponds to Contents Menu (0x0B) of CEC User Control Code.

<br />

Constant Value:

256
(0x00000100)


### KEYCODE_TV_DATA_SERVICE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_DATA_SERVICE
```

Key code constant: TV data service key.


Displays data services like weather, sports.

<br />

Constant Value:

230
(0x000000e6)


### KEYCODE_TV_INPUT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT
```

Key code constant: TV input key.


On TV remotes, switches the input on a television screen.

<br />

Constant Value:

178
(0x000000b2)


### KEYCODE_TV_INPUT_COMPONENT_1

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_COMPONENT_1
```

Key code constant: Component #1 key.


Switches to component video input #1.

<br />

Constant Value:

249
(0x000000f9)


### KEYCODE_TV_INPUT_COMPONENT_2

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_COMPONENT_2
```

Key code constant: Component #2 key.


Switches to component video input #2.

<br />

Constant Value:

250
(0x000000fa)


### KEYCODE_TV_INPUT_COMPOSITE_1

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_COMPOSITE_1
```

Key code constant: Composite #1 key.


Switches to composite video input #1.

<br />

Constant Value:

247
(0x000000f7)


### KEYCODE_TV_INPUT_COMPOSITE_2

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_COMPOSITE_2
```

Key code constant: Composite #2 key.


Switches to composite video input #2.

<br />

Constant Value:

248
(0x000000f8)


### KEYCODE_TV_INPUT_HDMI_1

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_HDMI_1
```

Key code constant: HDMI #1 key.


Switches to HDMI input #1.

<br />

Constant Value:

243
(0x000000f3)


### KEYCODE_TV_INPUT_HDMI_2

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_HDMI_2
```

Key code constant: HDMI #2 key.


Switches to HDMI input #2.

<br />

Constant Value:

244
(0x000000f4)


### KEYCODE_TV_INPUT_HDMI_3

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_HDMI_3
```

Key code constant: HDMI #3 key.


Switches to HDMI input #3.

<br />

Constant Value:

245
(0x000000f5)


### KEYCODE_TV_INPUT_HDMI_4

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_HDMI_4
```

Key code constant: HDMI #4 key.


Switches to HDMI input #4.

<br />

Constant Value:

246
(0x000000f6)


### KEYCODE_TV_INPUT_VGA_1

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_INPUT_VGA_1
```

Key code constant: VGA #1 key.


Switches to VGA (analog RGB) input #1.

<br />

Constant Value:

251
(0x000000fb)


### KEYCODE_TV_MEDIA_CONTEXT_MENU

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_MEDIA_CONTEXT_MENU
```

Key code constant: Media context menu key.


Goes to the context menu of media contents.
Corresponds to Media Context-sensitive Menu (0x11) of CEC User Control Code.

<br />

Constant Value:

257
(0x00000101)


### KEYCODE_TV_NETWORK

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_NETWORK
```

Key code constant: Toggle Network key.


Toggles selecting broadcast services.

<br />

Constant Value:

241
(0x000000f1)


### KEYCODE_TV_NUMBER_ENTRY

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_NUMBER_ENTRY
```

Key code constant: Number entry key.


Initiates to enter multi-digit channel number when each digit key is assigned for selecting
a separate channel.
Corresponds to Number Entry Mode (0x1D) of CEC User Control Code.

<br />

Constant Value:

234
(0x000000ea)


### KEYCODE_TV_POWER

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_POWER
```

Key code constant: TV power key.


On HDMI TV panel devices and Android TV devices that don't support HDMI, toggles the power
state of the device.
On HDMI source devices, toggles the power state of the HDMI-connected TV via HDMI-CEC and
makes the source device follow this power state.

<br />

Constant Value:

177
(0x000000b1)


### KEYCODE_TV_RADIO_SERVICE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_RADIO_SERVICE
```

Key code constant: Radio key.


Toggles TV service / Radio service.

<br />

Constant Value:

232
(0x000000e8)


### KEYCODE_TV_SATELLITE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_SATELLITE
```

Key code constant: Satellite key.


Switches to digital satellite broadcast service.

<br />

Constant Value:

237
(0x000000ed)


### KEYCODE_TV_SATELLITE_BS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_SATELLITE_BS
```

Key code constant: BS key.


Switches to BS digital satellite broadcasting service available in Japan.

<br />

Constant Value:

238
(0x000000ee)


### KEYCODE_TV_SATELLITE_CS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_SATELLITE_CS
```

Key code constant: CS key.


Switches to CS digital satellite broadcasting service available in Japan.

<br />

Constant Value:

239
(0x000000ef)


### KEYCODE_TV_SATELLITE_SERVICE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_SATELLITE_SERVICE
```

Key code constant: BS/CS key.


Toggles between BS and CS digital satellite services.

<br />

Constant Value:

240
(0x000000f0)


### KEYCODE_TV_TELETEXT

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_TELETEXT
```

Key code constant: Teletext key.


Displays Teletext service.

<br />

Constant Value:

233
(0x000000e9)


### KEYCODE_TV_TERRESTRIAL_ANALOG

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_TERRESTRIAL_ANALOG
```

Key code constant: Analog Terrestrial key.


Switches to analog terrestrial broadcast service.

<br />

Constant Value:

235
(0x000000eb)


### KEYCODE_TV_TERRESTRIAL_DIGITAL

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_TERRESTRIAL_DIGITAL
```

Key code constant: Digital Terrestrial key.


Switches to digital terrestrial broadcast service.

<br />

Constant Value:

236
(0x000000ec)


### KEYCODE_TV_TIMER_PROGRAMMING

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_TIMER_PROGRAMMING
```

Key code constant: Timer programming key.


Goes to the timer recording menu.
Corresponds to Timer Programming (0x54) of CEC User Control Code.

<br />

Constant Value:

258
(0x00000102)


### KEYCODE_TV_ZOOM_MODE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_TV_ZOOM_MODE
```

Key code constant: Zoom mode key.


Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.).

<br />

Constant Value:

255
(0x000000ff)


### KEYCODE_U

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_U
```

Key code constant: 'U' key.

<br />

Constant Value:

49
(0x00000031)


### KEYCODE_UNKNOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_UNKNOWN
```

Key code constant: Unknown key code.

<br />

Constant Value:

0
(0x00000000)


### KEYCODE_V

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_V
```

Key code constant: 'V' key.

<br />

Constant Value:

50
(0x00000032)


### KEYCODE_VIDEO_APP_1

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_1
```

Key code constant: Video Application key #1.

<br />

Constant Value:

289
(0x00000121)


### KEYCODE_VIDEO_APP_2

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_2
```

Key code constant: Video Application key #2.

<br />

Constant Value:

290
(0x00000122)


### KEYCODE_VIDEO_APP_3

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_3
```

Key code constant: Video Application key #3.

<br />

Constant Value:

291
(0x00000123)


### KEYCODE_VIDEO_APP_4

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_4
```

Key code constant: Video Application key #4.

<br />

Constant Value:

292
(0x00000124)


### KEYCODE_VIDEO_APP_5

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_5
```

Key code constant: Video Application key #5.

<br />

Constant Value:

293
(0x00000125)


### KEYCODE_VIDEO_APP_6

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_6
```

Key code constant: Video Application key #6.

<br />

Constant Value:

294
(0x00000126)


### KEYCODE_VIDEO_APP_7

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_7
```

Key code constant: Video Application key #7.

<br />

Constant Value:

295
(0x00000127)


### KEYCODE_VIDEO_APP_8

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VIDEO_APP_8
```

Key code constant: Video Application key #8.

<br />

Constant Value:

296
(0x00000128)


### KEYCODE_VOICE_ASSIST

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VOICE_ASSIST
```

Key code constant: Voice Assist key.


Launches the global voice assist activity.
Not delivered to applications.

<br />

Constant Value:

231
(0x000000e7)


### KEYCODE_VOLUME_DOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VOLUME_DOWN
```

Key code constant: Volume Down key.


Adjusts the speaker volume down.

<br />

Constant Value:

25
(0x00000019)


### KEYCODE_VOLUME_MUTE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VOLUME_MUTE
```

Key code constant: Volume Mute key.


Mute key for speaker (unlike `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MUTE`, which is the mute key for the
microphone).
This key should normally be implemented as a toggle such that the first press mutes the
speaker and the second press restores the original volume.

<br />

Constant Value:

164
(0x000000a4)


### KEYCODE_VOLUME_UP

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_VOLUME_UP
```

Key code constant: Volume Up key.


Adjusts the speaker volume up.

<br />

Constant Value:

24
(0x00000018)


### KEYCODE_W

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_W
```

Key code constant: 'W' key.

<br />

Constant Value:

51
(0x00000033)


### KEYCODE_WAKEUP

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_WAKEUP
```

Key code constant: Wakeup key.


Wakes up the device.
Behaves somewhat like `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_POWER` but it has no effect if the device is
already awake.

<br />

Constant Value:

224
(0x000000e0)


### KEYCODE_WINDOW

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_WINDOW
```

Key code constant: Window key.


On TV remotes, toggles picture-in-picture mode or other windowing functions.
On Android Wear devices, triggers a display offset.

<br />

Constant Value:

171
(0x000000ab)


### KEYCODE_X

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_X
```

Key code constant: 'X' key.

<br />

Constant Value:

52
(0x00000034)


### KEYCODE_Y

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_Y
```

Key code constant: 'Y' key.

<br />

Constant Value:

53
(0x00000035)


### KEYCODE_YEN

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_YEN
```

Key code constant: Japanese Yen key.

<br />

Constant Value:

216
(0x000000d8)


### KEYCODE_Z

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_Z
```

Key code constant: 'Z' key.

<br />

Constant Value:

54
(0x00000036)


### KEYCODE_ZENKAKU_HANKAKU

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ZENKAKU_HANKAKU
```

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

<br />

Constant Value:

211
(0x000000d3)


### KEYCODE_ZOOM_IN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ZOOM_IN
```

Key code constant: Zoom in key.

<br />

Constant Value:

168
(0x000000a8)


### KEYCODE_ZOOM_OUT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEYCODE_ZOOM_OUT
```

Key code constant: Zoom out key.

<br />

Constant Value:

169
(0x000000a9)


### MAX_KEYCODE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int MAX_KEYCODE
```


**This constant was deprecated
in API level 15.**   

There are now more than MAX_KEYCODE keycodes.
Use `https://developer.android.com/reference/android/view/KeyEvent#getMaxKeyCode()` instead.

<br />

<br />

Constant Value:

84
(0x00000054)


### META_ALT_LEFT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_ALT_LEFT_ON
```

<br />

This mask is used to check whether the left ALT meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isAltPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT`

Constant Value:

16
(0x00000010)


### META_ALT_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_ALT_MASK
```

This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON`
and `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_RIGHT_ON`.

<br />

Constant Value:

50
(0x00000032)


### META_ALT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_ALT_ON
```

<br />

This mask is used to check whether one of the ALT meta keys is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isAltPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_RIGHT`

Constant Value:

2
(0x00000002)


### META_ALT_RIGHT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_ALT_RIGHT_ON
```

<br />

This mask is used to check whether the right the ALT meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isAltPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_RIGHT`

Constant Value:

32
(0x00000020)


### META_CAPS_LOCK_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_CAPS_LOCK_ON
```

<br />

This mask is used to check whether the CAPS LOCK meta key is on.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isCapsLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`

Constant Value:

1048576
(0x00100000)


### META_CTRL_LEFT_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_CTRL_LEFT_ON
```

<br />

This mask is used to check whether the left CTRL meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isCtrlPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_LEFT`

Constant Value:

8192
(0x00002000)


### META_CTRL_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_CTRL_MASK
```

This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_LEFT_ON`
and `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_RIGHT_ON`.

<br />

Constant Value:

28672
(0x00007000)


### META_CTRL_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_CTRL_ON
```

<br />

This mask is used to check whether one of the CTRL meta keys is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isCtrlPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_RIGHT`

Constant Value:

4096
(0x00001000)


### META_CTRL_RIGHT_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_CTRL_RIGHT_ON
```

<br />

This mask is used to check whether the right CTRL meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isCtrlPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_RIGHT`

Constant Value:

16384
(0x00004000)


### META_FUNCTION_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_FUNCTION_ON
```

<br />

This mask is used to check whether the FUNCTION meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isFunctionPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`

Constant Value:

8
(0x00000008)


### META_META_LEFT_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_META_LEFT_ON
```

<br />

This mask is used to check whether the left META meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isMetaPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_LEFT`

Constant Value:

131072
(0x00020000)


### META_META_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_META_MASK
```

This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_META_LEFT_ON`
and `https://developer.android.com/reference/android/view/KeyEvent#META_META_RIGHT_ON`.

<br />

Constant Value:

458752
(0x00070000)


### META_META_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_META_ON
```

<br />

This mask is used to check whether one of the META meta keys is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isMetaPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_RIGHT`

Constant Value:

65536
(0x00010000)


### META_META_RIGHT_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_META_RIGHT_ON
```

<br />

This mask is used to check whether the right META meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isMetaPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_RIGHT`

Constant Value:

262144
(0x00040000)


### META_NUM_LOCK_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_NUM_LOCK_ON
```

<br />

This mask is used to check whether the NUM LOCK meta key is on.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isNumLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK`

Constant Value:

2097152
(0x00200000)


### META_SCROLL_LOCK_ON

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SCROLL_LOCK_ON
```

<br />

This mask is used to check whether the SCROLL LOCK meta key is on.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isScrollLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`

Constant Value:

4194304
(0x00400000)


### META_SHIFT_LEFT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SHIFT_LEFT_ON
```

<br />

This mask is used to check whether the left SHIFT meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isShiftPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_LEFT`

Constant Value:

64
(0x00000040)


### META_SHIFT_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SHIFT_MASK
```

This mask is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`
and `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_RIGHT_ON`.

<br />

Constant Value:

193
(0x000000c1)


### META_SHIFT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SHIFT_ON
```

<br />

This mask is used to check whether one of the SHIFT meta keys is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isShiftPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_RIGHT`

Constant Value:

1
(0x00000001)


### META_SHIFT_RIGHT_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SHIFT_RIGHT_ON
```

<br />

This mask is used to check whether the right SHIFT meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isShiftPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_RIGHT`

Constant Value:

128
(0x00000080)


### META_SYM_ON

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int META_SYM_ON
```

<br />

This mask is used to check whether the SYM meta key is pressed.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isSymPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`

Constant Value:

4
(0x00000004)


## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<KeyEvent> CREATOR
```

<br />

<br />

## Public constructors

### KeyEvent

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (KeyEvent origEvent)
```

Make an exact copy of an existing key event.

<br />

| Parameters ||
|---|---|
| `origEvent` | `KeyEvent` <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (KeyEvent origEvent, 
                long eventTime, 
                int newRepeat)
```


**This constructor is deprecated.**   

Use `https://developer.android.com/reference/android/view/KeyEvent#changeTimeRepeat(android.view.KeyEvent,%20long,%20int)`
instead.

Copy an existing key event, modifying its time and repeat count.

<br />

| Parameters ||
|---|---|
| `origEvent` | `KeyEvent`: The existing event to be copied. <br /> |
| `eventTime` | `long`: The new event time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) of the event. <br /> |
| `newRepeat` | `int`: The new repeat count of the event. <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (int action, 
                int code)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |

### KeyEvent

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long time, 
                String characters, 
                int deviceId, 
                int flags)
```

Create a new key event for a string of characters. The key code,
action, repeat count and source will automatically be set to
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN`, `https://developer.android.com/reference/android/view/KeyEvent#ACTION_MULTIPLE`, 0, and
`https://developer.android.com/reference/android/view/InputDevice#SOURCE_KEYBOARD` for you.

<br />

| Parameters ||
|---|---|
| `time` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event occured. <br /> |
| `characters` | `String`: The string of characters. <br /> |
| `deviceId` | `int`: The device ID that generated the key event. <br /> |
| `flags` | `int`: The flags for this key event <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long downTime, 
                long eventTime, 
                int action, 
                int code, 
                int repeat)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `downTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this key code originally went down. <br /> |
| `eventTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event happened. <br /> |
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |
| `repeat` | `int`: A repeat count for down events (\> 0 if this is after the initial down) or event count for multiple events. <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long downTime, 
                long eventTime, 
                int action, 
                int code, 
                int repeat, 
                int metaState)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `downTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this key code originally went down. <br /> |
| `eventTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event happened. <br /> |
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |
| `repeat` | `int`: A repeat count for down events (\> 0 if this is after the initial down) or event count for multiple events. <br /> |
| `metaState` | `int`: Flags indicating which meta keys are currently pressed. <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long downTime, 
                long eventTime, 
                int action, 
                int code, 
                int repeat, 
                int metaState, 
                int deviceId, 
                int scancode)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `downTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this key code originally went down. <br /> |
| `eventTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event happened. <br /> |
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |
| `repeat` | `int`: A repeat count for down events (\> 0 if this is after the initial down) or event count for multiple events. <br /> |
| `metaState` | `int`: Flags indicating which meta keys are currently pressed. <br /> |
| `deviceId` | `int`: The device ID that generated the key event. <br /> |
| `scancode` | `int`: Raw device scan code of the event. <br /> |

### KeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long downTime, 
                long eventTime, 
                int action, 
                int code, 
                int repeat, 
                int metaState, 
                int deviceId, 
                int scancode, 
                int flags)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `downTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this key code originally went down. <br /> |
| `eventTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event happened. <br /> |
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |
| `repeat` | `int`: A repeat count for down events (\> 0 if this is after the initial down) or event count for multiple events. <br /> |
| `metaState` | `int`: Flags indicating which meta keys are currently pressed. <br /> |
| `deviceId` | `int`: The device ID that generated the key event. <br /> |
| `scancode` | `int`: Raw device scan code of the event. <br /> |
| `flags` | `int`: The flags for this key event <br /> |

### KeyEvent

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent (long downTime, 
                long eventTime, 
                int action, 
                int code, 
                int repeat, 
                int metaState, 
                int deviceId, 
                int scancode, 
                int flags, 
                int source)
```

Create a new key event.

<br />

| Parameters ||
|---|---|
| `downTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this key code originally went down. <br /> |
| `eventTime` | `long`: The time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) at which this event happened. <br /> |
| `action` | `int`: Action code: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`. <br /> |
| `code` | `int`: The key code. <br /> |
| `repeat` | `int`: A repeat count for down events (\> 0 if this is after the initial down) or event count for multiple events. <br /> |
| `metaState` | `int`: Flags indicating which meta keys are currently pressed. <br /> |
| `deviceId` | `int`: The device ID that generated the key event. <br /> |
| `scancode` | `int`: Raw device scan code of the event. <br /> |
| `flags` | `int`: The flags for this key event <br /> |
| `source` | `int`: The input source such as `https://developer.android.com/reference/android/view/InputDevice#SOURCE_KEYBOARD`. <br /> |

## Public methods

### changeAction

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static KeyEvent changeAction (KeyEvent event, 
                int action)
```

Create a new key event that is the same as the given one, but whose
action is replaced with the given value.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The existing event to be copied. This is not modified. <br /> |
| `action` | `int`: The new action code of the event. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyEvent` | <br /> |

### changeFlags

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static KeyEvent changeFlags (KeyEvent event, 
                int flags)
```

Create a new key event that is the same as the given one, but whose
flags are replaced with the given value.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The existing event to be copied. This is not modified. <br /> |
| `flags` | `int`: The new flags constant. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyEvent` | <br /> |

### changeTimeRepeat

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static KeyEvent changeTimeRepeat (KeyEvent event, 
                long eventTime, 
                int newRepeat, 
                int newFlags)
```

Create a new key event that is the same as the given one, but whose
event time and repeat count are replaced with the given value.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The existing event to be copied. This is not modified. <br /> |
| `eventTime` | `long`: The new event time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) of the event. <br /> |
| `newRepeat` | `int`: The new repeat count of the event. <br /> |
| `newFlags` | `int`: New flags for the event, replacing the entire value in the original event. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyEvent` | <br /> |

### changeTimeRepeat

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static KeyEvent changeTimeRepeat (KeyEvent event, 
                long eventTime, 
                int newRepeat)
```

Create a new key event that is the same as the given one, but whose
event time and repeat count are replaced with the given value.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The existing event to be copied. This is not modified. <br /> |
| `eventTime` | `long`: The new event time (in `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()`) of the event. <br /> |
| `newRepeat` | `int`: The new repeat count of the event. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyEvent` | <br /> |

### dispatch

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean dispatch (KeyEvent.Callback receiver, 
                KeyEvent.DispatcherState state, 
                Object target)
```

Deliver this key event to a `https://developer.android.com/reference/android/view/KeyEvent.Callback` interface. If this is
an `https://developer.android.com/reference/android/view/KeyEvent#ACTION_MULTIPLE` event and it is not handled, then an attempt will
be made to deliver a single normal event.

<br />

| Parameters ||
|---|---|
| `receiver` | `KeyEvent.Callback`: The Callback that will be given the event. <br /> |
| `state` | `KeyEvent.DispatcherState`: State information retained across events. <br /> |
| `target` | `Object`: The target of the dispatch, for use in tracking. <br /> |

| Returns ||
|---|---|
| `boolean` | The return value from the Callback method that was called. <br /> |

### dispatch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean dispatch (KeyEvent.Callback receiver)
```


**This method was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/view/KeyEvent#dispatch(android.view.KeyEvent.Callback,%20android.view.KeyEvent.DispatcherState,%20java.lang.Object)` instead.

<br />

<br />

| Parameters ||
|---|---|
| `receiver` | `KeyEvent.Callback` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### getAction

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getAction ()
```

Retrieve the action of this key event.

<br />

| Returns ||
|---|---|
| `int` | the event action: either `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN`, `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP`, or `https://developer.android.com/reference/android/view/KeyEvent#ACTION_MULTIPLE`. <br /> |

### getCharacters

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final String getCharacters ()
```


**This method was deprecated
in API level 29.**   

no longer used by the input system.

For the special case of a `https://developer.android.com/reference/android/view/KeyEvent#ACTION_MULTIPLE` event with key
code of `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN`, this is a raw string of characters
associated with the event. In all other cases it is null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Returns a String of 1 or more characters associated with the event. <br /> |

### getDeadChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getDeadChar (int accent, 
                int c)
```

Get the character that is produced by putting accent on the character
c.
For example, getDeadChar('\`', 'e') returns è.

<br />

| Parameters ||
|---|---|
| `accent` | `int` <br /> |
| `c` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getDeviceId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getDeviceId ()
```

Gets the id for the device that this event came from. An id of
zero indicates that the event didn't come from a physical device
and maps to the default keymap. The other numbers are arbitrary and
you shouldn't depend on the values.

<br />

| Returns ||
|---|---|
| `int` | The device id. <br /> |

### getDisplayLabel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getDisplayLabel ()
```

Gets the primary character for this key.
In other words, the label that is physically printed on it.

<br />

| Returns ||
|---|---|
| `char` | The display label character, or 0 if none (eg. for non-printing keys). <br /> |

### getDownTime

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final long getDownTime ()
```

Retrieve the time of the most recent key down event,
in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. If this
is a down event, this will be the same as `https://developer.android.com/reference/android/view/KeyEvent#getEventTime()`.
Note that when chording keys, this value is the down time of the
most recently pressed key, which may *not* be the same physical
key of this event.

<br />

| Returns ||
|---|---|
| `long` | Returns the most recent key down time, in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base <br /> |

### getEventTime

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final long getEventTime ()
```

Retrieve the time this event occurred,
in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base.

<br />

| Returns ||
|---|---|
| `long` | Returns the time this event occurred, in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. <br /> |

### getFlags

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getFlags ()
```

Returns the flags for this key event.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#FLAG_WOKE_HERE`

### getKeyCharacterMap

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final KeyCharacterMap getKeyCharacterMap ()
```

Gets the `https://developer.android.com/reference/android/view/KeyCharacterMap` associated with the keyboard device.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyCharacterMap` | The associated key character map. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyCharacterMap.UnavailableException` | if the key character map could not be loaded because it was malformed or the default key character map is missing from the system. |

**See also:**

- `https://developer.android.com/reference/android/view/KeyCharacterMap#load(int)`

### getKeyCode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getKeyCode ()
```

Retrieve the key code of the key event. This is the physical key that
was pressed, *not* the Unicode character.

<br />

| Returns ||
|---|---|
| `int` | The key code of the event. <br /> |

### getKeyData

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getKeyData (KeyCharacterMap.KeyData results)
```


**This method was deprecated
in API level 15.**   

instead use `https://developer.android.com/reference/android/view/KeyEvent#getDisplayLabel()`,
`https://developer.android.com/reference/android/view/KeyEvent#getNumber()` or `https://developer.android.com/reference/android/view/KeyEvent#getUnicodeChar(int)`.

Get the character conversion data for a given key code.

<br />

| Parameters ||
|---|---|
| `results` | `KeyCharacterMap.KeyData`: A `https://developer.android.com/reference/android/view/KeyCharacterMap.KeyData` instance that will be filled with the results. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the key was mapped. If the key was not mapped, results is not modified. <br /> |

### getMatch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getMatch (char[] chars, 
                int metaState)
```

Gets the first character in the character array that can be generated
by the specified key code. If there are multiple choices, prefers
the one that would be generated with the specified meta key modifier state.

<br />

| Parameters ||
|---|---|
| `chars` | `char`: The array of matching characters to consider. <br /> |
| `metaState` | `int`: The preferred meta key modifier state. <br /> |

| Returns ||
|---|---|
| `char` | The matching associated character, or 0 if none. <br /> |

### getMatch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getMatch (char[] chars)
```

Gets the first character in the character array that can be generated
by the specified key code.


This is a convenience function that returns the same value as
`https://developer.android.com/reference/android/view/KeyEvent#getMatch(char[],%20int)`.

<br />

<br />

| Parameters ||
|---|---|
| `chars` | `char`: The array of matching characters to consider. <br /> |

| Returns ||
|---|---|
| `char` | The matching associated character, or 0 if none. <br /> |

### getMaxKeyCode

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getMaxKeyCode ()
```

Returns the maximum keycode.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getMetaState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getMetaState ()
```

<br />

Returns the state of the meta keys.

<br />

<br />

| Returns ||
|---|---|
| `int` | an integer in which each bit set to 1 represents a pressed meta key <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#isAltPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isShiftPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isSymPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isCtrlPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isMetaPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isFunctionPressed()`
- `https://developer.android.com/reference/android/view/KeyEvent#isCapsLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#isNumLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#isScrollLockOn()`
- `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_RIGHT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_RIGHT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SYM_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_FUNCTION_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_LEFT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_RIGHT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_META_LEFT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_META_RIGHT_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON`
- `https://developer.android.com/reference/android/view/KeyEvent#getModifiers()`

### getModifierMetaStateMask

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getModifierMetaStateMask ()
```

Gets a mask that includes all valid modifier key meta state bits.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, the mask specifically excludes
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.

<br />

<br />

| Returns ||
|---|---|
| `int` | The modifier meta state mask which is a combination of `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_RIGHT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_RIGHT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_LEFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_RIGHT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_META_LEFT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_META_RIGHT_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SYM_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_FUNCTION_ON`. <br /> |

### getModifiers

Added in [API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getModifiers ()
```

Returns the state of the modifier keys.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function specifically masks out
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.


The value returned consists of the meta state (from `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`)
normalized using `https://developer.android.com/reference/android/view/KeyEvent#normalizeMetaState(int)` and then masked with
`https://developer.android.com/reference/android/view/KeyEvent#getModifierMetaStateMask()` so that only valid modifier bits are retained.

<br />

<br />

| Returns ||
|---|---|
| `int` | An integer in which each bit set to 1 represents a pressed modifier key. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#getMetaState()`

### getNumber

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getNumber ()
```

Gets the number or symbol associated with the key.


The character value is returned, not the numeric value.
If the key is not a number, but is a symbol, the symbol is retuned.


This method is intended to to support dial pads and other numeric or
symbolic entry on keyboards where certain keys serve dual function
as alphabetic and symbolic keys. This method returns the number
or symbol associated with the key independent of whether the user
has pressed the required modifier.


For example, on one particular keyboard the keys on the top QWERTY row generate
numbers when ALT is pressed such that ALT-Q maps to '1'. So for that keyboard
when `https://developer.android.com/reference/android/view/KeyEvent#getNumber()` is called with `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_Q` it returns '1'
so that the user can type numbers without pressing ALT when it makes sense.

<br />

<br />

| Returns ||
|---|---|
| `char` | The associated numeric or symbolic character, or 0 if none. <br /> |

### getRepeatCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getRepeatCount ()
```

Retrieve the repeat count of the event. For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` events,
this is the number of times the key has repeated with the first
down starting at 0 and counting up from there. For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` events,
this is always 0.

<br />

| Returns ||
|---|---|
| `int` | The number of times the key has repeated. <br /> |

### getScanCode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getScanCode ()
```

Retrieve the hardware key id of this key event. These values are not
reliable and vary from device to device.


Mostly this is here for debugging purposes.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getSource

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getSource ()
```

Gets the source of the event.

<br />

| Returns ||
|---|---|
| `int` | The event source or `https://developer.android.com/reference/android/view/InputDevice#SOURCE_UNKNOWN` if unknown. <br /> |

### getUnicodeChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getUnicodeChar (int metaState)
```

Gets the Unicode character generated by the specified key and meta
key state combination.


Returns the Unicode character that the specified key would produce
when the specified meta bits (see `https://developer.android.com/reference/android/text/method/MetaKeyKeyListener`)
were active.


Returns 0 if the key is not one that is used to type Unicode
characters.


If the return value has bit `https://developer.android.com/reference/android/view/KeyCharacterMap#COMBINING_ACCENT` set, the
key is a "dead key" that should be combined with another to
actually produce a character -- see `https://developer.android.com/reference/android/view/KeyCharacterMap#getDeadChar(int,%20int)` --
after masking with `https://developer.android.com/reference/android/view/KeyCharacterMap#COMBINING_ACCENT_MASK`.

<br />

<br />

| Parameters ||
|---|---|
| `metaState` | `int`: The meta key modifier state. <br /> |

| Returns ||
|---|---|
| `int` | The associated character or combining accent, or 0 if none. <br /> |

### getUnicodeChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getUnicodeChar ()
```

Gets the Unicode character generated by the specified key and meta
key state combination.


Returns the Unicode character that the specified key would produce
when the specified meta bits (see `https://developer.android.com/reference/android/text/method/MetaKeyKeyListener`)
were active.


Returns 0 if the key is not one that is used to type Unicode
characters.


If the return value has bit `https://developer.android.com/reference/android/view/KeyCharacterMap#COMBINING_ACCENT` set, the
key is a "dead key" that should be combined with another to
actually produce a character -- see `https://developer.android.com/reference/android/view/KeyCharacterMap#getDeadChar(int,%20int)` --
after masking with `https://developer.android.com/reference/android/view/KeyCharacterMap#COMBINING_ACCENT_MASK`.

<br />

<br />

| Returns ||
|---|---|
| `int` | The associated character or combining accent, or 0 if none. <br /> |

### hasModifiers

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean hasModifiers (int modifiers)
```

Returns true if only the specified modifiers keys are pressed.
Returns false if a different combination of modifier keys are pressed.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function ignores
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.


If the specified modifier mask includes directional modifiers, such as
`https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`, then this method ensures that the
modifier is pressed on that side.
If the specified modifier mask includes non-directional modifiers, such as
`https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`, then this method ensures that the modifier
is pressed on either side.
If the specified modifier mask includes both directional and non-directional modifiers
for the same type of key, such as `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`,
then this method throws an illegal argument exception.

<br />

<br />

| Parameters ||
|---|---|
| `modifiers` | `int`: The meta state of the modifier keys to check. May be a combination of modifier meta states as defined by `https://developer.android.com/reference/android/view/KeyEvent#getModifierMetaStateMask()`. May be 0 to ensure that no modifier keys are pressed. <br /> |

| Returns ||
|---|---|
| `boolean` | True if only the specified modifier keys are pressed. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the modifiers parameter contains invalid modifiers |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#metaStateHasModifiers(int,%20int)`

### hasNoModifiers

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean hasNoModifiers ()
```

Returns true if no modifier keys are pressed.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function ignores
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.


The meta state is normalized prior to comparison using `https://developer.android.com/reference/android/view/KeyEvent#normalizeMetaState(int)`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if no modifier keys are pressed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#metaStateHasNoModifiers(int)`

### isAltPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isAltPressed ()
```

<br />

Returns the pressed state of the ALT meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the ALT key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_RIGHT`
- `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`

### isCanceled

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isCanceled ()
```

For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` events, indicates that the event has been
canceled as per `https://developer.android.com/reference/android/view/KeyEvent#FLAG_CANCELED`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isCapsLockOn

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isCapsLockOn ()
```

<br />

Returns the locked state of the CAPS LOCK meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the CAPS LOCK key is on, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`

### isCtrlPressed

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isCtrlPressed ()
```

<br />

Returns the pressed state of the CTRL meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the CTRL key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_RIGHT`
- `https://developer.android.com/reference/android/view/KeyEvent#META_CTRL_ON`

### isFunctionPressed

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isFunctionPressed ()
```

<br />

Returns the pressed state of the FUNCTION meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the FUNCTION key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FUNCTION`
- `https://developer.android.com/reference/android/view/KeyEvent#META_FUNCTION_ON`

### isGamepadButton

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final boolean isGamepadButton (int keyCode)
```

Returns true if the specified keycode is a gamepad button.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | True if the keycode is a gamepad button, such as `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_BUTTON_A`. <br /> |

### isLongPress

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isLongPress ()
```

For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_DOWN` events, indicates that the event has been
canceled as per `https://developer.android.com/reference/android/view/KeyEvent#FLAG_LONG_PRESS`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isMediaSessionKey

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final boolean isMediaSessionKey (int keyCode)
```

Returns whether this key will be sent to the `https://developer.android.com/reference/android/media/session/MediaSession.Callback` if not handled.

The following key codes are considered `https://developer.android.com/reference/android/media/session/MediaSession` keys:

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PLAY`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PAUSE`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PLAY_PAUSE`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_HEADSETHOOK`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_STOP`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_NEXT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_PREVIOUS`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_REWIND`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_RECORD`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_MEDIA_FAST_FORWARD`

<br />

<br />

| Parameters ||
|---|---|
| `keyCode` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isMetaPressed

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isMetaPressed ()
```

<br />

Returns the pressed state of the META meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the META key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_RIGHT`
- `https://developer.android.com/reference/android/view/KeyEvent#META_META_ON`

### isModifierKey

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isModifierKey (int keyCode)
```

Returns true if this key code is a modifier key.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function return false
for those keys.

<br />

<br />

| Parameters ||
|---|---|
| `keyCode` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | True if the key code is one of `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_LEFT` `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_RIGHT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_LEFT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ALT_RIGHT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_LEFT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CTRL_RIGHT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_LEFT`, or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_META_RIGHT`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYM`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_FUNCTION`. <br /> |

### isNumLockOn

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isNumLockOn ()
```

<br />

Returns the locked state of the NUM LOCK meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the NUM LOCK key is on, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK`
- `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`

### isPrintingKey

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPrintingKey ()
```

Returns true if this key produces a glyph.

<br />

| Returns ||
|---|---|
| `boolean` | True if the key is a printing key. <br /> |

### isScrollLockOn

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isScrollLockOn ()
```

<br />

Returns the locked state of the SCROLL LOCK meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the SCROLL LOCK key is on, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON`

### isShiftPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isShiftPressed ()
```

<br />

Returns the pressed state of the SHIFT meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the SHIFT key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_LEFT`
- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SHIFT_RIGHT`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`

### isSymPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isSymPressed ()
```

<br />

Returns the pressed state of the SYM meta key.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the SYM key is pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SYM`
- `https://developer.android.com/reference/android/view/KeyEvent#META_SYM_ON`

### isSystem

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isSystem ()
```

Is this a system key? System keys can not be used for menu shortcuts.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isTracking

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isTracking ()
```

For `https://developer.android.com/reference/android/view/KeyEvent#ACTION_UP` events, indicates that the event is still being
tracked from its initial down event as per
`https://developer.android.com/reference/android/view/KeyEvent#FLAG_TRACKING`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### keyCodeFromString

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int keyCodeFromString (String symbolicName)
```

Gets a keycode by its symbolic name such as "KEYCODE_A" or an equivalent
numeric constant such as "29". For symbolic names,
starting in `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q` the prefix "KEYCODE_" is optional.

<br />

| Parameters ||
|---|---|
| `symbolicName` | `String`: The symbolic name of the keycode. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | The keycode or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_UNKNOWN` if not found. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#keyCodeToString(int)`

### keyCodeToString

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String keyCodeToString (int keyCode)
```

Returns a string that represents the symbolic name of the specified keycode
such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant
such as "1001" if unknown.

This function is intended to be used mostly for debugging, logging, and testing. It is not
locale-specific and is not intended to be used in a user-facing manner.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: The key code. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The symbolic name of the specified keycode. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyCharacterMap#getDisplayLabel(int)`

### metaStateHasModifiers

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean metaStateHasModifiers (int metaState, 
                int modifiers)
```

Returns true if only the specified modifier keys are pressed according to
the specified meta state. Returns false if a different combination of modifier
keys are pressed.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function ignores
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.


If the specified modifier mask includes directional modifiers, such as
`https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`, then this method ensures that the
modifier is pressed on that side.
If the specified modifier mask includes non-directional modifiers, such as
`https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON`, then this method ensures that the modifier
is pressed on either side.
If the specified modifier mask includes both directional and non-directional modifiers
for the same type of key, such as `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_SHIFT_LEFT_ON`,
then this method throws an illegal argument exception.

<br />

<br />

| Parameters ||
|---|---|
| `metaState` | `int`: The meta state to consider. <br /> |
| `modifiers` | `int`: The meta state of the modifier keys to check. May be a combination of modifier meta states as defined by `https://developer.android.com/reference/android/view/KeyEvent#getModifierMetaStateMask()`. May be 0 to ensure that no modifier keys are pressed. <br /> |

| Returns ||
|---|---|
| `boolean` | True if only the specified modifier keys are pressed. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the modifiers parameter contains invalid modifiers |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#hasModifiers(int)`

### metaStateHasNoModifiers

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean metaStateHasNoModifiers (int metaState)
```

Returns true if no modifiers keys are pressed according to the specified meta state.


For the purposes of this function, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_CAPS_LOCK`,
`https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SCROLL_LOCK`, and `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_NUM_LOCK` are
not considered modifier keys. Consequently, this function ignores
`https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`, `https://developer.android.com/reference/android/view/KeyEvent#META_SCROLL_LOCK_ON` and `https://developer.android.com/reference/android/view/KeyEvent#META_NUM_LOCK_ON`.


The meta state is normalized prior to comparison using `https://developer.android.com/reference/android/view/KeyEvent#normalizeMetaState(int)`.

<br />

<br />

| Parameters ||
|---|---|
| `metaState` | `int`: The meta state to consider. <br /> |

| Returns ||
|---|---|
| `boolean` | True if no modifier keys are pressed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/KeyEvent#hasNoModifiers()`

### normalizeMetaState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int normalizeMetaState (int metaState)
```

Normalizes the specified meta state.


The meta state is normalized such that if either the left or right modifier meta state
bits are set then the result will also include the universal bit for that modifier.


If the specified meta state contains `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON` then
the result will also contain `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON` in addition to `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_LEFT_ON`
and the other bits that were specified in the input. The same is process is
performed for shift, control and meta.


If the specified meta state contains synthetic meta states defined by
`https://developer.android.com/reference/android/text/method/MetaKeyKeyListener`, then those states are translated here and the original
synthetic meta states are removed from the result.
`https://developer.android.com/reference/android/text/method/MetaKeyKeyListener#META_CAP_LOCKED` is translated to `https://developer.android.com/reference/android/view/KeyEvent#META_CAPS_LOCK_ON`.
`https://developer.android.com/reference/android/text/method/MetaKeyKeyListener#META_ALT_LOCKED` is translated to `https://developer.android.com/reference/android/view/KeyEvent#META_ALT_ON`.
`https://developer.android.com/reference/android/text/method/MetaKeyKeyListener#META_SYM_LOCKED` is translated to `https://developer.android.com/reference/android/view/KeyEvent#META_SYM_ON`.


Undefined meta state bits are removed.

<br />

<br />

| Parameters ||
|---|---|
| `metaState` | `int`: The meta state. <br /> |

| Returns ||
|---|---|
| `int` | The normalized meta state. <br /> |

### setSource

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setSource (int source)
```

<br />

<br />

| Parameters ||
|---|---|
| `source` | `int` <br /> |

### startTracking

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void startTracking ()
```

Call this during `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)` to have the system track
the key through its final up (possibly including a long press). Note
that only one key can be tracked at a time -- if another key down
event is received while a previous one is being tracked, tracking is
stopped on the previous event.

<br />

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel out, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `out` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |