Skip navigation
Currently Being Moderated

air app exit fullscreen mode when ctrl+s is pressed

Sep 22, 2011 4:37 AM

I got a problem with my Air app. App is fullscreen and I want it to stay this way. I managed to disable Esc button by this code:

 

addEventListener(KeyboardEvent.KEY_DOWN, whichKey);

private function whichKey(e:KeyboardEvent):void {

  if (e.keyCode == 27) e.preventDefault();

}

 

But I still got a problem when buttons control+s are pressed - app exits fullscreen mode. Similar code doesn't seem to work:

 

 

addEventListener(KeyboardEvent.KEY_DOWN, whichKey);

private function whichKey(e:KeyboardEvent):void {

  if (e.ctrlKey && e.keycode == 83) e.preventDefault();

}

 

Anyone knows something about this mysterious combination of ctrl+s buttons?

 
Replies
  • Currently Being Moderated
    Aug 1, 2013 4:42 PM   in reply to Ibarim

    It looks like you have e.keycode when it should be e.keyCode. It works fine for me with that change.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points