L
lm
Hi,
Using Java 1.5.0_06-b05.
XP SP2
I attached a KeyListerner to a component to specifically monitor modifer key
events (Shift/Alt/Ctrl keys).
Using simple code I can pick up the keyPressed() and keyReleased() events
fine, but I noticed some weird behaviour with the Alt key.
When pressing the Alt key, it triggers a keyPressed event and then a
subsequent keyReleased event when I release the key (as expected). But when
I hit Alt a second consecutive time, it does not trigger a keyPressed event,
but it does trigger the subsequent keyReleased event when released. When I
press a third consecutiv time, it behaves correctly (triggers both pressed
and released events). In summary, every second consecutive pressing of Alt
fails to trigger a keyPressed event, but all keyReleased events are
triggered.
All other keys (Shift and Ctrl) seem to behave normally.
Is this normal behaviour for the Alt key or is it a potential bug of the JVM
or OS???
Thanks!
Using Java 1.5.0_06-b05.
XP SP2
I attached a KeyListerner to a component to specifically monitor modifer key
events (Shift/Alt/Ctrl keys).
Using simple code I can pick up the keyPressed() and keyReleased() events
fine, but I noticed some weird behaviour with the Alt key.
When pressing the Alt key, it triggers a keyPressed event and then a
subsequent keyReleased event when I release the key (as expected). But when
I hit Alt a second consecutive time, it does not trigger a keyPressed event,
but it does trigger the subsequent keyReleased event when released. When I
press a third consecutiv time, it behaves correctly (triggers both pressed
and released events). In summary, every second consecutive pressing of Alt
fails to trigger a keyPressed event, but all keyReleased events are
triggered.
All other keys (Shift and Ctrl) seem to behave normally.
Is this normal behaviour for the Alt key or is it a potential bug of the JVM
or OS???
Thanks!