Hello Guest

Keyboard not working WTF ?

  • 3 Replies
  • 5109 Views
*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Keyboard not working WTF ?
« 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 !
« Last Edit: October 29, 2013, 17:46:45 by Yuri6037 »

*

Offline kappa

  • *****
  • 1319
Re: Keyboard not working WTF ?
« Reply #1 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 to learn how to poll the keyboard with LWJGL (in particular read the Event Buffer section).

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Keyboard not working WTF ?
« Reply #2 on: October 29, 2013, 17:22:15 »
Not functioning the function Keyboard.getEventCharacter or Keyboard.getEventKey are always returning null character !

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Keyboard not working WTF ?
« Reply #3 on: October 29, 2013, 17:46:11 »
FIXED !
AND IT'S NOT WITH LWJGL RECOMENDED CODE !