2 Replies Latest reply on Feb 3, 2010 11:31 AM by Francisc

    FullScreen ESC capture

    Francisc Level 3

      Hello!

       

      I have an AIR Application that runs in stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;

       

      I want to catch the ESC key and resize the window from inside the code because some adjustments are to be made first.

       

      I tried:

       

      this.addEventListener(KeyboardEvent.KEY_DOWN,cancelESCMinimize,true);

       

      AND

       

      private function cancelESCMinimize(event:KeyboardEvent):void

      {

           if(event.keyCode==Keyboard.ESCAPE)

           {

                //Make Adjustments;

                //Restore;

           }

      }

       

      But that doesn't work.