Android Back Button vs Home Button

I just noticed how the home button on Android suspends an app, while the back button closes it entirely. How can I make the back button suspend the app like the home button?

You need to set up

local function onKeyEvent( event ) local keyName = event.keyName if "back" == keyName and event.phase == "up" then -- put your code here to handle the key event return true end return false end Runtime:addEventListener("key", onKeyEvent ) 

Rob

a key handler:

You need to set up

local function onKeyEvent( event ) local keyName = event.keyName if "back" == keyName and event.phase == "up" then -- put your code here to handle the key event return true end return false end Runtime:addEventListener("key", onKeyEvent ) 

Rob

a key handler: