This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 1614 - SDL for Android does not implement TextInput API
Andrey Isakov 2012-10-03 08:30:25 PDT I've found out in the process of porting one OS project to Android/SDL2 that there is no support for TextInput events/APIs on Android. So I implemented some kind of initial support of that feature, and at the very least it seems to work fine with latin chars input with soft and hardware keyboards on my Moto Milestone2. I've also tried playing around with more complex IMEs, like japanese, logging the process and it seemed to work too. I'm not sure since the app itself I am working on does not have support for non-latin input. The main point of the patch is to place a fake input view in the region specified by SDL_SetTextInputRect and create a custom InputConnection for it. The reason to make it a separate view is to support Android's pan&scan on input feature properly. For details please refer to http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html Even though the manual states that SetTextInputRect is used to determine the IME variants position, I thought this would be a proper use for this too.
- Loading branch information
Showing
7 changed files
with
274 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.