| Summary: | SDL has no function to open a screen keyboard on Android. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Philipp Wiesemann <philipp.wiesemann> |
| Component: | *don't know* | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
| Attachments: |
patch for keyboard open and close on Android
patch for SDL screen keyboard API and an implementation for Android |
||
Unrelated to the rest of the patch, I'm wondering if we should avoid having SDL_AndroidKeyboardShow and SDL_iPhoneKeyboardShow...even "iPhone" is inaccurate, since it can be used on iPads and iPods now, too. Unify this? --ryan. Created attachment 922 [details]
patch for SDL screen keyboard API and an implementation for Android
I created a new patch which adds five new function to the general SDL API. These are the four known (with different names for consistency) and an additional one to check if screen keyboard support is available at all. Windows Phones and other devices may then implement how much they support.
The patch again contains an implementation for Android (now also with toggle) but the "iPhone" version is unchanged.
This patch looks good. I'll unify this with the iOS API later today. Thanks! I integrated your patch and switched over iOS to use that API. Thanks! :) http://hg.libsdl.org/SDL/rev/fa7eb111f994 |
Created attachment 919 [details] patch for keyboard open and close on Android Hello, there is currently no function to open a screen keyboard on Android. Attached is a patch which adds two functions similar to the ones for iPhone in SDL_system.h. They show or hide a keyboard whose input ends up as key events inside the SDL application. Opening and closing is asynchronous on Android which means that return values are not that useful (events would be more) and just tell if the request will be processed or not. On devices with hardware keyboards nothing might show up. Therefore in the Android emulator the "keyboard support" property needs to be disabled for testing. The patch also adds a call to open a keyboard in tests/checkkeys.c because the iPhone keyboard is also requested there.