Forum Discussion
Pascal-Teooh
4 years agoExplorer
Issues with the Keyboard overlay
We're using the Keyboard overlay with Unity 2020.3.14 / Oculus XR Plugin 1.10.0pre2 / XR Plugin 4.0.7. We have two related issues: When pressing the keyboard close button (bottom-right) the key...
- 4 years ago
Ok, so after a lot more digging, the keyboard close button bug is an issue with Unity's TouchScreenKeyboard implementation.
The status property of this doesn't change when pressing the keyboard close button. You'd expect this to change to Canceled or LostFocus or even Done, but it just doesn't change from Visible.
Both the Unity UI & TMP Input field code rely on this property and so explains why they both fail / do nothing in the same way.
The Java code for Unity's TouchScreenKeyboard native implementation for Android isn't easily available / readable / replaceable but luckily I had already developed our own replacement for this in our standard Android app. For some reason I thought this wouldn't work on Quest, but the Quest keyboard is actually a standard Input Method Editor so works with my implementation too 🙂
To be fair to Unity, detecting the Android keyboard closing is not as simple as it sounds, but after lots of failed attempts, I've got a working solution by polling InputMethodManager.isActive passing in the EditText field as the view.
Anonymous
4 years agoInteresting... 😓
This is literally the first time I've heard of someone using multiline input in VR. This is a puzzler. Wish I could help more.
I think you're going to have to dig through the TMP_InputField code. Look for TouchScreenKeyboard.Open (which passes in a multiLine bool) and TouchScreenKeyboard.Status.Done, which I think is where the keyboard has closed and should return focus to Unity.
I think you're right that Unity/TextMeshPro is expecting a multiline input keyboard to have a "return" button and to go through a different close procedure, and either Unity or the system keyboard isn't handling that properly.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 1 year ago
- 20 days ago
- 2 years ago