object:setReturnKey()

Type Function
Object TextField
Library native.*
Return value none
Revision Release 2024.3703
Keywords setReturnKey, native text input

Overview

Sets the return key value on the keyboard.

Gotchas

Syntax

object:setReturnKey( key )
key (required)

String. The type name of the return button.

Valid Key Values

Key iOS Android
"done"
"go"
"next"
"search"
"send"
"none"
"default"
"join"
"route"
"emergencycall"

Example

local textField = native.newTextField( 30, 140, 260, 150 )
textField:setReturnKey( "done" )