Reputation: 1221
I know how the KeyListener works, however the problem is that the abstract method KeyPressed doesn't works as I expect. Instead of calling the function each key press, calls the function all the time the key is being pressed. Is it possible to handle only when I press the key and not when its being pressed?
Upvotes: 0
Views: 157
Reputation: 12453
Implement KeyListener and override keyPressed. Set a value that is kept until keyReleased is invoked.
Upvotes: 2