Hello Guest

Keyboard

  • 2 Replies
  • 4233 Views
Keyboard
« on: November 14, 2015, 18:19:42 »
I have this code in my update():
Code: [Select]
if(Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState()){
System.out.println("true");

And I want it to print 1 time true. But it prints 4 times.
How can i solve this problem???

*

Offline abcdef

  • ****
  • 336
Re: Keyboard
« Reply #1 on: November 15, 2015, 12:39:40 »
Which version of LWJGL are you using? Sounds like you want to check if the key event is a repeat event or not.

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Keyboard
« Reply #2 on: November 15, 2015, 12:51:01 »
Question has been answered on JGO.