object:setReturnKey()

Type Function
Object TextBox
Library native.*
Return value none
Revision Release 2026.3728
Keywords setReturnKey
See also native.newTextBox()

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 textBox = native.newTextBox( 160, 240, 280, 140 )
textBox.isEditable = true
textBox:setReturnKey( "done" )