When I hold down a key the system automatically makes as if I press and release the key continuously, so java thinks I did it. I know it can be enabled/disabled by configuring the system, but I'd like to do it by code, I mean, I shouldn't ask my program's user to disable this before start the program and I can't find a way to know when a key is physically pressed or released. Is there any way to know this or a code to disable this system's feature? Thanks.
Asked
Active
Viewed 39 times
0
-
did you try http://stackoverflow.com/questions/18037576/how-do-i-check-if-the-user-is-pressing-a-key – loli Sep 02 '15 at 03:25
-
@loli I didn't know those classes, but i tried that code and when I hold down the "w" key , `wPressed` changes its value from `true` to `false` continuously. I want to tell Java "hey i'm holding down w key so don't change `wPressed` until I release it", but the system makes as if I'm pressing and releasing the key continuously :-( – Hans GD Sep 10 '15 at 01:36