mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
FX - fix AIOOBE when pressing ESC on Mac
This commit is contained in:
@@ -733,7 +733,9 @@ public class PSurfaceFX implements PSurface {
|
||||
@SuppressWarnings("deprecation")
|
||||
private char getKeyChar(KeyEvent fxEvent) {
|
||||
if (fxEvent.getEventType() == KeyEvent.KEY_TYPED) {
|
||||
return fxEvent.getCharacter().charAt(0);
|
||||
String ch = fxEvent.getCharacter();
|
||||
if (ch.length() < 1) return PConstants.CODED;
|
||||
return ch.charAt(0);
|
||||
}
|
||||
|
||||
KeyCode kc = fxEvent.getCode();
|
||||
|
||||
Reference in New Issue
Block a user