object.inputType

Type String
Object TextField
Library native.*
Revision Current Public Release (2017.3068)
Keywords keyboard, keyboard type, text input, text field, native text

Overview

Sets the keyboard type for a native text input field.

Keyboard Types

Possible string values are:

The current public release is 2017.3068. Prior to daily build 2017.3123, the "decimal" input type was only available on iOS.

The "no-emoji" input type is available starting in daily build 2017.3123.

iOS Extensions

The following values are iOS-specific and correspond to the names of actual constants in the iOS API:

  • "UIKeyboardTypeASCIICapable"
  • "UIKeyboardTypeNumbersAndPunctuation"
  • "UIKeyboardTypeNamePhonePad"
  • "UIKeyboardTypeTwitter"
  • "UIKeyboardTypeWebSearch"

Please consult the iOS documentation on UIKeyboardType for an explanation of each keyboard type.

Gotchas

Example

local numericField = native.newTextField( 50, 150, 220, 36 )
numericField.inputType = "number"