Skip to main content
Participant
April 5, 2024
Solved

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.

 

    This topic has been closed for replies.
    jtriveri
    jtriveriAnswer
    Honored Contributor
    April 8, 2024

    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 workaround

     

     

     

    using 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

    Participant
    April 5, 2024

    Can any one pls help me here !

    New Participant
    April 5, 2024

    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.

    Participant
    April 5, 2024

    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 ?

    jtriveri
    jtriveriAnswer
    Honored Contributor
    April 8, 2024

    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 workaround

     

     

     

    using 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);
    		}
    	}
    }

     

     

     

    Anton111111
    Inspiring
    April 8, 2024

    i've tried same solution in my project and it doesn't fix issue. It sometimes works and sometimes doesn't 

    Anton111111
    Inspiring
    April 8, 2024

    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. 

    jtriveri
    Honored Contributor
    April 9, 2024

    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);

     

    Anton111111
    Inspiring
    April 10, 2024

    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.

    New Participant
    April 13, 2024

     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
    Inspiring
    May 14, 2024

    hack from this topic stop workingfor me ;(

    Anton111111
    Inspiring
    May 31, 2024

    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);
        }
    }

     

    jtriveri
    Honored Contributor
    May 31, 2024

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

    New Participant
    August 16, 2024

    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.