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

OVRTrackedKeyboard Class

Extends MonoBehaviour

Fields

ActiveKeyboardTransform : Transform
Transform that determines current position and rotation of the keyboard.
Signature
Transform OVRTrackedKeyboard.ActiveKeyboardTransform
HandsOverKeyboard : bool
Internal only.
Determines whether the hands are currently positioned over the keyboard. In opaque presentation mode, passthrough hands are only shown when this is true.
Signature
bool OVRTrackedKeyboard.HandsOverKeyboard
keyboardModelAlphaBlendShader : Shader
The shader used for rendering transparent parts of the keyboard model in opaque mode.
Signature
Shader OVRTrackedKeyboard.keyboardModelAlphaBlendShader
keyboardModelShader : Shader
The shader used for rendering the keyboard model in opaque mode.
Signature
Shader OVRTrackedKeyboard.keyboardModelShader
mipmapBias : float
Signature
float OVRTrackedKeyboard.mipmapBias
PassthroughBorderMultiplier : float
How large of a passthrough area to show surrounding the keyboard when using MR presentation.
Signature
float OVRTrackedKeyboard.PassthroughBorderMultiplier
PassthroughShader : Shader
Internal only.
The shader used to render the passthrough rectangle in opaque mode.
Signature
Shader OVRTrackedKeyboard.PassthroughShader
ProjectedPassthroughMR : OVRPassthroughLayer
Internal only.
The passthrough layer used to render the passthrough rectangle in MR mode.
Signature
OVRPassthroughLayer OVRTrackedKeyboard.ProjectedPassthroughMR
textureFiltering : OVRTextureQualityFiltering
Signature
OVRTextureQualityFiltering OVRTrackedKeyboard.textureFiltering
TrackedKeyboardActiveChanged : Action< TrackedKeyboardSetActiveEvent >
Event that is dispatched when the component starts or stops actively tracking the keyboard.
Signature
Action<TrackedKeyboardSetActiveEvent> OVRTrackedKeyboard.TrackedKeyboardActiveChanged
TrackedKeyboardVisibilityChanged : Action< TrackedKeyboardVisibilityChangedEvent >
Event that is dispatched when the state of keyboard tracking changes (e.g.
tracking becomes stale or valid as keyboard passes in/out of camera view).
Signature
Action<TrackedKeyboardVisibilityChangedEvent> OVRTrackedKeyboard.TrackedKeyboardVisibilityChanged
UseHeuristicRollback : bool
Determines whether rolling average filter and keyboard angle filters are applied.
If true, keyboard will be shown in latest tracked position at all times.
Signature
bool OVRTrackedKeyboard.UseHeuristicRollback

Properties

ActiveKeyboardInfo : OVRKeyboard.TrackedKeyboardInfo
[Get]
Provides information about the keyboard currently being tracked by this OVRTrackedKeyboard component.
Signature
OVRKeyboard.TrackedKeyboardInfo OVRTrackedKeyboard.ActiveKeyboardInfo
ConnectionRequired : bool
[Get][Set]
Specifies whether or not the keyboard must be connected via Bluetooth in order to be tracked.
If set to true, the keyboard must be connected to the headset via Bluetooth in order to be tracked. The keyboard will stop being tracked if it is powered off or disconnected from the headset. If set to false, the keyboard will be tracked as long as it is visible to the headset's cameras.
Signature
bool OVRTrackedKeyboard.ConnectionRequired
CurrentKeyboardAngleFromUp : float
[Get]
Determines amount that keyboard is tilted from its ordinary horizontal position.
For internal use.
Signature
float OVRTrackedKeyboard.CurrentKeyboardAngleFromUp
KeyboardQueryFlags : OVRPlugin.TrackedKeyboardQueryFlags
[Get][Set]
Specifies whether to search for local keyboards attached to the headset or for remote keyboards not attached to the headset.
Signature
OVRPlugin.TrackedKeyboardQueryFlags OVRTrackedKeyboard.KeyboardQueryFlags
PassthroughOverlay : OVROverlay
[Get]
Internal only.
The passthrough layer used to render the passthrough rectangle in opaque mode.
Signature
OVROverlay OVRTrackedKeyboard.PassthroughOverlay
Presentation : KeyboardPresentation
[Get][Set]
Determines which visualization will be used to present the tracked keyboard to the user.
Signature
KeyboardPresentation OVRTrackedKeyboard.Presentation
RemoteKeyboard : bool
[Get][Set]
Signature
bool OVRTrackedKeyboard.RemoteKeyboard
ShowUntracked : bool
[Get][Set]
If true, will show the keyboard even if it is not currently connected or visible to the cameras.
This is mainly useful for testing the feature when you don't have access to a physical keyboard. The keyboard that appears will be based on which keyboard is selected in Settings on the headset. The keyboard will appear in front of the user at waist level.
Signature
bool OVRTrackedKeyboard.ShowUntracked
SystemKeyboardInfo : OVRKeyboard.TrackedKeyboardInfo
[Get]
Provides information about the keyboard currently selected for tracking in the system settings.
May not yet be tracked by this OVRTrackedKeyboard component.
Signature
OVRKeyboard.TrackedKeyboardInfo OVRTrackedKeyboard.SystemKeyboardInfo
TrackingEnabled : bool
[Get][Set]
Specifies whether or not the OVRTrackedKeyboard component will attempt to search for and track a keyboard.
If true, the component will continually search for a tracked keyboard. If one is detected it will be shown. If false, no keyboard is shown and the prefab is inactive. The keyboard can still be used to enter text into input fields even though it cannot be seen in VR.
Signature
bool OVRTrackedKeyboard.TrackingEnabled
TrackingState : TrackedKeyboardState
[Get]
Current state of keyboard tracking.
Signature
TrackedKeyboardState OVRTrackedKeyboard.TrackingState

Methods

Dispose ()
Stops keyboard tracking and cleans up associated resources.
Signature
void OVRTrackedKeyboard.Dispose()
Returns
void
GetDistanceToKeyboard ( point )
Returns the distance from the given point to the keyboard.
Signature
float OVRTrackedKeyboard.GetDistanceToKeyboard(Vector3 point)
Parameters
point: Vector3  A 3D vector coordinate to use as the reference point
Returns
float  A floating point value that is the distance to intersect within the keyboard bounds
LaunchLocalKeyboardSelectionDialog ()
Invokes an Android broadcast to launch a keyboard selection dialog for local keyboard type.
Signature
void OVRTrackedKeyboard.LaunchLocalKeyboardSelectionDialog()
Returns
void
LaunchRemoteKeyboardSelectionDialog ()
Invokes an Android broadcast to launch a keyboard selection dialog for remote keyboard type.
Signature
void OVRTrackedKeyboard.LaunchRemoteKeyboardSelectionDialog()
Returns
void
UpdateKeyboardVisibility ()
Internal only.
Updates rendering of keyboard based on its current visibility.
Signature
void OVRTrackedKeyboard.UpdateKeyboardVisibility()
Returns
void

Inner Structs

TrackedKeyboardSetActiveEvent Struct

Event sent when tracked keyboard starts or stops actively tracking.

Constructors

TrackedKeyboardSetActiveEvent ( isEnabled )
Signature
OVRTrackedKeyboard.TrackedKeyboardSetActiveEvent.TrackedKeyboardSetActiveEvent(bool isEnabled)
Parameters
isEnabled: bool

Fields

IsEnabled : readonly bool
Signature
readonly bool OVRTrackedKeyboard.TrackedKeyboardSetActiveEvent.IsEnabled

TrackedKeyboardVisibilityChangedEvent Struct

Event sent when tracked keyboard changes visibility (passes in or out of camera view).

Constructors

TrackedKeyboardVisibilityChangedEvent ( keyboardModel , state , timeout )
Signature
OVRTrackedKeyboard.TrackedKeyboardVisibilityChangedEvent.TrackedKeyboardVisibilityChangedEvent(string keyboardModel, TrackedKeyboardState state, bool timeout)
Parameters
keyboardModel: string
timeout: bool

Fields

ActiveKeyboardName : readonly string
Signature
readonly string OVRTrackedKeyboard.TrackedKeyboardVisibilityChangedEvent.ActiveKeyboardName
State : readonly TrackedKeyboardState
Signature
readonly TrackedKeyboardState OVRTrackedKeyboard.TrackedKeyboardVisibilityChangedEvent.State
TrackingTimeout : readonly bool
Signature
readonly bool OVRTrackedKeyboard.TrackedKeyboardVisibilityChangedEvent.TrackingTimeout

Inner Enums

TrackedKeyboardState Enum

Used by TrackingState property to give the current state of keyboard tracking.

Enumeration Constants

MemberDescription
Uninitialized
The OVRTrackedKeyboard component has not yet been initialized.
NoTrackableKeyboard
Component is initialized but user has not selected a keyboard to track in the system settings.
Offline
Keyboard tracking has been stopped or has not yet started for current keyboard.
StartedNotTracked
Keyboard tracking has been started but no tracking data is yet available. This can occur if the keyboard is not visible to the cameras.
Stale
Keyboard tracking has been started but no tracking data has been available for a while. This can occur if the keyboard is no longer visible to the cameras.
Valid
Keyboard is currently being tracked and recent tracking data is available.
Error
An error occurred while initializing keyboard tracking.
ErrorExtensionFailed
Was unable to retrieve system keyboard info. Can occur if required keyboard extension is not properly enabled in the application manifest.

KeyboardPresentation Enum

Determines which visualization is used for the tracked keyboard.

Enumeration Constants

MemberDescription
PreferOpaque
The keyboard is rendered as an opaque model in VR and if the user's hands are placed over it, they are rendered using passthrough.
PreferMR
The keyboard and hands are rendered using a rectangular passthrough window around the keyboard.