Search Unity

Question Oculus Quest InputField (Keyboard Overlay)

Discussion in 'XR Interaction Toolkit and Input' started by R1PFake, Mar 21, 2021.

  1. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    540
    The Oculus package has a feature to enable a keyboard overlay for UI InputFields (the app has enable "Focus Awarnes")

    See: https://developer.oculus.com/documentation/unity/unity-keyboard-overlay/

    Is there any way to enable (any) keyboard overlay for the Oculus Quest without using the Oculus Package? Im using the Interaction Toolkit and don't want to import the Oculus package just to enable a keyboard checkbox.
     
  2. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    Hi,

    It is possible to enable focus awarenes and the native oculus keyboard by simply using the following Android manifest: https://github.com/Unity-Technologi...VR/Assets/Plugins/Android/AndroidManifest.xml

    As you can see, this is an example manifest with the keyboard enabled and is part of the XR Interaction Toolkit examples repository.

    Be aware that if you aim to publish on the oculus store, you will need to modify the manifest.
     
  3. VassiliKan

    VassiliKan

    Joined:
    Apr 6, 2021
    Posts:
    2

    Hi Gustavo-Quiroz !

    First, thank you for giving this solution, which helps me a lot and that I didn't find anywhere else on internet !

    I would like to ask you if you know how to keep the focus on the InputField while using the oculus keyboard (in my case, if I start using it, the InputField doesn't display the text I type in the keyboard).
    Please note that it totally works on the example project from github.

    Thanks in advance :)

    Vassili.
     
  4. edmondkeroro

    edmondkeroro

    Joined:
    Mar 21, 2020
    Posts:
    4
    You could change to the older branch to see the manifest

    upload_2023-10-10_17-0-35.png

    <?xml version="1.0" encoding="utf-8"?>
    <manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    android:theme="@StyLe/UnityThemeSelector">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    </application>
    <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>
    </manifest>