API reference
API reference
Select your platform
No SDKs available
No versions available

OVRVirtualKeyboard Class

Extends MonoBehaviour
Enables Virtual Keyboard integration.

Member Enumerations

Enumeration KeyboardPosition

The initial position of the keyboard, which determines the input style used to type.
Far uses raycasting to type. Near uses direct touch to type. If set to Far or Near, the keyboard position is runtime controlled, so the Transform component will be locked.
Far
= 0
Near
= 1
Direct
= 1
Custom
= 2

Enumeration InputSource

ControllerLeft
No description available
ControllerRight
No description available
HandLeft
No description available
HandRight
No description available

Events

Occurs when text has been committed @params (string text)
Occurs when a backspace is pressed.
Occurs when a return key is pressed.
Occurs when keyboard is shown.
Occurs when keyboard is hidden.

Properties

Collider Collider[Get]
InputField TextCommitField[Get]
ITextHandler TextHandler[Get]

Fields

Configure with the transform representing the left controller input.
Transform leftControllerDirectTransform[Get]
Configure with the transform representing the right controller input.
Transform rightControllerDirectTransform[Get]
Enables the controllers to directly interact with the keyboard.
Enables the controllers to send ray interactions to the keyboard.
Configures the raycast mask used when sending raycast controller input to the keyboard.
The OVRHand representing the left hand.
Requires the OVRHand to also have an OVRSkeleton.
The OVRHand representing the right hand.
Requires the OVRHand to also have an OVRSkeleton.
Enables tracked hands to directly interact with the keyboard.
Enables tracked hands to send ray interactions to the keyboard.
Configures the raycast mask used when sending raycast hand input to the keyboard.
The shader used to render the keyboard’s glTF materials.
The shader used to render the keyboard’s glTF alpha blended materials.
If false, prevents all keyboard input.
CommitTextUnityEvent CommitTextEvent[Get]
UnityEvent BackspaceEvent[Get]
UnityEvent EnterEvent[Get]
UnityEvent KeyboardShownEvent[Get]
UnityEvent KeyboardHiddenEvent[Get]

Member Functions

Updates the keyboard to a reference position.
Sends a ray input to the keyboard from a given transform.
Parameters
inputTransform
GameObject Transform with the pose and forward orientation of the input ray.
source
Input source to use (ex. Controller/Hand Left/Right).
isPressed
If true, will trigger a key press if the ray collides with a keyboard key.
useRaycastMask
Defaults to true. Will use the configured raycast mask for the given input source.
Sends a direct input to the keyboard from a given transform.
Parameters
position
The collision point which is interacting with the keyboard. For example, a hand index finger tip.
source
The input source to use (ex. Controller/Hand Left/Right).
isPressed
If the input is triggering a press or not.
Enables custom handling of text context.
Use this when changing input fields or if the input text has changed via another script.
void AutoPopulate ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon