Is my buttonMapping Allowed?

[EDIT]
I realize the code provided is broken. I’m working to fix it at the moment. However, my question still stands about the attached picture 

[/EDIT]

Hello there,

I’m getting close to publishing a corona app to Google play and I have a question about button mapping.

Basically I just want to know, did I do it right? Am I breaking any of Google’s rules or whatsoever?

Note that I can only test on my own device (A samsung galaxy S3 as shown in the picture) and I’m unsure if I my button-mapping might break the users ability to minimize the app  on other devices.

Help greatly appreciated 

![10744721_1503220633275541_1767992526_n.j](https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/10744721_1503220633275541_1767992526_n.jpg?oh=ef91d6f97c2eeddc7af15ef122ac25aa&oe=544EBDC0& gda =1414449652_13c3ce2caedfe932999518aaa3135312)

local function onKeyEvent( event ) if event.phase == "up" and initialized == true then if event.keyName == "menu" or event.keyName == "homePage" or event.keyName == "space" then PAUSE.switchPauseState() elseif event.keyName == "volumeUp" or event.keyName == "volumeDown" then PAUSE.forceGameToPausedState() elseif event.keyName == "back" then PAUSE.forceGameToPausedState() native.requestExit() end end return event end Runtime:addEventListener("key", onKeyEvent)

Well I’m not the most Android users in the world, but I would think based on that I would be quite frustrated.

I would expect the VolUp/VolDown buttons to do control volume.  If you don’t want to use them to manage the volume of sounds in your app, make sure to return false so the system will handle them.

The Back button (the sideways U with the arrow on it) should back up through logical screens in your app.  If you’re in your game, it should pause and return to a menu, pressing it from your menu should request an exit.  Generally the Home button (big button in the middle) and the Menu button (3 lines) are not something Corona apps can get a hold of.

Rob

Well I’m not the most Android users in the world, but I would think based on that I would be quite frustrated.

I would expect the VolUp/VolDown buttons to do control volume.  If you don’t want to use them to manage the volume of sounds in your app, make sure to return false so the system will handle them.

The Back button (the sideways U with the arrow on it) should back up through logical screens in your app.  If you’re in your game, it should pause and return to a menu, pressing it from your menu should request an exit.  Generally the Home button (big button in the middle) and the Menu button (3 lines) are not something Corona apps can get a hold of.

Rob