home, menu and return button, which event?

Hi folks,

when a user presses the home, menu or return button, which events will be fired so i can react on it in the game?

Can this be simulated inside the corona simulator?

Cheers
Michael [import]uid: 5712 topic_id: 1629 reply_id: 301629[/import]

Home suspends the application (so listen for “system” and event.type=“applicationSuspend”). Return quits (event.type = “applicationExit”)

Menu currently does nothing. I have filed an enhancement request #744 to add events for these to override the default behavior.

See:
http://developer.anscamobile.com/content/events-and-listeners

[import]uid: 54 topic_id: 1629 reply_id: 5123[/import]

I am trying to use a listener for the applicationSuspended event as you mention for the Android version of my app, but it does not seem to triggered. In the android emulators the home and back buttons do not function and the menu pulldown for suspend does not cause the event to be triggered. The event does not seem to happen for the device as well.

I am trying to call os.exit() when the app is suspended on home and back key presses to prevent it from being backgrounded. Can we listen for the applicationSuspended event in Corona 2.0 or is there another way to achieve what I am trying to do? [import]uid: 2048 topic_id: 1629 reply_id: 11430[/import]