NonNativeKeyboard Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A simple general use keyboard that provides an alternative to the native keyboard offered by each device.
public class NonNativeKeyboard : UnityEngine.MonoBehaviour
type NonNativeKeyboard = class
inherit MonoBehaviour
Public Class NonNativeKeyboard
Inherits MonoBehaviour
- Inheritance
-
UnityEngine.MonoBehaviourNonNativeKeyboard
Remarks
This is an experimental feature. This class is early in the cycle, it has been labeled as experimental to indicate that it is still evolving, and subject to change over time. Parts of the MRTK, such as this class, appear to have a lot of value even if the details haven't fully been fleshed out. For these types of features, we want the community to see them and get value out of them early enough so to provide feedback.
NOTE: This keyboard will not automatically appear when you select an InputField in your Canvas. In order for the keyboard to appear you must call Keyboard.Instance.PresentKeyboard(string). To retrieve the input from the Keyboard, subscribe to the textEntered event. Note that tapping 'Close' on the Keyboard will not fire the textEntered event. You must tap 'Enter' to get the textEntered event.
Constructors
NonNativeKeyboard() |
Properties
AlphaKeysSection |
The panel that contains the alpha keys. |
CaretIndex |
The caret index for the current keyboard session. |
CloseOnInactivity |
Whether make the keyboard disappear automatically after a timeout. |
CloseOnInactivityTime |
Inactivity time to wait until making the keyboard disappear in seconds. |
DefaultBottomKeysSection |
References the default bottom panel. |
DictationRecordIcon |
Used for changing the color of the icon to indicate if recording is active. |
EmailBottomKeysSection |
References the @ bottom panel. |
Instance |
The instance of NonNativeKeyboard in the scene. |
IsCapsLocked |
Accessor reporting caps lock state of keyboard. |
IsShifted |
Accessor reporting shift state of keyboard. |
OnCaretIndexUpdate |
Fired every time the caret index changes. |
OnClose |
Fired every time the close button is pressed. |
OnKeyboardShifted |
Fired when the shift status is changed. |
OnKeyPressed |
Fired when any key on the keyboard is pressed. |
OnShow |
Fired when the keyboard is shown. |
OnTextSubmit |
Fired when the user submits the text (i.e. when 'Enter' button is pressed and SubmitOnEnter is true). |
OnTextUpdate |
Fired every time the text changes. |
Preview |
The preview component that the keyboard uses to show the currently edited text. |
SubmitOnEnter |
Whether submit on enter. |
SymbolKeysSection |
The panel that contains the number and symbol keys. |
Text |
The text entered in the current keyboard session. |
UrlBottomKeysSection |
References the .com bottom panel. |
Methods
Backspace() |
Delete the last character. |
CapsLock(Boolean) |
Set the caps lock state of the keyboard. |
Clear() |
Clear the text field and reset keyboard state (e.g. Shift and CapsLock). |
Close() |
Close the keyboard. |
Enter() |
Fire OnTextSubmit and close the keyboard if SubmitOnEnter is set to true. Otherwise append a new line character. |
MoveCaretLeft() |
Insert a tab character. |
MoveCaretRight() |
Insert a tab character. |
Open() |
Opens the default keyboard |
Open(NonNativeKeyboard+LayoutType) |
Opens a specific keyboard. |
Open(String, NonNativeKeyboard+LayoutType) |
Opens a specific keyboard, with start text. |
Open(String) |
Opens the default keyboard with start text. |
ProcessFunctionKeyPress(NonNativeFunctionKey) |
Process key presses from NonNativeFunctionKey. |
ProcessValueKeyPress(NonNativeValueKey) |
Process key presses from NonNativeValueKey. |
Shift(Boolean) |
Set the shift state of the keyboard. |
Space() |
Insert a space character. |
Start() |
A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time. |
StartDictation() |
Start dictation on a DictationSubsystem. |
StopDictation() |
Stop dictation on the current DictationSubsystem. |
Tab() |
Insert a tab character. |
ToggleDictation() |
Toggle dictation on or off, |