Bring up Mobile Keyboard On Text Focus

Get help using Construct 2

Post » Tue Jun 03, 2014 11:17 pm

I'm working on a multi-player game and have in game chat that is working but the user experience isn't quite what i want. When The text box pops up I am able to focus on the box just fine but that doesn't seem to be enough to trigger the keyboard on the mobile device to show. I still have to wait for the user to touch the text box before the keyboard will pop up.

I have tried various methods including inserting some JavaScript to simulate clicking but that doesn't seem to be working. Does anyone have any suggestions or know of how to handle this.
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Wed Jun 04, 2014 6:27 am

Eventually I just created my own touch keyboard that popped up as I couldn't get the mobile keyboard to work and if it did, then it didn't work on multiple devices.

Two examples capx found in forums:
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Wed Jun 04, 2014 6:48 am

@DUTOIT Thank you for this.

I hadn't even considered creating my own... I think for now I'm just going to keep it as is and if the time it would take to create a nice looking key board becomes worth it, ill circle back.

I did how ever find hack that seems to work most of the time (at least on my galaxy s4) its not a 100% but its enough for now. I just added wait of 0.1 sec before triggering the focus event for the text box after I show it. Oddly enough if I set the time to short or too long it doesn't work but there appears to be a Goldilocks time frame that if focus is called at just the right time it seems to work. Go figure

Thank you again for taking the time to help
B
20
S
7
G
1
Posts: 221
Reputation: 2,077


Return to How do I....?

Who is online

Users browsing this forum: BadMario, istero, mr32D, mtnboy22 and 1 guest