TouchScreenKeyboard

class in UnityEngine

Switch to Manual

Description

Interface into the native iPhone, Android, Windows Phone and Windows Store Apps on-screen keyboards - it is not available on other platforms.

This interface allows to display different types of the keyboard: ASCII, Numbers, URL, Email, and others.

Because the appearance of the keyboard has the potential to obscure portions of your user interface, it is up to you to make sure that parts of your user interface are not obscured when the keyboard is being displayed.

TouchScreenKeyboard.visible and TouchScreenKeyboard.area should be used to determine if the keyboard is being shown (activated) and what portion of the screen is using.

Windows Store Apps: On Universal Windows 10 Apps the touch screen keyboard is only supported in XAML based applications with touch input support.

Static Variables

areaReturns portion of the screen which is covered by the keyboard.
hideInputWill text input field above the keyboard be hidden when the keyboard is on screen?
isSupportedIs touch screen keyboard supported.
visibleReturns true whenever any keyboard is completely visible on the screen.

Variables

activeIs the keyboard visible or sliding into the position on the screen?
canGetSelectionSpecifies whether the TouchScreenKeyboard supports the selection property. (Read Only)
doneSpecifies if input process was finished. (Read Only)
selectionReturns the character range of the selected text within the string currently being edited. (Read Only)
statusReturns the status of the on-screen keyboard. (Read Only)
targetDisplaySpecified on which display the software keyboard will appear.
textReturns the text displayed by the input field of the keyboard.
typeReturns the TouchScreenKeyboardType of the keyboard.
wasCanceledSpecifies if input process was canceled. (Read Only)

Static Functions

OpenOpens the native keyboard provided by OS on the screen.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961