Develop
Develop
Select your platform

Getting Started with Virtual Keyboard

Updated: Dec 19, 2024
Virtual Keyboard Deprecation
Virtual Keyboard as a feature is being deprecated in favor of the system keyboard overlay in Unity.
Please see System Keyboard Overlay for instructions on enabling the system keyboard as an overlay in Unity.

Before You Begin

To work with Virtual Keyboard, you need the following:
  • A Meta Quest headset with the v54 or a later version of the Quest operating system.
  • Unity Editor 2022.3.15f1 or later (6.1 or later recommended)
  • V54 or a later version of the Meta XR Core SDK, which is available individually or as part of the Meta XR All-in-One SDK. These are the packages com.meta.xr.sdk.core and optionally com.meta.xr.sdk.core.all.
    • Virtual Keyboard has files in:
      • Oculus\VR\Prefabs*
      • Oculus\VR\Scripts*
      • Oculus\VR\Scenes*
      • And requires OVRPlugin
Check your Meta Horizon OS and Meta XR SDK versions:
  1. Using the headset, go to Settings > System > Software Update.
  2. Check the version.
  3. If the version is not v54 or higher, update the software to the latest available version.
To use hands with the keyboard, enable Hand Tracking on your device.
Virtual Keyboard supports Unity editor on Windows when using Meta Quest headset and Link. This functionality is supported only in the Unity editor to help improve iteration time for Meta Quest developers.

Enable OpenXR for the project

To set up a new project, follow these required settings to ensure the app builds correctly:
Note
Skip these steps if you’re working on an existing project that was once built using the Meta XR Core SDK or has been already submitted to the Meta Horizon Store.

  1. Ensure that the OVR Plugin is up-to-date by navigating to Meta > Tools > OVR Utilities Plugin and selecting Manual Update OVR Plugin.
  2. Go to Meta > Tools > OVR Utilities Plugin > Set OVRPlugin to OpenXR, and set the project to use the OpenXR backend.
  3. Set the target platform to Android
  4. Set the Android minimum API and target API levels
  5. Enable virtual reality support
  6. Apply the configuration settings
  7. Apply the rendering settings

Setup for using Virtual Keyboard

  1. Create a new scene with an OVRCameraRig prefab, open an existing scene that already has one, or open the VirtualKeyboard.unity sample scene.
  2. In the Hierarchy, select OVRCameraRig.
  3. In the Inspector, go to OVR Manager > Quest Features > General and from the Hand Tracking Support list, select Controllers and Hands.
  4. Set Render Model Support to Enabled.
  5. Uncheck Requires System Keyboard. If you still want to use it with Virtual Keyboard, see the Virtual Keyboard FAQ.
    Note
    If enabled, the System Keyboard (Keyboard Overlay) requires a focus switch from your application to the System Keyboard's overlay when in use. If System Keyboard is enabled, the application must also enable focus awareness. The Virtual Keyboard, what you're setting up in this document, avoids that focus change requirement by rendering the keyboard directly in your application.
  6. Set Virtual Keyboard Support to either Required or Supported.
    'Hand Tracking Support,' 'Render Model Support,' 'Requires System Keyboard,' 'Tracked Keyboard Support' and 'Virtual Keyboard Support' options in the Quest Features settings
  7. On the Meta menu, go to Tools > Update AndroidManifest.xml.
You have now set up your project to use Virtual Keyboard.
Did you find this page helpful?