For Flex, use systemManager instead of stage from what i was told and the 
capture. no idea on combo sorry

----- Original Message ----
From: thirtyfivemph <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, March 4, 2008 1:32:58 PM
Subject: [flexcoders] Global keyboard capture?

I'm wanting to globally capture the keyboard in my Flex app. I want to
be notified of every keyboard event that happens as long as the Flash
Player has the focus... regardless of whether the event happens when a
UIComponent has keyboard focus or not.

Here's what I'm doing:

stage.addEventListe ner(KeyboardEven t.KEY_DOWN, handleKeyboard, false,
int.MAX_VALUE) ;
stage.addEventListe ner(KeyboardEven t.KEY_UP, handleKeyboard, false,
int.MAX_VALUE) ;
stage.addEventListe ner(KeyboardEven t.KEY_DOWN, handleKeyboard, true,
int.MAX_VALUE) ;
stage.addEventListe ner(KeyboardEven t.KEY_UP, handleKeyboard, true,
int.MAX_VALUE) ;

Since the stage is at the top of the display list, and since I'm
listening for events in both the capture and bubble phase, and since I
have the highest possible event priority, should I see all keyboard
events?

The problem is that I'm not... I've got a situation in my app where I
start seeing only keyDown events with no matching keyUp events. It
happens after I click on a ComboBox drop-down in a popup, then the
popup is closed. At that point, I only get keyDown events until I
click on another UI component.

Any ideas what could be happening here?

In general, is there a way I can guarantee that I can direct *all*
keyboard events to a given function?

Thanks,

Troy.


 


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to