4

I am currently developing a small app for oculus quest 2, using Unity. I've created a canvas, in which I've added a button and an InputField. By using the XR Interaction Toolkit, I am able to click on the button or the InputField with both of my controllers. However, it's still impossible to type anything into the InputField because when I click on it, any keyboard opens.

I've downloaded and explored the example project from git (https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples) but I'm not using unity for a long time, so it looks impossible to find the settings (or script or anything else) that make it works.

Does anyone knows what should I do to open the keyboard when the InputField is clicked ? Also, will the text that I enter display in real time in the InputField ?

Thanks ! :)

EDIT : Apparently, it's not possible for the moment to use the oculus default keyboard, since the XRIT is not officially released.

VassiliKan
  • 51
  • 1
  • 7
  • I have a bug and can't edit my post (which doesn't save my first sentence) so : Hello everybody ! – VassiliKan Apr 13 '21 at 18:44
  • I have not used VR, but maybe look into [this](https://docs.unity3d.com/ScriptReference/TouchScreenKeyboard.Open.html). From what I could tell, most others build their own keyboard UI then when the InputField is open and selected they bring up their UI, then input the data directly in code. – TEEBQNE Apr 14 '21 at 01:15
  • 1
    @TEEBQNE That's what I did, thanks ;) – VassiliKan Apr 19 '21 at 13:58

2 Answers2

1

You can enable the system keyboard by configuring OVRCameraRig Oculus features.

  1. From the Hierarchy view, select OVRCameraRig to open settings in the Inspector view.
  2. Under OVR Manager, in the Quest Features section, select Require System Keyboard.

enter image description here

enter image description here

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

Codemaker2015
  • 12,190
  • 6
  • 97
  • 81
0

What @Codemaker answered here is for Oculus Integration. For XR Interaction Toolkit, you can manually enable a keyboard instance, by doing the following.

private TouchScreenKeyboard keyboard;

public void ShowKeyboard()
{
   keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
}

Just add this Showkeyboard() under the Inputfield's On Select () event. And you are done.

You can find the source here. I tried it and it works for me.

Vikneshtk
  • 13
  • 4