Curiouser and curiouser, it
might be the case that this is someone else's problem.
I've pared it down to this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| public class KeyboardTest { private static boolean weirdKeyboardRepeatPlease = true;
public static void main( String[] args ) { Display.setVSyncEnabled( weirdKeyboardRepeatPlease )
try { Display.create();
while( !Display.isCloseRequested() ) { Display.update(); while( Keyboard.next() ) { System.out.println( "Checking key:" + Keyboard.getKeyName( Keyboard.getEventKey() ) ); System.out.println( "Pressed:" + Keyboard.getEventKeyState() ); } } } catch( Exception e ) { e.printStackTrace(); } } } |
When the flag is true, this will consistently display the odd key repeat behaviour within about ten seconds of holding a key down. When the flag is false, it behaves as expected.
Can anyone repeat this oddity, or am I loosing it?
edit: Just tested, and it doesn't matter if vsync is enabled before or after Display.create(). When vsync is enabled, I get the odd key repeat behaviour. Time to test in Windows methinks...
edit2: Everything works fine on windows.
edit3: It happens in both fullscreen and windowed modes