Oculus Quest 2 Keyboard with XR RIg

My project is using an XR Rig and I want to use the Oculus Quest system keyboard. After a whole day of research I am able to display it in build (but not in the editor…). But when it appears the default oculus hands appear and my hand models are not tracked anymore… And when I close the keyboard a simple press on the Oculus button exits the application (without opening the “quit” menu). Is there a way to fix all these problems ?

Using XRI toolkit, TextMeshPro Input field and an AndroidManifest.xml containing
<uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>
should be all you require. And yeah this does not work in the editor ofcourse. Because it is a system keyboard of Oculus. Oculus Link is a streaming simulation. So the system keyboard is not available there.

Yeah, system keyboard and thus system input tracking. The Unity application goes in a paused state. I think you can use OnApplicationFocus, but I’m not sure. Haven’t tested it yet, but I am about to today since I’m busy with this as well.

The oculus button has always been for this, an exit app button. That is a system button. When you’re done typing on the keyboard you’re supposed to hit the blue enter button.

It’s the system keyboard. It can’t be customized.

The only real problem I am facing with the system keyboard is that when you dismiss it using its cancel button (keyboard with arrow down icon) or clicking outside the keyboard. Unity regains focus but the XR controllers aren’t tracking anymore until the app loses focus and regains focus again. Which means it isn’t properly resuming.

2 Likes

Yes I modified the manifest. And I call TouchScreenKeyboard.Open to display the keyboard. I know that when you play the game in the editor the headset is not seen as a Quest but as a rift. But when you read the Oculus docs they say that you should use a virtual keyboard instead of a physical one to prevent the player from having to remove his headset. If it applies to the Quest it should apply to the Rift too.
Anyways it’s not a big problem for me as I can use a home made keyboard in this case.

Yes, I know that the Oculus button is used to quit the app. But it should not quit immediately. it should display a message box asking the user if he really want to quit the app before.
And what bothers me is that this behavior happens after I closed the keyboard…

That’s another problem in my eyes. We should be able to choose if the type of keyboard (textual, numeric, email, URL…).
Or at least choose the position where it appears as it is a 3D object. But I can live with these limitations until Unity decide to improve that.

I use Unity 2021.1.24 and I don’t even need to call TouchScreenKeyboard. Just having a TextMeshPro Input Field is enough. The regular Unity Input Field does not work though.

The docs say many things. but yeah a virtual keyboard is fine. Either System Keyboard or a self made in-game keyboard suffices. If you want to support a hardware keyboard, that is up to you.

It only seems to happen when you close the keyboard using its own dismiss button or clicking outside of it. Unity does not get full focus back. XR Controllers are not moving anymore. If you then press the oculus button then yes, it will indeed close the app.
If you click on the blue checkmark button, Unity will resume normally and it will work as you expect it to. But that is definitely part of a bug.

If you need a customized keyboard, go with an in-game one and don’t rely on the system keyboard. That way you’re in full control over the keyboard.

Oculus controls the system keyboard, if anything they should open it up more and make it more accessible / customizable. Oculus should do a lot more with their XR plugin in my opinion. But they rather seem to stick with their Oculus Integration package which is bloated.

[off-topic rant]
There are many other things that I’ve already suggested on Unity’s roadmap platform, in their XRI github issues or even here on the forums. I also have countless of bug reports. All of it takes them really long to implement or fix. Which is very frustrating when you’re in a rapid development environment yourself. But all we can do is send bug reports, do forum posts and suggestions on the roadmap.

Well infortunately our game should work with any language. That’s the main reason why I want to use the system keyboard because I don’t want to spend several month coding a keyboard for each language. Including asian ones which need multi-key characters and an auto-correct like system to choose the right character.

I hoped Unity had already a multi-language keyboard but their mobile keyboard is only an american qwerty one…

I asked Oculus in one of their forums and got this answer:

1 Like

Could you provide a link to this forum thread?

The link doesn’t seem to be working for me. getting a “Oops looks like you’re lost” message

even just the first-access doesn’t seem to be accessible to me. Not sure what that is.
The regular forum is https://forums.oculusvr.com

Sorry I just realized it’s not a public forum. That’s probably because we had access to prototype devices at one point.

According to this forum rules I should not share its content publicly but I guess it’s not a confidential information.

Alright well, if they’re working on it then it’ll be fixed eventually I guess.
Let’s hope it doesn’t take them several months…

So I still have an issue. Everything seems to be working for the most part using either the “focus on an InputField” or “TouchScreenKeyboard.Open()” methods.

Though one thing that’s for some reason not working is that if you click the blue “done” button, the keyboard closes but “OVRManager.InputFocusAquired” is never fired, unless I manually go out of the app and back in.

It seems to be fixed now. At least with Unity 2021.3.1f1 and the latest Oculus Integration asset.

Yeah if you’re using TMPro Input Field the only thing you need to do is add the <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/> to the manifest.
You wouldn’t even need the Oculus Integration asset for that either. Personally I avoid using that package when possible because of all the Oculus specific references. It makes it more difficult to support other VR headsets.
So I just use the XR management and XR interaction package which can be configured to work with any VR headset.

The only issue left that I noticed was that the input field itself didn’t receive a call to deactivate upon dismissing the system keyboard. So when the application regains focus using OnApplicationFocus, I call EventSystem.SetSelectedGameObject(null);. If I don’t, I couldn’t select the input field again.

Hi, the issue related to the ugui InputField not showing up the system keyboard on a Quest build is fixed.

The fix is in the following Unity versions (or above): 2019.4, 2020.3, 2021.3 and 2022.1

No, it´s not!
i´m on 2020.3 using XRRig and just XrToolkit and it´s not showing keyboar… anoying

1 Like

And Bump, it is still not fixed. Nice!!!

I didn’t have any issues anymore using the latest 2022.2 and OculusXR.

Well yeah , I am not using OculusXR but the XR kit , the problem seems to be there.

XR Interaction Toolkit, XR Management with Oculus XR.
https://docs.unity3d.com/Packages/com.unity.xr.oculus@3.3/manual/index.html

Not Oculus Integration.