Forum Discussion
VishalFuturristic
2 years agoExplorer
System keyboard not opening every time in Meta quest 3 device
Hello, I want to use system keyboard to type in unity text mesh pro input field. when i clicked in input field some time it open native keyboard and sometime not (I am using meta quest 3). Is it know bug to meta quest 3 ? In Oculus quest 2 it working fine. I have enabled required system keyboard and set target device to Quest 3 also in OVRManager script.
I have also checked my AndroidManifest file and found there is entry of
<uses-feature android:name="oculus.software.overlay_keyboard" android:required="false" />
My Unity ver is 2022.3.19f1.
So what is the problem? Its very frustrating to continue click on input field then some times it only.
I'm running into this issue too. I haven't found a proper solution in the several days I've spent trying to fix it.
This is my jank fix - attach this script to all your text fields (I use TMP input fields). It reopens the keyboard if it doesn't appear properly. Please don't mark this as the solution though as this is a horrible workaroundusing System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using TMPro; using UnityEngine; public class OculusSystemKeyboardJankFix : MonoBehaviour { private TMP_InputField field; private void Awake() { field = GetComponent<TMP_InputField>(); field.onSelect.AddListener(s => ShowKeyboardDelay()); } private async void ShowKeyboardDelay() { await Task.Delay(500); if (!TouchScreenKeyboard.visible) { field.ActivateInputField(); TouchScreenKeyboard.Open(field.text, TouchScreenKeyboardType.ASCIICapable); } } }
16 Replies
Replies have been turned off for this discussion
- VishalFuturristicExplorer
Can any one pls help me here !
- eli.788101Explorer
I think it could be related to device settings or configurations. you should make sure that your Unity project is properly configured for the Meta Quest 3 and include any necessary plugins or SDK updates.
- VishalFuturristicExplorer
Hello, thanks for your reply. I have checked all the necessary setting for meta quest 3. Point is that when i clicked multiple times inside input field system keyboard open sometimes on quest 3. But on quest 2 by one click keyboard opens. Is there unity ver problem may be for quest 3 ?
- jtriveriStart Partner
I'm running into this issue too. I haven't found a proper solution in the several days I've spent trying to fix it.
This is my jank fix - attach this script to all your text fields (I use TMP input fields). It reopens the keyboard if it doesn't appear properly. Please don't mark this as the solution though as this is a horrible workaroundusing System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using TMPro; using UnityEngine; public class OculusSystemKeyboardJankFix : MonoBehaviour { private TMP_InputField field; private void Awake() { field = GetComponent<TMP_InputField>(); field.onSelect.AddListener(s => ShowKeyboardDelay()); } private async void ShowKeyboardDelay() { await Task.Delay(500); if (!TouchScreenKeyboard.visible) { field.ActivateInputField(); TouchScreenKeyboard.Open(field.text, TouchScreenKeyboardType.ASCIICapable); } } }- Anton111111Expert Protege
i've tried same solution in my project and it doesn't fix issue. It sometimes works and sometimes doesn't
- VishalFuturristicExplorer
Thanks jtriveri. It worked.
- Anton111111Expert Protege
jtriveri, Do you have idea why with your solution if field reopened after delay it has "normal" background instead of "selected"?
- Anton111111Expert Protege
Oh i have same issue in Quest2 (don't test on Q3). It can doesn't show at all or can show but don't change input when typing and some times it works good.
- jtriveriStart Partner
Are you talking about the appearance of the text field? You might be able to select the text field in the same lines where I open the keyboard.
EventSystem.current.SetSelectedGameObject(field.gameObject);- Anton111111Expert Protege
It doesn't work.
Also i've tested this hack. And i noticecd that it doesn't work every times. Sometimes i seen System keyboard but it was not linked with field and entered text didn't change text in field.
But anyway with this fix input works much better.
- xrworkout.ioHonored Guest
I don't have a solution yet but I think I figured out our problem.
When you click on the input field too long it immediately loses focus after the system keyboard pops up.
So long pressing should reliably produce that problem. - Anton111111Expert Protege
hack from this topic stop workingfor me ;(
- Anton111111Expert Protege
jtriveri , VishalFuturristic , looks like i found better solution than this hack.
The first thanks xrworkout.io for idea about cause of issue. I debuged TMP_InputField
and i see that lifecycle the following: OnPointerDown call OnSelect if field is not focused. And
OnSelect call ActivateInputField. After that start keyboard showing. During this process if you click not fast called OnPointerClick that call also ActivateInputField. I think collision in this placec because we can setm_ShouldActivateNextUpdate twice (the first from OnPointerDown and after that from OnPointerClick).At the same time, OnPointerDown can be called a bunch of times with a long press.As far as I can see, OnPointerDown is generally needed to highlight text using dragging and it is completely unnecessary in VR because when the keyboard is shown, the application is no longer in focus.And in result i made custom implementation of TMP_InputField. How you see i just disabled OnPointerDown at all and call OnSelect from OnPointerClick. OnPointer click best place for it because it always call once regardless of the duration of the press and the number of calls OnPinterDown.With this solution i don't see any issue with keyboard. But need test more time. If somebody test it too and leave feedback will be very cool.using TMPro; using UnityEngine.EventSystems; public class TMPInputFieldVR : TMP_InputField { public override void OnPointerDown(PointerEventData eventData) { // Do nothing because it doesn't need for VR } public override void OnPointerClick(PointerEventData eventData) { // Call On Select when OnPointerClick fired instead of OnPointerDown OnSelect(eventData); } }- jtriveriStart Partner
Will check this out. Thanks for diving in and potentially making something better than my awful hack lol 🙂
- etdeagleHonored Guest
Thanks a lot. This fixed the issue for me with latest SDK and unity 2023. I agree with your assessment the issue is long clicks stealing away the focus.
- etdeagleHonored Guest
I ran into a similar issue, for me the issue is that when i click on the input field if i do a click that is too long it focuses back on the input field and closes the keyboard so it looks like the keyboard was never opened. I will probably use your hack.
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
- 2 years ago
- 5 years ago