LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Jakibah on November 14, 2015, 18:19:42

Title: Keyboard
Post by: Jakibah on November 14, 2015, 18:19:42
I have this code in my update():
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???
Title: Re: Keyboard
Post by: abcdef 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.
Title: Re: Keyboard
Post by: quew8 on November 15, 2015, 12:51:01
Question has been answered on JGO.