Skip to main content
Version: 21 Aug 2024

MLVirtualKeyboard

NameSpace: MagicLeap

This class provides callbacks and manages the state of the Virtual Keyboard.

Inherits from:
MonoBehaviour

Public Methods

void Cancel

Invokes the Cancel event for the Virtual Keyboard.

public void Cancel()

void Delete

Deletes the last element from the input field text.

public void Delete()

void Hover

If a ControllerConnectionHandler is assigned, the Bump feedback pattern will be sent to the active controller.

public void Hover()

void InsertCharacter

Appends a string to the end of the input field text.

public void InsertCharacter(
string character
)

Parameters

TypeNameDescription
stringcharacter

void Open

public void Open(
InputField targetField =null
)

Parameters

TypeNameDescription
InputFieldtargetField

void Return

Adds a NewLine to the input field text.

public void Return()

void Space

Appends a space to the end of the input field text.

public void Space()

void Submit

Invokes the Submit event for the Virtual Keyboard.

public void Submit()

void ToggleKeyboard

Toggles the active keyboard between (a-Z) and (Alphanumeric)

public void ToggleKeyboard()

void ToggleShift

Toggles the shift state of the currently active keyboard.

public void ToggleShift()

Public Attributes

OnCharacterAdded


public UnityEvent< char > OnCharacterAdded = new UnityEvent<char>();


OnCharacterDeleted


public UnityEvent OnCharacterDeleted = new UnityEvent();


OnInputValueChange


public UnityEvent< string > OnInputValueChange = new UnityEvent<string>();


OnKeyboardCancel


public KeyboardCancelEvent OnKeyboardCancel = new KeyboardCancelEvent();


OnKeyboardSubmit


public KeyboardSubmitEvent OnKeyboardSubmit = new KeyboardSubmitEvent();