@@ -169,9 +169,6 @@ public boolean test(SketchController controller) {
169
169
/** Command-Option on Mac OS X, Ctrl-Alt on Windows and Linux */
170
170
static final int SHORTCUT_ALT_KEY_MASK = ActionEvent .ALT_MASK |
171
171
Toolkit .getDefaultToolkit ().getMenuShortcutKeyMask ();
172
- /** Command-Option on Mac OS X, Ctrl-Shift on Windows and Linux */
173
- static final int SHORTCUT_SHIFT_KEY_MASK = ActionEvent .SHIFT_MASK |
174
- Toolkit .getDefaultToolkit ().getMenuShortcutKeyMask ();
175
172
176
173
/**
177
174
* true if this file has not yet been given a name by the user
@@ -673,22 +670,9 @@ private void buildSketchMenu(JMenu sketchMenu) {
673
670
item .addActionListener (event -> handleExport (false ));
674
671
sketchMenu .add (item );
675
672
676
- // Since CTRL+SHIFT+U is not working on iBus keyboard input method
677
- // Lets redirect the shorcut for Linux to CTRL+ALT+U
678
- // Leaving the preexisting behaviour for Windows & Mac OS
679
- String OS = System .getProperty ("os.name" ).toLowerCase ();
680
- if (OS .indexOf ("nix" ) >= 0 || OS .indexOf ("nux" ) >= 0 || OS .indexOf ("aix" ) > 0 )
681
- {
682
- item = newJMenuItemAlt (tr ("Upload Using Programmer" ), 'U' );
683
- item .addActionListener (event -> handleExport (true ));
684
- sketchMenu .add (item );
685
- }
686
- else
687
- {
688
- item = newJMenuItemShift (tr ("Upload Using Programmer" ), 'U' );
689
- item .addActionListener (event -> handleExport (true ));
690
- sketchMenu .add (item );
691
- }
673
+ item = newJMenuItemShift (tr ("Upload Using Programmer" ), 'U' );
674
+ item .addActionListener (event -> handleExport (true ));
675
+ sketchMenu .add (item );
692
676
693
677
item = newJMenuItemAlt (tr ("Export compiled Binary" ), 'S' );
694
678
item .addActionListener (event -> {
@@ -1366,7 +1350,7 @@ static public JMenuItem newJMenuItem(String title, int what) {
1366
1350
// Control + Shift + K seems to not be working on linux (Xubuntu 17.04, 2017-08-19)
1367
1351
static public JMenuItem newJMenuItemShift (String title , int what ) {
1368
1352
JMenuItem menuItem = new JMenuItem (title );
1369
- menuItem .setAccelerator (KeyStroke .getKeyStroke (what , SHORTCUT_SHIFT_KEY_MASK ));
1353
+ menuItem .setAccelerator (KeyStroke .getKeyStroke (what , SHORTCUT_KEY_MASK | ActionEvent . SHIFT_MASK ));
1370
1354
return menuItem ;
1371
1355
}
1372
1356
0 commit comments