From 4185c2e905449ebcb067e4d7722acb86cb62041c Mon Sep 17 00:00:00 2001 From: Shigeru KANEMOTO Date: Wed, 13 Feb 2013 00:01:00 +0900 Subject: [PATCH] Fix: "Ctrl+," and "Ctrl+/" Linux and Windows: If you press "Ctrl+," to invoke the preferences dialog, the file on editor will be marked as "modified". This behavior fixed. Linux: If you press "Ctrl+/" to comment the line, the line will be replaced with a single "/" letter. This behavior fixed. --- app/src/processing/app/EditorListener.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/EditorListener.java b/app/src/processing/app/EditorListener.java index 12806b4ce..af0a106b5 100644 --- a/app/src/processing/app/EditorListener.java +++ b/app/src/processing/app/EditorListener.java @@ -128,6 +128,12 @@ public class EditorListener { event.consume(); // does nothing return false; } + + // The char is not control code when CTRL key pressed? It should be a shortcut. + if (c >= ' ') { + event.consume(); + return true; + } } if ((event.getModifiers() & KeyEvent.META_MASK) != 0) { @@ -480,8 +486,8 @@ public class EditorListener { char c = event.getKeyChar(); if ((event.getModifiers() & KeyEvent.CTRL_MASK) != 0) { - // on linux, ctrl-comma (prefs) being passed through to the editor - if (c == KeyEvent.VK_COMMA) { + // The char is not control code when CTRL key pressed? It should be a shortcut. + if (c >= ' ') { event.consume(); return true; }