Added new key codes from Android 4.4 (API 20) and 5.0 (API 21).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c
index 5008cfd..9ccda87 100644
--- a/src/video/android/SDL_androidkeyboard.c
+++ b/src/video/android/SDL_androidkeyboard.c
@@ -263,6 +263,43 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */
SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_AUDIO_TRACK */
+ SDL_SCANCODE_SLEEP, /* AKEYCODE_SLEEP */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WAKEUP */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_PAIRING */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_TOP_MENU */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_11 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_12 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_LAST_CHANNEL */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_DATA_SERVICE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOICE_ASSIST */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_RADIO_SERVICE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TELETEXT */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NUMBER_ENTRY */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_ANALOG */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TERRESTRIAL_DIGITAL */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_BS */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_CS */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_SATELLITE_SERVICE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_NETWORK */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ANTENNA_CABLE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_1 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_2 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_3 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_HDMI_4 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_1 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPOSITE_2 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_1 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_COMPONENT_2 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_INPUT_VGA_1 */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_ZOOM_MODE */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_CONTENTS_MENU */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_MEDIA_CONTEXT_MENU */
+ SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV_TIMER_PROGRAMMING */
+ SDL_SCANCODE_HELP, /* AKEYCODE_HELP */
};
static SDL_Scancode