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 - SDL does not provide scancodes for all keys available on Android.
Summary: SDL does not provide scancodes for all keys available on Android.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: Other Android (All)
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-28 10:03 UTC by Philipp Wiesemann
Modified: 2012-09-26 20:31 UTC (History)
1 user (show)

See Also:


Attachments
patch for SDL_androidkeyboard.c (5.92 KB, patch)
2012-07-28 10:05 UTC, Philipp Wiesemann
Details | Diff
patch for missing scancodes on Android (6.83 KB, patch)
2012-09-23 06:21 UTC, Philipp Wiesemann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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