Maybe because in my case the application is in full screen mode?
On Mon, Jul 6, 2009 at 11:15 PM, Tracy Spratt <[email protected]> wrote: > > > Why do you say using systemManager does not work? It does for me. > > > > Tracy Spratt, > > Lariat Services, development services available > ------------------------------ > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Sergey Kovalyov > *Sent:* Monday, July 06, 2009 11:04 AM > *To:* [email protected]; [email protected] > *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.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. > > >

