UxrKeyboardUI Class

Component that handles a keyboard in VR for user input

Inheritance Hierarchy

System.Object
  Object
    Component
      Behaviour
        MonoBehaviour
          UltimateXR.Core.Components.UxrComponent
            UltimateXR.UI.Helpers.Keyboard.UxrKeyboardUI
Namespace: UltimateXR.UI.Helpers.Keyboard
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public class UxrKeyboardUI : UxrComponent


The UxrKeyboardUI type exposes the following members.

Constructors

NameDescription
Public methodUxrKeyboardUI

Properties

NameDescription
Public propertyAllowInput Gets or sets whether keyboard input is allowed.
Public propertyAltEnabled Gets whether the Alt key is pressed.
Public propertyAltGrEnabled Gets whether the Alt GR key is pressed.
Public propertyCapsLockEnabled Gets whether caps lock is enabled.
Public propertyConsoleContent Gets the current console text content.
Public propertyConsoleContentWithCursor Gets the current console text content including the cursor.
Public propertyControlEnabled Gets whether a Control key is pressed.
Public propertyCurrentCursor Gets the current console cursor (can be empty or the cursor character as a string).
Public propertyCurrentLine Gets the current console line without the cursor.
Public propertyCurrentLineWithCursor Gets the current console line including the cursor.
Public propertyHidePassword Gets or sets whether to hide password characters when IsPassword is used.
Public propertyIsPassword Gets or sets whether the keyboard is being used to type in a password. This can be used to hide the content behind asterisk characters.
Public propertyPreviewCaps Gets or sets whether the key labels casing changes when the shift of caps lock key is pressed.
Public propertyShiftEnabled Gets whether a shift key is being pressed.

Methods

NameDescription
Public methodAddConsoleContent Adds content to the console. This method should be used instead of the ConsoleContent property since ConsoleContent will not process lines.
Protected methodAwake Initializes the keyboard and clears the content. (Overrides UxrComponent.Awake().)
Public methodClear Clears the console content.
Public methodEnableDefaultSymbols If different symbols are present (through a ToggleSymbols keyboard key), sets the default symbols as the currently enabled. Usually the default symbols are the regular alphabet letters.
Protected methodOnCurrentLineChanged Event trigger for the CurrentLineChanged event.
Public methodRegisterKey Called to register a new key in the keyboard.
Public methodUnregisterKey Called to unregister a key from the keyboard.

Events

NameDescription
Public eventCurrentLineChanged Event we can subscribe to if we want notifications whenever the current line being typed in using the keyboard changed.
Public eventDisallowedKeyPressed Event called on key presses/releases when the input is disabled using AllowInput.
Public eventKeyPressed Event called on key presses/releases.

Extension Methods

NameDescription
Public Extension MethodCheckSetEnabled Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.)
Public Extension MethodGetOrAddComponent<T> Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.)
Public Extension MethodGetPathUnderScene Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.)
Public Extension MethodGetSceneUid Gets an unique identifier string for the given component. (Defined by ComponentExt.)
Public Extension MethodGetUniqueScenePath Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. (Defined by ComponentExt.)
Public Extension MethodLoopCoroutine Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.)
Public Extension MethodSafeGetComponentInParent<T> Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab (Defined by ComponentExt.)
Public Extension MethodShowInInspector(Boolean)Overloaded.
Controls whether to show the current object in the inspector. (Defined by ObjectExt.)
Public Extension MethodShowInInspector(Boolean, Boolean)Overloaded.
Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.)
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.UI.Helpers.Keyboard Namespace