FX - Fix key typed

This commit is contained in:
Jakub Valtar
2015-08-19 17:31:53 -04:00
parent 76856d3e8c
commit 1a82604b4e
+6 -1
View File
@@ -708,7 +708,12 @@ public class PSurfaceFX implements PSurface {
long when = System.currentTimeMillis();
KeyCode kc = fxEvent.getCode();
// Are they f*ing serious?
char key = kc.impl_getChar().charAt(0);
char key;
if (et == KeyEvent.KEY_TYPED) {
key = fxEvent.getCharacter().charAt(0);
} else {
key = kc.impl_getChar().charAt(0);
}
int keyCode = kc.impl_getCode();
sketch.postEvent(new processing.event.KeyEvent(fxEvent, when,
action, modifiers,