Let repeat events pass the same-state filter.

This commit is contained in:
Ioannis Tsakpinis 2012-08-23 14:20:58 +00:00
parent 9ffdd18a3f
commit 455b429984
2 changed files with 2 additions and 5 deletions

View File

@ -155,7 +155,7 @@ final class WindowsKeyboard {
}
public void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat) {
if ( isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
if ( !repeat && isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
return;
virt_key = translateExtended(virt_key, scan_code, event_state, extended);

View File

@ -202,10 +202,7 @@ public class KeyboardTest {
render();
try {
Thread.sleep(0);
} catch (Exception e) {
}
Display.sync(60);
}
}