Perhaps a more detailed explanation will help explain the problem.
On the Mac, if the capslock key is not toggled and not down, the
Key.onKeyDown event is triggered when the key is pressed. While the
key is held down both isDown and isToggled return true. When the key
is released the onKeyUp event is not called and the isDown and
isToggled methods still return true.
When the caps lock key is pressed again the Key.onKeyUp event is
triggered even though the key is being pressed, not released. While
the key is held down both isDown and isToggled return false. When the
key is released no key event is triggered.
Though the isToggled method returns the correct boolean value in all
cases, the isDown method is not accurate. When I publish the SWF for
v8 and test in on Mac OS X (Flash authoring tool, Safari and Firefox)
it functions in the way that is outlined above. This makes it
impossible to track whether the caps lock key is up or down. I don't
have access to a PC to test this and see if it functions in the same
way.
Has anyone experienced this before? More importantly does anyone have
a solution? It is critical I be able to track the up/down state of
this key for a project.
Thanks.
Daniel
Hi,
the isDown call traces true when i test it here, the isToggled
traces false (both when holding down capslock ofcourse).
Tested on xp, flash 8
Just to be sure, 'disable keyboard shortcuts' doesnt have anything
to do with it?
When i do:
Key.addListener(this);
this.onKeyUp = function () {
if (Key.getCode() == Key.CAPSLOCK) trace ("caps up");
}
it shows 'caps up' just fine.
greetz
Hans
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com