LWJGL Forum

Programming => OpenGL => Topic started by: Yuri6037 on October 29, 2013, 16:37:51

Title: Keyboard not working WTF ?
Post by: Yuri6037 on October 29, 2013, 16:37:51
When I use Keyboard.isKeyDown(a key number), I get all the time false never true, and if I press the key I get false ! Don't understand why ?
Is this a bug ?

In plus the Mouse works perfectly the bug is only touching Keyboard !

EDIT : Only happens when use this code :
--PRIVATE--

EDIT 2 : It's precisely the Function Keyboard.getEventCharacter wich return always '\u0000' (null character), it never returns the character that is typed !
Title: Re: Keyboard not working WTF ?
Post by: kappa on October 29, 2013, 16:59:50
That is the incorrect way to poll the Keyboard with LWJGL.

I suggest that you have a read of the Input Tutorial on the LWJGL Wiki (http://www.lwjgl.org/wiki/index.php?title=LWJGL_Basics_2_%28Input%29) to learn how to poll the keyboard with LWJGL (in particular read the Event Buffer section).
Title: Re: Keyboard not working WTF ?
Post by: Yuri6037 on October 29, 2013, 17:22:15
Not functioning the function Keyboard.getEventCharacter or Keyboard.getEventKey are always returning null character !
Title: Re: Keyboard not working WTF ?
Post by: Yuri6037 on October 29, 2013, 17:46:11
FIXED !
AND IT'S NOT WITH LWJGL RECOMENDED CODE !