Provides access to the device's input system. Accessible through global.textInputSystem.

var options = new TextInputSystem.KeyboardOptions();
options.enablePreview = false;
options.keyboardType = TextInputSystem.KeyboardType.Text;
options.returnKeyType = TextInputSystem.ReturnKeyType.Done;

global.textInputSystem.requestKeyboard(options);
interface TextInputSystem {
    dismissKeyboard(): void;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    requestKeyboard(options: KeyboardOptions): void;
    setEditingPosition(position: number): void;
    setSelectedTextRange(range: vec2): void;
}

Hierarchy (view full)

Methods

  • Requests the client to hide the keyboard and clear any existing text in the inivisible text view.

    Returns void

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Requests the client to pop up the keyboard with specific type and return key type, fill the inivisible text view with the initial text, and set the selected text range. When user starts editing the text, the new text string and the new selected range are returned to the lens by invoking the onTextChanged function.

    Parameters

    Returns void

  • Requests the client to set the editing ("cursor") position on the invisible text view.

    Parameters

    • position: number

    Returns void

  • Requests the client to set the selected text range on the invisible text view.

    Parameters

    Returns void