Bewerken

Delen via


NonNativeKeyboard Class

Definition

A simple general use keyboard that is ideal for AR/VR applications that do not provide a native keyboard.

public ref class NonNativeKeyboard : Microsoft::MixedReality::Toolkit::Input::InputSystemGlobalHandlerListener, Microsoft::MixedReality::Toolkit::Input::IMixedRealityDictationHandler, UnityEngine::EventSystems::IEventSystemHandler
public class NonNativeKeyboard : Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalHandlerListener, Microsoft.MixedReality.Toolkit.Input.IMixedRealityDictationHandler, UnityEngine.EventSystems.IEventSystemHandler
type NonNativeKeyboard = class
    inherit InputSystemGlobalHandlerListener
    interface IMixedRealityDictationHandler
    interface IEventSystemHandler
Public Class NonNativeKeyboard
Inherits InputSystemGlobalHandlerListener
Implements IEventSystemHandler, IMixedRealityDictationHandler
Inheritance
UnityEngine.MonoBehaviour
NonNativeKeyboard
Implements
IMixedRealityDictationHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

NonNativeKeyboard()

Fields

AlphaKeyboard

The panel that contains the alpha keys.

AlphaMailKeys

References @ bottom panel.

AlphaSubKeys

References abc bottom panel.

AlphaWebKeys

References .com bottom panel.

CloseOnInactivity

Make the keyboard disappear automatically after a timeout

CloseOnInactivityTime

Inactivity time that makes the keyboard disappear automatically.

InputField

The InputField that the keyboard uses to show the currently edited text. If you are using the Keyboard prefab you can ignore this field as it will be already assigned.

InputFieldSlide

Move the axis slider based on the camera forward and the keyboard plane projection.

SliderEnabled

Bool for toggling the slider being enabled.

SubmitOnEnter

Bool to flag submitting on enter

SymbolKeyboard

The panel that contains the number and symbol keys.

Properties

Instance
IsCapsLocked

Accessor reporting caps lock state of keyboard.

IsShifted

Accessor reporting shift state of keyboard.

Methods

AppendValue(KeyboardValueKey)

Primary method for typing individual characters to a text field.

Backspace()

Delete the character before the caret.

CapsLock(Boolean)

Set the keyboard to a permanent shift state.

Clear()

Clear the text input field.

Close()

Close the keyboard. (Clears all event subscriptions.)

EndDictation()

Terminate dictation mode.

EnsureInputSystemValid()

A task that will only complete when the input system has in a valid state.

(Inherited from InputSystemGlobalHandlerListener)
Enter()

Fire the text entered event for objects listening to keyboard. Immediately closes keyboard.

FunctionKey(KeyboardKeyFunc)

Trigger specific keyboard functionality.

MoveCaretLeft()

Move caret to the left.

MoveCaretRight()

Move caret to the right.

Next()

Send the "next" event.

OnDictationComplete(DictationEventData)

Called when dictation is completed

OnDictationError(DictationEventData)

Called on dictation error. Not used here.

OnDictationHypothesis(DictationEventData)

Called when dictation hypothesis is found. Not used here

OnDictationResult(DictationEventData)

Called when dictation result is obtained

OnDisable()

Called whenever the keyboard is disabled or deactivated.

OnEnable() (Inherited from InputSystemGlobalHandlerListener)
PresentKeyboard()

Present the default keyboard to the camera.

PresentKeyboard(NonNativeKeyboard+LayoutType)

Presents a specific keyboard to the camera.

PresentKeyboard(String, NonNativeKeyboard+LayoutType)

Presents a specific keyboard to the camera, with start text.

PresentKeyboard(String)

Presents the default keyboard to the camera, with start text.

Previous()

Send the "previous" event.

RegisterHandlers()
RepositionKeyboard(Transform, BoxCollider, Single)

Function to reposition the keyboard based on target transform and collider information

RepositionKeyboard(Vector3, Single)

Function to reposition the Keyboard based on target position and vertical offset

SetScaleSizeValues(Single, Single, Single, Single)

Method to set the sizes by code, as the properties are private. Useful for scaling 'from the outside', for instance taking care of differences between immersive headsets and HoloLens

Shift(Boolean)

Set the keyboard to a single action shift state.

ShowAlphaKeyboard()

Enable the alpha keyboard.

ShowSymbolKeyboard()

Enable the symbol keyboard.

Space()

Insert a space character.

Start()

Set up Dictation, CanvasEX, and automatically select the TextInput object.

Tab()

Insert a tab character.

UnregisterHandlers()

Events

OnClosed

Fired every time the close button is pressed. (Cleared when keyboard is closed.)

OnKeyboardFunctionKeyPressed

Event fired when function key on keyboard is pressed. Fires before internal keyboard state is updated.

OnKeyboardShifted

Event fired when shift key on keyboard is pressed.

OnKeyboardValueKeyPressed

Event fired when char key on keyboard is pressed.

OnNext

Sent when the 'Next' button is pressed. Ideally you would use this event to set your targeted text input to the next text field in your document. (Cleared when keyboard is closed.)

OnPlacement

Sent when the keyboard is placed. This allows listener to know when someone else is co-opting the keyboard.

OnPrevious

Sent when the 'Previous' button is pressed. Ideally you would use this event to set your targeted text input to the previous text field in your document. (Cleared when keyboard is closed.)

OnTextSubmitted

Sent when the 'Enter' button is pressed. To retrieve the text from the event, cast the sender to 'Keyboard' and get the text from the TextInput field. (Cleared when keyboard is closed.)

OnTextUpdated

Fired every time the text in the InputField changes. (Cleared when keyboard is closed.)

Applies to