Hi all:  I'm using FB3 beta3, and am seeing odd behaviour when trying to
detect Command-keystrokes on Mac OS X.

I define an event handler:
    this.addEventListener(KeyboardEvent.KEY_UP, keyHandler); 


And an event handling method:

    private function keyHandler(event:KeyboardEvent):void {
        if (event.controlKey) {
            trace("key");
        }
    }

Now, the above works perfectly, and also works perfectly if I use
"event.shiftKey".  However, if I replace "controlKey" with "commandKey" it
does not - often my keyHandler method does not get called when I type a
command-key, and even when it does get called the "event.commandKey"
property is always false.

Now, if I add a "KEY_DOWN" listener, then that listener gets called
correctly as soon as the Command key is depressed - but that's not what I'm
looking for...  :)

Is there a reason why the command key is being handled differently than the
control and shift keys?  Is this a bug, or am I misunderstanding something?

BTW:  This is happening in an AIR application, latest beta.



- bill


Reply via email to