Using the Menu, Back, Home buttons with AIR for Android, Flash CS6

13,309

Looks like you can stop the default behavior of the back, search, and menu soft keys but not Home: http://www.adobe.com/devnet/air/quick_start_as/quickstarts/qs_capturing_soft_keys.html

Share:
13,309
Milkduds
Author by

Milkduds

Always finding an excuse to dabble with graphic design, traditional art and cartooning, coding and just trying to make something interesting.

Updated on June 05, 2022

Comments

  • Milkduds
    Milkduds almost 2 years

    I am looking to utilize and/or disable the hard "Home", "Back", "Menu" and "Search" buttons that are present on most Android phones and honestly don't know where to start. Using Flash Professional CS6 AIR for Android. I apologize if this is already answered somewhere but I cannot find any information on how to do this. Thank you in advance for all the help.

  • Milkduds
    Milkduds almost 12 years
    Thanks for the link, after doing some more checking from there I stumbled across another link with similar code that did the trick: code(stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); protected function onKeyDown(event:KeyboardEvent):void { if( event.keyCode == Keyboard.BACK ) { event.preventDefault(); //handle the button press here. } })