We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1559

Summary: SDL does not provide scancodes for all keys available on Android.
Product: SDL Reporter: Philipp Wiesemann <philipp.wiesemann>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2 CC: richard.m.tew
Version: HG 2.0   
Hardware: Other   
OS: Android (All)   
Attachments: patch for SDL_androidkeyboard.c
patch for missing scancodes on Android

Description Philipp Wiesemann 2012-07-28 10:03:47 UTC
Hello,

the current version of SDL 2.0 (HG) does not provide scancodes for all keys available on Android.

Missing are all new keys added since Android API level 11.

Also it would be possible to map SDL_SCANCODE_WWW, SDL_SCANCODE_MAIL and SDL_SCANCODE_SLASH.

Android's KEYCODE_DEL is mapped to SDL_SCANCODE_DELETE but according to Android's documentation [1] it should be like SDL_SCANCODE_BACKSPACE.

I attached a patch with these corrections.

[1] http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DEL
Comment 1 Philipp Wiesemann 2012-07-28 10:05:06 UTC
Created attachment 916 [details]
patch for SDL_androidkeyboard.c
Comment 2 Philipp Wiesemann 2012-09-23 06:21:07 UTC
Created attachment 956 [details]
patch for missing scancodes on Android

I attached a new version of the patch because the old was not in hg diff format.
Comment 3 Sam Lantinga 2012-09-26 20:31:12 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/09b96f7ebe80
Comment 4 Sam Lantinga 2012-09-26 20:31:15 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/09b96f7ebe80