mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Merge pull request #3239 from ffissore/macosx-select-line
MacOSX: CMD+SHIFT-LEFT/RIGHT selects the entire line. Fixes #3238
This commit is contained in:
commit
0956f5da25
@ -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,10 +39,16 @@ 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);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, defaultModifier), RSyntaxTextAreaEditorKit.rstaDecreaseIndentAction);
|
||||
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, defaultModifier | shift), DefaultEditorKit.selectionBeginAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, defaultModifier | shift), DefaultEditorKit.selectionEndAction);
|
||||
}
|
||||
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultModifier), RSyntaxTextAreaEditorKit.rstaToggleCommentAction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user