mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
New editor on MacOSX: CMD+UP/DOWN moves cursor to start or end of sketch. See #3098
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user