1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

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.
This commit is contained in:
Shigeru KANEMOTO 2013-02-13 00:01:00 +09:00 committed by Federico Fissore
parent 6a59764e0b
commit 4185c2e905

View File

@ -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;
}