Discard auto-repeated keys in P2D/P3D

This commit is contained in:
Jakub Valtar
2015-08-17 19:45:00 -04:00
parent 7137cd9701
commit 475e83fbdc
5 changed files with 46 additions and 5 deletions

View File

@@ -31,6 +31,8 @@ public class KeyEvent extends Event {
char key;
int keyCode;
boolean isAutoRepeat;
public KeyEvent(Object nativeObject,
long millis, int action, int modifiers,
@@ -41,6 +43,16 @@ public class KeyEvent extends Event {
this.keyCode = keyCode;
}
public KeyEvent(Object nativeObject,
long millis, int action, int modifiers,
char key, int keyCode, boolean isAutoRepeat) {
super(nativeObject, millis, action, modifiers);
this.flavor = KEY;
this.key = key;
this.keyCode = keyCode;
this.isAutoRepeat = isAutoRepeat;
}
public char getKey() {
return key;
@@ -50,4 +62,9 @@ public class KeyEvent extends Event {
public int getKeyCode() {
return keyCode;
}
public boolean isAutoRepeat() {
return isAutoRepeat;
}
}