mirror of
https://github.com/arduino/Arduino.git
synced 2025-04-07 23:53:50 +02: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 processing.app.PreferencesData;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import javax.swing.text.DefaultEditorKit;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
@ -32,6 +33,8 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa
|
|||||||
|
|
||||||
if (isOSX) {
|
if (isOSX) {
|
||||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, defaultModifier), SketchTextAreaEditorKit.rtaDeleteLineToCursorAction);
|
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…
x
Reference in New Issue
Block a user