stuck keys

Started by rasherb2, April 28, 2008, 01:42:39

Previous topic - Next topic

rasherb2

Hi,
I'm having a problem with LWJGL 2.0b. If I am reading input using Keyboard's isKeyDown() method and I move away from the windows (by using alt-tab, or clicking) whatever key is being pressed at the time will remain pressed when the window comes back into focus, even if it is not actually pressed. This is especially troublesome when using alt-tab as alt will always stick.

I'm not sure if this is a problem with the way I'm doing things or with LWJGL or if it's supposed to be that way. Any help is appreciated. I'm using Ubuntu, I haven't tested this on any other OS yet.

Thanks,
rasher

Bastoche

I'm having the same problem with LWJGL 2.1 on Windows XP.
If I press a key and click outside my applet so it looses focus, the isKeyDown method tells me that the key is still down event though I release it.

Is there any workaround not involving disabling inputs when loosing focus ?

Thanks,
Bastoche