Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question XRI Virtual Keyboard not showing up

Discussion in 'XR Interaction Toolkit and Input' started by Deathtreak, Mar 3, 2023.

  1. Deathtreak

    Deathtreak

    Joined:
    Nov 19, 2017
    Posts:
    17
    Hi,

    I'm developing an app for MetaQuest2 and using OpenXR + XR Interaction Toolkit
    I'm struggling with the virtual keyboard as it never seem to show up when i interact with an TMPro InputField
    I also tried to bind the open keyboard method by script but no success


    Code (CSharp):
    1.  
    2. _field.onSelect.AddListener(x =>
    3. {
    4.      _keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
    5. });
    6.  
    How am i supposed to display a virtual keyboard to edit my inputfields in VR ? :/
     
    hanae likes this.
  2. hanae

    hanae

    Joined:
    Oct 17, 2013
    Posts:
    1
    I found a solution on Quest but don't know if it's working on other headsets.

    I enbaled a custom Android Manifest from the Player Settings (see https://docs.unity3d.com/Manual/overriding-android-manifest.html)

    Then I addded the following line in the AndroidManifest.xml file after the application tag.


    <uses-feature android:name="oculus.software.overlay_keyboard" android:required="true" />


    Hope this helps.
     
    Deathtreak likes this.
  3. wechat_os_Qy05_iVVL-vcOMC9hd6ZW_4f0

    wechat_os_Qy05_iVVL-vcOMC9hd6ZW_4f0

    Joined:
    Jul 11, 2022
    Posts:
    1
    wo
    When I implement it this way, it is able to start up properly. But after launching the application, evoking the keyboard causes the program to shake and wobble along with the headset.
     
    Ivenzz likes this.
  4. KarthikKP23

    KarthikKP23

    Joined:
    Aug 23, 2023
    Posts:
    1
    How to open AndroidManifest.xml on Unity?
     
  5. BlueSpirit

    BlueSpirit

    Joined:
    Jun 10, 2013
    Posts:
    33
    I had the same issue with an older project using the XR Interaction Toolkit for the Oculus Quest. The keyboard wouldn't show up or only after pressing the InputField for 3-4 times. For some reason the InputField deselects immediately after pressing it, so the keyboard wouldn't show up. I couldn't find a solution, so my workaround was to put a transparent Button on top of the InputField, and call InputField.Select() on buttonclick.