Is the new feature for Android which supports navigation keys not working in the simulator. I doesn’t switch scenes in the new daily build.
Regards,
Jordan Schuetz
[lua]local title = display.newText( “Press a navigation key”, 0, 0, nil, 20 )
title.x = display.contentWidth/2 – Center the text
title.y = 20
local eventTxt = display.newText( “Waiting for nav key event…”, 0, 0, nil, 20 )
eventTxt.x = display.contentWidth/2 – Center the text
eventTxt.y = display.contentHeight/2-30
eventTxt:setTextColor( 255, 255, 255 )
local function onKeyEvent( event )
local phase = event.phase
local keyName = event.keyName
eventTxt.text = “(”…phase…" , " … keyName …")"
– we handled the event, so return true.
– for default behavior, return false.
return true
end
– Add the key callback
Runtime:addEventListener( “key”, onKeyEvent );[/lua] [import]uid: 29181 topic_id: 12471 reply_id: 312471[/import]