File tree 1 file changed +9
-0
lines changed
app/src/processing/app/syntax
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 30
30
31
31
package processing .app .syntax ;
32
32
33
+ import java .awt .event .KeyEvent ;
34
+ import javax .swing .KeyStroke ;
33
35
import org .apache .commons .compress .utils .IOUtils ;
34
36
import org .fife .ui .rsyntaxtextarea .*;
35
37
import org .fife .ui .rsyntaxtextarea .Token ;
@@ -72,6 +74,7 @@ public class SketchTextArea extends RSyntaxTextArea {
72
74
public SketchTextArea (PdeKeywords pdeKeywords ) throws IOException {
73
75
this .pdeKeywords = pdeKeywords ;
74
76
installFeatures ();
77
+ fixCtrlDeleteBehavior ();
75
78
}
76
79
77
80
public void setKeywords (PdeKeywords keywords ) {
@@ -389,4 +392,10 @@ private void stopScanningForLinks() {
389
392
protected RTextAreaUI createRTextAreaUI () {
390
393
return new SketchTextAreaUI (this );
391
394
}
395
+
396
+ private void fixCtrlDeleteBehavior () {
397
+ KeyStroke keyStroke = KeyStroke .getKeyStroke (KeyEvent .VK_DELETE ,
398
+ Toolkit .getDefaultToolkit ().getMenuShortcutKeyMask ());
399
+ getInputMap ().put (keyStroke , SketchTextAreaEditorKit .rtaDeleteNextWordAction );
400
+ }
392
401
}
You can’t perform that action at this time.
0 commit comments