Detect Return key from mobile virtual keyboard?

I have a high score table and on the PC it works fine, if you get a high enough score you get to type your name in. When you press Return the name is taken, the table flashes a few colours and a sound is played. Very nice.

On Android I pop open a mobile keyboard to collect your name:

This works fine, I get to type the name no trouble. Now on the virtual keyboard there is no Return button, but there is a button in the bottom-right marked ‘Go’. I press that, the virtual keyboard disappears but my ‘Return key is pressed’ action is not triggered:

image

At this point, the game is still expecting text to be entered but the virtual keyboard has disappeared and there’s nothing you can do.

Have I done something wrong? How do I correctly detect that the Return key has been pressed on a mobile virtual keyboard?

Add a visual button instead of using the Return key, perhaps :thinking:

Yes that’ll work, in fact in the end what I’ve done is just detect a click on the high score table itself and when I receive one I stop taking text input.

Interestingly none of the keystroke detection seems to be working with the mobile virtual keyboard, I play a sound effect for each keystroke (‘Any key is pressed’) and this works fine on the PC but typing is completely mute on the mobile.

I made this extension for mobile virtual keyboard.
Unfortunately it uses a lot of workarounds that don’t work on some devices.

One solution would be to make your own keyboard in GDevelop with sprites for keys, and add related events.
Because maintaining the keyboard extension is just impossible.