S
Simon
Hi,
I need to listen to an event that tells me when the user physically presses and
releases a key. I cannot achieve this easily with the normal keyPressed,
keyReleased, or keyTyped-events, since after when a key is pressed for more than
half a second or so I get repeated events (all three) every other millisecond.
Of course I can write an ugly workaround that discards keyReleased events when
they are immediately followed by a keyPressed of the same key. However, this is
not very reliable. Is there a better way? Or can I just switch of this behaviour
from within Java?
Cheers,
Simon
I need to listen to an event that tells me when the user physically presses and
releases a key. I cannot achieve this easily with the normal keyPressed,
keyReleased, or keyTyped-events, since after when a key is pressed for more than
half a second or so I get repeated events (all three) every other millisecond.
Of course I can write an ugly workaround that discards keyReleased events when
they are immediately followed by a keyPressed of the same key. However, this is
not very reliable. Is there a better way? Or can I just switch of this behaviour
from within Java?
Cheers,
Simon