From 606aaee668695e532ccd42dfc1653918befe477d Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Wed, 27 May 2015 12:07:26 +0200 Subject: [PATCH] Toogle comments even using the DIVIDE key on the keypad, so non US keyboard can use the shortcut. Fixes #431 and https://code.google.com/p/arduino/issues/detail?id=76 --- .../processing/app/syntax/SketchTextAreaDefaultInputMap.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java index 5d806f4c9..6957b622a 100644 --- a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java +++ b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java @@ -1,6 +1,7 @@ package processing.app.syntax; import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaDefaultInputMap; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit; import org.fife.ui.rtextarea.RTextArea; import org.fife.ui.rtextarea.RTextAreaEditorKit; import processing.app.PreferencesData; @@ -39,5 +40,7 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa remove(KeyStroke.getKeyStroke(KeyEvent.VK_J, defaultModifier)); } + + put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultModifier), RSyntaxTextAreaEditorKit.rstaToggleCommentAction); } }