Hi All!

We want our projector to be full screen always. To do that we add the
keyboard event listener to the stage and then if the user has pressed Esc
button, turn full screen mode on:


*switch* (event.keyCode) {

*case* Keyboard.ESCAPE :

*try* {

stage.displayState = StageDisplayState.FULL_SCREEN;

} *catch* (e : Error) {}

*break*;

But this event handler does not work when some pop up is focused.
Subscription to systemManager does not fix the problem either.


<mx:Application

xmlns:mx="http://www.adobe.com/2006/mxml";

layout="absolute"

applicationComplete="onApplicationComplete()">

<mx:Script>

<![CDATA[

*import* mx.controls.Alert;

*private* *function* onApplicationComplete() : *void* {

stage.displayState = StageDisplayState.FULL_SCREEN;

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);

Alert.show(*'Alert!'*);

}

*private* *function* onKeyDown(event : KeyboardEvent) : *void* {

*trace*(*"Key down!"*);

}

]]>

</mx:Script>

</mx:Application>

Any ideas how to implement really global Esc keyboard button press handler?
Sergey.

Reply via email to