From 1a82604b4e545021f7b00af2efa8064cc77772ee Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 19 Aug 2015 17:31:53 -0400 Subject: [PATCH] FX - Fix key typed --- core/src/processing/javafx/PSurfaceFX.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/processing/javafx/PSurfaceFX.java b/core/src/processing/javafx/PSurfaceFX.java index 4d93b6ae6..2c3ba1b87 100644 --- a/core/src/processing/javafx/PSurfaceFX.java +++ b/core/src/processing/javafx/PSurfaceFX.java @@ -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,