Skip to content

Commit 2fde40f

Browse files
author
Federico Fissore
committed
changed test to Character.isISOControl
1 parent 4185c2e commit 2fde40f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/processing/app/EditorListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public boolean keyPressed(KeyEvent event) {
130130
}
131131

132132
// The char is not control code when CTRL key pressed? It should be a shortcut.
133-
if (c >= ' ') {
133+
if (!Character.isISOControl(c)) {
134134
event.consume();
135135
return true;
136136
}
@@ -487,7 +487,7 @@ public boolean keyTyped(KeyEvent event) {
487487

488488
if ((event.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
489489
// The char is not control code when CTRL key pressed? It should be a shortcut.
490-
if (c >= ' ') {
490+
if (!Character.isISOControl(c)) {
491491
event.consume();
492492
return true;
493493
}

0 commit comments

Comments
 (0)