cancel
Showing results for 
Search instead for 
Did you mean: 

System keyboard not opening every time in Meta quest 3 device

VishalFuturristic
Honored Guest

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.

 

16 REPLIES 16

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.io
Honored 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.

Anton111111
Expert Protege

hack from this topic stop workingfor me ;(

Anton111111
Expert 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 set 
m_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);
    }
}

 

Will check this out. Thanks for diving in and potentially making something better than my awful hack lol 🙂

etdeagle
Honored 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.

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.