Get returnKey from TextField

Hi guys,

There are several options for the return key (‘next’,‘go’, etc…)

Is there a way to get the return key text in the ‘event.target’ when the ‘event.phase = submitted’ ?

local defaultField local function textListener( event ) if ( event.phase == "began" ) then elseif ( event.phase == "ended" or event.phase == "submitted" ) then print( event.target.returnKey ) end end -- Create text field defaultField = native.newTextField( 150, 150, 180, 30 ) defaultField:addEventListener( "userInput", textListener )

I have the same trouble!

You have to set the value for the return key, therefore you should already know the value.

Rob

I have the same trouble!

You have to set the value for the return key, therefore you should already know the value.

Rob