Enable Keyboard Overlay in Unity

While Oculus Quest supports bluetooth keyboard, it’s valuable for an immersive app to let users interact with a system keyboard by keeping them engaged in the experience, without context switching away from the app. The keyboard overlay feature lets you display the system keyboard as an overlay on an app to facilitate text entry, which reduces the need for you to develop your own custom-built keyboard experience. It offers the same set of capabilities such as voice dictation, smartphone input, and multiple language support.


  • Use Oculus Integration package v19.1, or higher

    Note: If you’ve recently upgraded to Oculus Integration v19.1 package, restart your Oculus device to use the keyboard overlay functionality.

Enable System Keyboard

When you set up the system keyboard to appear as an overlay, it automatically appears when an editable UI text element receives the input focus. When the app displays the keyboard, it loses the input focus, triggering the OVRManager.InputFocusLost event. When the app closes the keyboard, it gains the input focus, triggering the OVRManager.InputFocusAcquired event.

There are two ways you can enable the system keyboard: using the project setting from Unity or invoking the system keyboard programmatically.

Enable system keyboard from Unity

OVRManager surfaces the keyboard overlay project setting to easily display the system keyboard as an overlay on your app.

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

Enable system keyboard programmatically

To show the system keyboard programmatically, leverage the Unity’s TouchScreenKeyboard interface.

  1. Enable focus awareness.
  2. Declare a variable to store the TouchScreenKeyboard instance and a variable to hold the string the keyboard returns.

    private TouchScreenKeyboard overlayKeyboard;
    public static string inputText = "";
  3. When a text UI element receives focus requesting keyboard input, call the TouchScreenKeyboard.Open() method to invoke the keyboard. Doing so takes input focus away from the app, triggering the OVRManager.InputFocusLost event. The keyboard overlay features supports the default keyboard type only.

    overlayKeyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
  4. To retrieve the typed contents, call the TouchScreenKeyboard.text property to return the text displayed in the input field of the keyboard and store it in the variable to use it elsewhere.

    if (overlayKeyboard != null)
     inputText = overlayKeyboard.text;

Preview Keyboard Overlay

To test or preview the keyboard overlay feature, do the following:

  1. Open the app in which you’ve implemented the keyboard overlay feature.
  2. Point the cursor in the editable UI text element.

    You can see the system keyboard overlay on the app.