Keyboard and Mouse at the same time - Canvas

Started by CalibeR.50, December 06, 2012, 09:37:46

Previous topic - Next topic

CalibeR.50

Hi,

I have a problem with the Keyboard in LWJGL. I want to listen to the keyboard by doing Keyboard.isKeyDown(). At the same time I want to listen to the mouse with Mouse.isButtonDown(). The Problem is, if I klick the .ouse while I press a Key, the Keyboard.isKeyDown() method returns false.

I use a Canvas to display.


Using the method of the tutorial in the wiki (link), I get the following debug output if I first press S, then press my mouse and after a while release the mouse and the key:

S Key Pressed
MOUSE DOWN @ X: 571 Y: 427
S Key Released
MOUSE DOWN @ X: 571 Y: 427
MOUSE DOWN @ X: 571 Y: 427
MOUSE DOWN @ X: 571 Y: 427
MOUSE DOWN @ X: 571 Y: 427
MOUSE DOWN @ X: 571 Y: 427
S Key Released


As you can see, once I press the mouse, the key state will change to not pressed. Keyboard.isKeyDown will also return false.


Is there any solution for this problem?

CalibeR.50

kappa

Its a bug in LWJGL 2.8.5 that has been fixed already, use latest nightly builds of LWJGL.