File tree 1 file changed +4
-2
lines changed
app/src/processing/app/syntax
1 file changed +4
-2
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 .InputEvent ;
33
34
import java .awt .event .KeyEvent ;
34
35
import javax .swing .KeyStroke ;
35
36
import org .apache .commons .compress .utils .IOUtils ;
58
59
import java .net .URL ;
59
60
import java .util .Map ;
60
61
import java .util .logging .Logger ;
62
+ import processing .app .helpers .OSUtils ;
61
63
62
64
/**
63
65
* Arduino Sketch code editor based on RSyntaxTextArea (http://fifesoft.com/rsyntaxtextarea)
@@ -394,8 +396,8 @@ protected RTextAreaUI createRTextAreaUI() {
394
396
}
395
397
396
398
private void fixCtrlDeleteBehavior () {
397
- KeyStroke keyStroke = KeyStroke . getKeyStroke ( KeyEvent . VK_DELETE ,
398
- Toolkit . getDefaultToolkit (). getMenuShortcutKeyMask () );
399
+ int modifier = OSUtils . isMacOS ()? InputEvent . ALT_MASK : InputEvent . CTRL_MASK ;
400
+ KeyStroke keyStroke = KeyStroke . getKeyStroke ( KeyEvent . VK_DELETE , modifier );
399
401
getInputMap ().put (keyStroke , SketchTextAreaEditorKit .rtaDeleteNextWordAction );
400
402
}
401
403
}
You can’t perform that action at this time.
0 commit comments