开发者

AIR-FLEX: Keyboard events only sometimes working?

开发者 https://www.devze.com 2022-12-22 23:29 出处:网络
I am adding a key listener to my AIR application like so: <mx:WindowedApplication xmlns:mx=\"http://www.adobe.com/2006/mxml\"

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!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号