Hi all,
Somewhat related to my last, invalid question since I am trying to
make a grid recognize shift+key combos. The problem is that, when I
catch an onkeydown event in my grid and check to see if the shift key
is down using "lz.Keys.isKeyDown('shift')", the first time I try it
with the shift key down the "isKeyDown" method returns "false," and
then only returns "true" if I keep the shift key down and enter in
subsequent key presses. To test, I added an "onkeydown" handler in my
canvas that looks like this:
<handler name="onkeydown" reference="lz.Keys" args="kc">
Debug.write("Key: " + kc);
</handler>
Here is what happens:
<I press the "Shift" key> - Nothing happens
<I release the "Shift key> - Debug Message: "Key: 16"
<I press the "Shift" key> - Nothing happens
<I press the "Down Arrow" key> - Debug Message: "Key 40", Debug
Message: "Key 16"
<I release and then press the "Down Arrow" key again> - Debug Message: "Key 40"
So basically the lz.Keys object does not register when "Shift" is
pressed until either (a) "Shift" is lifted, or (b) Another key is
pressed, at which time it registers the "Shift" press *after* the
other key is pressed, so a handler catching that key press will return
false for "lz.Keys.isKeyDown('shift')".
Is there any way to fix this?
--
Justin Ellis
646-783-9387
Fax: 866-448-6503
[email protected]
www.LightBulbLaw.com