Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to handle keyboard shortcut globally?   Message List  
Reply | Forward Message #145102 of 149504 |
RE: [flexcoders] How to handle keyboard shortcut globally?

Why do you say using systemManager does not work?  It does for me.

 

Tracy Spratt,

Lariat Services, development services available


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sergey Kovalyov
Sent: Monday, July 06, 2009 11:04 AM
To: flexcoders@yahoogroups.com; flexcomponents@yahoogroups.com
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.



Mon Jul 6, 2009 8:15 pm

nts333rd
Offline Offline
Send Email Send Email

Forward
Message #145102 of 149504 |
Expand Messages Author Sort by Date

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,...
Sergey Kovalyov
skovalyov.flexcoders@...
Send Email
Jul 6, 2009
3:04 pm

Why do you say using systemManager does not work? It does for me. Tracy Spratt, Lariat Services, development services available _____ From:...
Tracy Spratt
nts333rd
Offline Send Email
Jul 6, 2009
8:15 pm

Maybe because in my case the application is in full screen mode?...
Sergey Kovalyov
skovalyov.flexcoders@...
Send Email
Jul 7, 2009
7:41 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help