mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
New editor on MacOSX: CMD+UP/DOWN moves cursor to start or end of sketch. See #3098
This commit is contained in:
parent
176d366549
commit
5c7a0aa572
@ -6,6 +6,7 @@ import org.fife.ui.rtextarea.RTextAreaEditorKit;
|
||||
import processing.app.PreferencesData;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.DefaultEditorKit;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
@ -32,6 +33,8 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa
|
||||
|
||||
if (isOSX) {
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, defaultModifier), SketchTextAreaEditorKit.rtaDeleteLineToCursorAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, defaultModifier), DefaultEditorKit.beginAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, defaultModifier), DefaultEditorKit.endAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user