tags:

views:

23

answers:

1

I am adding a key listener to my AIR application like so:

<mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    keyDown="onKeyDown(event)">

Yet only sometimes when I press keys does it actually invoke. I have no clue why, I thought maybe something else has focus. Well I cannot add key listeners to NativeWindow or NativeApplication, and I would assume if it is on the WindowedApplication which is the root element, that as long as my application has focus the key presses should invoke the listener. Yet only sometimes do.

Any ideas why?

Thanks!

A: 

I added the event listener to SystemManager instead, that seemed to be more accurate.

John Isaacks
How much more accurate? What percentage does it seem to still be missing? You have raised an issue that seems to plague AIR/Flex developers and it seems that no-one has a 100% fix. I am wondering if it is time to report a bug on this.
invertedSpear
I believe it was much more accurate, however I didn't test it much because soon after, I had to scrap it for other reasons.
John Isaacks