Multiple key presses: keyReleased() issue
in
Programming Questions
•
8 months ago
Hi everybody!
I'm trying to use code from
http://wiki.processing.org/w/Multiple_key_presses (
Option 1
) to detect m
ultiple key presses in my simple game project. But there's the strange issue that occurs for me, but not at every launch.
Sometimes when I'm holding a key (for example "a"), keyReleased() method is called unexpectedly after few seconds. It sets my
keys
[
keyCode
] to
false
(just like in the
Option 1
example) and it fails my game logic.
Is this a bug? Or am I doing something wrong?
1