mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Merge pull request #3229 from ffissore/indent-with-tab-no-brackets
Stop using [ and ] as indentation menu accelerators
This commit is contained in:
commit
7d6518f68e
@ -1420,7 +1420,8 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
});
|
||||
menu.add(commentItem);
|
||||
|
||||
JMenuItem increaseIndentItem = newJMenuItem(_("Increase Indent"), ']');
|
||||
JMenuItem increaseIndentItem = new JMenuItem(_("Increase Indent"));
|
||||
increaseIndentItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
|
||||
increaseIndentItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleIndentOutdent(true);
|
||||
@ -1428,7 +1429,8 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
});
|
||||
menu.add(increaseIndentItem);
|
||||
|
||||
JMenuItem decreseIndentItem = newJMenuItem(_("Decrease Indent"), '[');
|
||||
JMenuItem decreseIndentItem = new JMenuItem(_("Decrease Indent"));
|
||||
decreseIndentItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
|
||||
decreseIndentItem.setName("menuDecreaseIndent");
|
||||
decreseIndentItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
@ -39,6 +39,9 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, defaultModifier), DefaultEditorKit.endAction);
|
||||
|
||||
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_DIVIDE, defaultModifier), RSyntaxTextAreaEditorKit.rstaToggleCommentAction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user