Editar

Compartir a través de


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

public ref class MixedRealityKeyboardBase abstract : UnityEngine::MonoBehaviour
public abstract class MixedRealityKeyboardBase : UnityEngine.MonoBehaviour
type MixedRealityKeyboardBase = class
    inherit MonoBehaviour
Public MustInherit Class MixedRealityKeyboardBase
Inherits 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

MixedRealityKeyboardBase()

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