From dcbc8e21371353753d762374d303e6f2c2056e5c Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Wed, 27 May 2015 14:59:56 +0200 Subject: [PATCH] MacOSX: CMD+SHIFT-LEFT/RIGHT selects the entire line. Fixes #3238 --- .../processing/app/syntax/SketchTextAreaDefaultInputMap.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java index 6a6da5d3a..38a69f6d9 100644 --- a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java +++ b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java @@ -16,6 +16,7 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa public SketchTextAreaDefaultInputMap() { int defaultModifier = getDefaultModifier(); int alt = InputEvent.ALT_MASK; + int shift = InputEvent.SHIFT_MASK; boolean isOSX = RTextArea.isOSX(); int moveByWordMod = isOSX ? alt : defaultModifier; @@ -38,6 +39,9 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, defaultModifier), DefaultEditorKit.beginAction); put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, defaultModifier), DefaultEditorKit.endAction); + put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, defaultModifier | shift), DefaultEditorKit.selectLineAction); + put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, defaultModifier | shift), DefaultEditorKit.selectLineAction); + remove(KeyStroke.getKeyStroke(KeyEvent.VK_J, defaultModifier)); put(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, defaultModifier), DefaultEditorKit.insertTabAction);