MixedRealityKeyboardBase Class

Definition

Base class for objects that wish to launch and hide a system keyboard specifically for Windows Mixed Reality devices (HoloLens 2, Windows Mixed Reality).

Implements a workaround for UWP TouchScreenKeyboard bug which prevents UWP keyboard from showing up again after it is closed. Unity bug tracking the issue https://fogbugz.unity3d.com/default.asp?1137074_rttdnt8t1lccmtd3

C++
public ref class MixedRealityKeyboardBase abstract : UnityEngine::MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
MixedRealityKeyboardBase
Derived

Remarks

If using Unity 2019 or 2020, make sure the version >= 2019.4.25 or 2020.3.2 to ensure the latest fixes for Unity keyboard bugs are present.

Constructors

Properties

CaretIndex

Returns the index of the caret within the text.

DisableUIInteractionWhenTyping

Whether disable user's interaction with other UI elements while typing. Use this option to decrease the chance of keyboard getting accidentally closed.

OnCommitText

Event which triggers when commit action is invoked on the keyboard. (Usually the return key.)

OnHideKeyboard

Event which triggers when the keyboard is hidden.

OnShowKeyboard

Event which triggers when the keyboard is shown.

Text
Visible

Returns true if the keyboard is currently open.

Methods

ClearKeyboardText()

Removes the current text from the keyboard.

HideKeyboard()

Closes the keyboard for user interaction.

ShowKeyboard(String, Boolean)

Opens the keyboard for user interaction.

SyncCaret()

Applies to

Produkto Mga Bersyon
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0