control over virtual keyboard - mobile keyboard

Get help using Construct 2

Post » Fri Jul 22, 2016 2:04 pm

Hey everyone.... got an issue im dealing with an was wondering if anyone had any insight.

i have a spelling game that uses the c2 text box (under form controls) for my input and im having a couple of issues

the game is fairly simple, you hear audio for a word...you spell it.... you get it wrong you have to spell till its right, you get it right and you move on to the next word (plays audio, you spell, repeat)

here is the main issue:
#1 on ios the keyboard is not popping up automatically when the game starts ( it is on android)

i can verify that my focus is working... however i need to keep touching the screen to get the keyboard to pop up (i can touch anywhere since the text box is in focus)

is there any way to use code to trigger / simulate the touch that the device is looking for ?
this seems similar to needing to touch the screen to hear audio on ios devices .

maybe some code to activate the keyboard?

thanks for the help!

-Rik

@ashley
Last edited by Rik Marshall on Tue Jul 26, 2016 5:40 pm, edited 1 time in total.
B
9
S
2
G
1
Posts: 17
Reputation: 669

Post » Fri Jul 22, 2016 10:15 pm

Hello Rik Marshall,

in javascript (for HTML5 games) I think it is not possible. The enter-'event' is a function of the keyboard-program not a browser-function. But this cordova-PlugIn looks like your searched solution:
https://www.npmjs.com/package/cordova-plugin-keyboard

a work around would be to use textarea-tags ... with a replace of 'newlines'

Or better: Your own virtual keyboard created with sprites :D
B
5
S
1
Posts: 24
Reputation: 423


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, TELLES0808, Yahoo [Bot] and 4 guests