Re: keyReleased keyPressed problem
Posted by
elect on
Oct 20, 2014; 2:54pm
URL: https://forum.jogamp.org/keyReleased-keyPressed-problem-tp4033288p4033420.html
Ok, I made it easily replicable ^^
https://github.com/elect86/KeyListenerScenarioif you press ctrl+o, the fileChooser opens and you release them, but since the glwindow doesnt have the focus anymore it wont get the release events.
Now comes the problem, the ctrl modifier gets screwed.
Indeed if you close the fileChooser and then press whatever character or modifier (BUT ctrl) you get the corresponding keyPressed and keyReleased.
Instead if you close the fileChooser and press the ctrl modifier you wont get the ctrl keyPressed at all, just the ctrl keyReleased. If you press it a second time this time will work, ctrl keyPressed and ctrl keyReleased.
It is like the focus lost frozes temporarily the next keyReleased of the same modifier used in the last key combination, in this case the ctrl button..