-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keyboard input type customization for SDL2 #2057
Conversation
This is the continuation of kivy/kivy#6716. With these changes, applications using SDL2 as window provider will be able to change the keyboard input type. This is achieved replacing the default value of outAttrs.inputType on SDLActivity.java for keyboardInputType. PythonActivity.java now has changeKeyboard, a function that basically allows the switching of the input type, modifying keyboardInputType to a given value. This function is called in Kivy through the android module.
Does it fix #796? |
Which version contains the fix ? |
@chavarinbonbyn None yet. It's a work in progress (for more details, see kivy/kivy#6716). |
Thanks, this change seems good, but I'm wary about changing our SDLActivity code because I thought we were nowadays pulling this straight from the SDL project without changes. If we want to modify it, it would be ideal to do so only via the PythonActivity subclass. Does anyone else have any thoughts about it? |
I didn't realise that, then it's a very valid point. |
It should be pretty straightforward, but I'm not sure what is the "correct" way to do it. That might only be because I haven't looked at it much for a while - I actually thought we were dynamically extracting the SDL2 deps in their entiretly. |
The #1779 pr removes SDL files from p4a source, but that pr has not not been merged yet |
Thanks @Fak3, I really am behind! |
I know it is somehow a breaking change because I modified SDLActivity.
Do you guys have any suggestion on how to achieve this? By the way, if you merge this pull request as it is, you'll find some bugs when using it with Kivy. It's described in kivy/kivy#6716 and #2015. The numeric keyboard is working as expected, but any TYPE_CLASS_TEXT keyboard without a PASSWORD variation isn't. In summary, the bugs are:
|
Hello! I wanted to try a different approach, but I realized the |
@franccisco What about changing the changeKeyboard in PythonActivity to modify mTextEdit directly instead of it doing a resetInput on it? In theory, this could work if the changes take effect without needing to do a resetInput on the mTextEdit |
#2405 can close this? |
Definitely, thanks for the heads up |
This is the continuation of kivy/kivy#6716. With these changes,
applications using SDL2 as window provider will be able to change the
keyboard input type. This is achieved replacing the default value of
outAttrs.inputType on SDLActivity.java for keyboardInputType.
PythonActivity.java now has changeKeyboard, a function that basically
allows the switching of the input type, modifying keyboardInputType to a
given value. This function is called in Kivy through the android module.
Closes #2015, Fixes #796