Test the behaviour of quite any key on your Android device.
KeyTester on Android 10
Some buttons such as Home, Recent Apps (Multitasking) and Power won't be detected because the system needs them to be always available and working (e.g., when an app freezes and the user wants to terminate it), so it won't let any app intercept them (at least without some special privileges).
Each time your press a button, it will be registered and displayed in a list that you can save and share easily.
The core of the app is the method Activity.dispatchKeyEvent, from it we get a KeyEvent and then a KeyCode from one of these constants.
Note that the app will output only a numeric constant when run on APIs prior to version 12 (Android 3.1 Honeycomb), because the method keyCodeToString was implemented in that API version.
All the constants work with:
- Activity.dispatchKeyEvent
- Activity.dispatchKeyShortcutEvent
- Activity.onKeyDown
- Activity.onKeyLongPress
- Activity.onKeyMultiple
- Activity.onKeyShortcut
- Activity.onKeyUp
- any other method that deals with KeyEvents



