- Home /
How to control keyboard via GUI button.
Hello everyone.
I'm developing a project for touch screen device. And it has many GUI text field, so I need to make On screen keyboard. Like if I were to press "w" GUI button, then it will show "w" on focused text field like when I pressed "w" button on my keyboard. But I don't know how to control my keyboard to press any button via scripting.
If you have any better choice plz explain to me.
I'm not very good in english sorry if I make you confused. : (
Thank you.
Answer by stevethorne · Mar 11, 2014 at 01:09 PM
If you know which button is being pressed, then you can insert the characters into the text fields yourself. Just add the character to the end of the string in the text field. The other buttons might be more difficult, but I don't believe there is a way to tell the keyboard to do an input.
Thx for answer :D
I'm doing the same way, now problem is I have multiple text fields on the scene and I don't know how to define which text field is focused. so I can't choose string I to add character to.
Your answer
![](https://koobas.hobune.stream/wayback/20220613135950im_/https://answers.unity.com/themes/thub/images/avi.jpg)