Bug In NEWT KeyListener

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug In NEWT KeyListener

Borok
I  am implementing the NEWT KeyListener and I have a problem where the keyReleased method is triggered even though there was no key release. It happens on all computers I run my program on.
Reply | Threaded
Open this post in threaded view
|

Re: Bug In NEWT KeyListener

gouessej
Administrator
Hi

It's not a bug, AWT has the same behaviour, the operating system can "auto repeat" events. Unlike AWT, NEWT allows you to make the distinction between "real" events and auto repeat events, just call KeyEvent.isAutoRepeat():
https://github.com/sgothel/jogl/blob/master/src/newt/classes/com/jogamp/newt/event/InputEvent.java#L124

Please don't be peremptory when claiming that there is a bug, a simple look at our Java documentation and/or our source code would have been enough to clarify that.
Julien Gouesse | Personal blog | Website