Why do you say using systemManager does not
work? It does for me.
Tracy Spratt,
Lariat Services, development services
available
From:
Sent: Monday, July 06, 2009 11:04
AM
To:
Subject: [flexcoders] How to
handle keyboard shortcut globally?
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.
}
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.
layout="absolute"
applicationComplete
<mx:Script>
<![CDATA[
import mx.controls.
private function
onApplicationComple
stage.displayState
= StageDisplayState.
stage.addEventListe
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.