Skip to content
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

String entry (hero renaming) does not work on recent Android updates #1069

Closed
ohrrpgce-bugbot opened this issue Apr 6, 2015 · 8 comments
Closed
Labels
bug Yeah... that's broken controls Keyboard, mouse and joystick/gamepad input/controls os: android Specific to Android

Comments

@ohrrpgce-bugbot
Copy link

[sf#2010]

I discovered yesterday that the string entry via virtual keyboard on Android does not work at all on Android 5.0.1

It worked okay on the version I first tested it on (which I think was 5.0.0)

The virtual keyboard opens up, but most of the buttons do nothing, and the few that have any effect produce ? characters. The virtual keyboard also frequently fails to close.

From: @bob-the-hamster
Reported version: Nightly WIP (Callipygous)
Operating system: Android

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

Apparently there are some issue with the onscreen keyboard in Android 5 (which don't look like what you reported), and they probably made some changes to the keyboard in 5.0.1, but there are as many people claiming that that made things worse as those that say it helped.
Eg https://code.google.com/p/android/issues/detail?id=80637

A couple months ago I was looking at the onscreen keyboard code in sdl-android. It's really an awful mess, confounded by the design of the Android keyboard API. I wouldn't be at all surprised that "The virtual keyboard also frequently fails to close." The sdl-android function to say whether the onscreen keyboard is visible is broken. For that reason gfx_sdl tries to remember what the state is itself rather than call that function, but I'm surprised that workaround works.

However, we've forked sdl-android, and there have been a lot of changes upstream. I looked especially at upstream changes to the onscreen keyboard, and say they did some significant cleaning up, and a crucial function was rewritten, so I'd guess at least the visibility state bug is fixed.

It would be good to merge the upstream changes (there are various improvements and new features), but it's going to be nontrivial, there are various conflicts and some stuff will have to be rewritten.

@ohrrpgce-bugbot
Copy link
Author

Comment author: @bob-the-hamster

A merge from upstream sounds good... but it also sounds painfully arduous.

For a quick-fix I am inclined to whip up a built-in touch (mouse) keyboard similar to the cheezy_virtual_keyboard() fix I did for OUYA.

That is a band-aid, but it is the fix I am most likely to do on my own :)

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

Merging all upstream changes would be a lot of work. However, it would hopefully be easy to just cherry-pick the commits that cleaned up the on-screen code, since we haven't made any changes to that. Of course I can't say that will actually improve anything.

@ohrrpgce-bugbot
Copy link
Author

Comment author: @bob-the-hamster

@ohrrpgce-bugbot
Copy link
Author

Comment author: @bob-the-hamster

I forgot to write here that I worked around this bug by implementing our own simple touch-screen virtual keyboard.

This is a good enough workaround that I am no longer worried about this bug as a stable-release-blocker

Also the new built-in touch keyboard is pleasant enough that I think even after this bug is fixed, I might want to make this an author-selectable game-specific option

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

I wouldn't count any Android-port bug as relevant to stable releases, because we don't officially have any way for people to package for Android. Whenever we get Chronoboy/Kevin's packaging tool ready we can release it with Callipygous+1

@ohrrpgce-bugbot ohrrpgce-bugbot added menus In-game menus, user-defineable or builtin. "editor UI" is for editor menus bug Yeah... that's broken os: android Specific to Android labels Mar 14, 2020
@rue9x
Copy link

rue9x commented Aug 23, 2020

Is this resolved then?

@bob-the-hamster
Copy link
Collaborator

Oh, yes. This is fixed. On Android, we abandoned using the OS text entry support, and instead use the in-engine virtual keyboard (the same one you see if you use the "input string with mouse keyboard")

(I tested this just last week while playing Vikings of Midgard on Android)

@rversteegen rversteegen added controls Keyboard, mouse and joystick/gamepad input/controls and removed menus In-game menus, user-defineable or builtin. "editor UI" is for editor menus labels Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Yeah... that's broken controls Keyboard, mouse and joystick/gamepad input/controls os: android Specific to Android
Projects
None yet
Development

No branches or pull requests

4 participants