XRI Virtual Keyboard not showing up

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

_field.onSelect.AddListener(x =>
{
     _keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
});

How am i supposed to display a virtual keyboard to edit my inputfields in VR ? :confused:

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 Unity - Manual: Override the Android App Manifest)

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.

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.

How to open AndroidManifest.xml on Unity?

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.

You just made me feel wayyy less crazy. Thanks for describing the problem and giving the solution!!

Just a heads up, we recently added a Spatial Keyboard sample to XRI 3.x that works with OpenXR, so you aren’t tied into using an OS level keyboard or forced to manually update the manifest. I’ve found the XRI Spatial Keyboard works really nicely as it’s on the application level and not the OS level.
https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/manual/samples-spatial-keyboard.html

Just installed the Spatial Keyboard sample of the XRI 3.0.5 package, I got bunch of compile errors :

Assets\Samples\XR Interaction Toolkit\3.0.5\Spatial Keyboard\Editor\Scripts\KeyMappingPropertyDrawer.cs(3,42): error CS0234: The type or namespace name ‘Samples’ does not exist in the namespace ‘UnityEngine.XR.Interaction.Toolkit’ (are you missing an assembly reference?)
Assets\Samples\XR Interaction Toolkit\3.0.5\Spatial Keyboard\Editor\Scripts\XRKeyboardConfigEditor.cs(3,42): error CS0234: The type or namespace name ‘Samples’ does not exist in the namespace ‘UnityEngine.XR.Interaction.Toolkit’ (are you missing an assembly reference?)
Assets\Samples\XR Interaction Toolkit\3.0.5\Spatial Keyboard\Editor\Scripts\XRKeyboardDisplayEditor.cs(3,42): error CS0234: The type or namespace name ‘Samples’ does not exist in the namespace ‘UnityEngine.XR.Interaction.Toolkit’ (are you missing an assembly reference?)

There is ten errors like these ones.
Any idea ?

Try rebuilding your library.

Already tried that before posting, I confirm that installing the SpatialKeybord sample of the 3.0.5 version of the package is instantly throwing errors, even on fresh new project.
v3.0.3 works correctly tho

What happens if you delete the samples and reimport them fresh?