Android / Amazon Fire "keyboard_string" refreshes every step

zzzzza1

Member
Hi everyone!

I downloaded the new version of GMS2 (version 2.1.5.322) and I had a problem with variable "keyboard_string". When I compile for Windows, everything works well. But when I compile for android, the variable "keyboard_string" is reset to zero (empty string, i.e. "") every step. Before the update everything worked well.

I think this is somehow related to the new functions of the virtual keyboard. ("keyboard_virtual_...").

How to solve this issue?

Thank you in advance!
 

gnysek

Member
How you were setting keyboard_string in previous versions on android, where it wasn't supported on android, because there were no keyboard functions? You were assigning to it manually? Then now just use own variable, cause for sure it's reset every step, as when virtual keyboard is hidden nothing can be entered into that string.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Could you possibly post a link to a test YYZ that shows the issue? Afaik, it shouldn't be getting reset every step, but without seeing what you're doing it's difficult to say whether it's something you're doing or a bug. In my own tests it all works as it should, so I'd be interested to see what you're doing...
 
Last edited:
How you were setting keyboard_string in previous versions on android, where it wasn't supported on android, because there were no keyboard functions? You were assigning to it manually? Then now just use own variable, cause for sure it's reset every step, as when virtual keyboard is hidden nothing can be entered into that string.
This is exactly the problem I am having, I wasn't sure what was causing it, but now I noticed that it was the new updated refreshing the keyboardstring

Could you possibly post a link to a test YYZ that shows the issue? Afaik, it shouldn't be getting reset every step, but without seeing what you're doing it's difficult to say whether it's something you're doing or a bug. In my own tests it all works as it should, so I'd be interested to see what you're doing...
I have the exact same issue, I have been trying to compile a project with the new runtime and I am notiving that the keyboardstring also get reset every step. I have not done any changes to my game whats o ever and compiled it the way it is with this new update so I can confirm it's a bug
 
Last edited by a moderator:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Okay, so, there is indeed a bug with the keyboard_string being cleared and a coming update will address this. It also appears that the return is not being processed quite right on some Android devices, and so is giving issues. We'll look into how we deal with this consistently across all devices and platforms, but for now I beleive that checking the keyboard_lastchar will work (on all platforms), like this:

Code:
if keyboard_lastchar == chr(10)
{
//do something
}
Please let me know if this works for you.
 

Dan

YoYo Games Staff
YYG Staff
I've just dealt with a ticket linking to this post, so thought I would come give the same info here.

The change for https://bugs.yoyogames.com/view.php?id=27584 has been made for 2.2.1, not today's 2.2.0, but has seemingly sorted the Android issue also and so the sample on the ticket we were sent now works fine in our internal versions.
 

FredFredrickson

Member
GMC Elder
Thanks for the updates, guys!

Okay, so, there is indeed a bug with the keyboard_string being cleared and a coming update will address this. It also appears that the return is not being processed quite right on some Android devices, and so is giving issues. We'll look into how we deal with this consistently across all devices and platforms, but for now I beleive that checking the keyboard_lastchar will work (on all platforms), like this:

Code:
if keyboard_lastchar == chr(10)
{
//do something
}
Please let me know if this works for you.
Seems to work for me on my Galaxy Tab S2. Will let you know if I notice it not working elsewhere, though.
 
Top