Skip to content

Commit 2c52068

Browse files
committed
Revert "Ctrl-shift-U does not work work when editor is focused arduino#9895"
This reverts commit 15fc84e.
1 parent fbb07bb commit 2c52068

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

app/src/processing/app/Editor.java

+4-20
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ public boolean test(SketchController controller) {
169169
/** Command-Option on Mac OS X, Ctrl-Alt on Windows and Linux */
170170
static final int SHORTCUT_ALT_KEY_MASK = ActionEvent.ALT_MASK |
171171
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();
175172

176173
/**
177174
* true if this file has not yet been given a name by the user
@@ -673,22 +670,9 @@ private void buildSketchMenu(JMenu sketchMenu) {
673670
item.addActionListener(event -> handleExport(false));
674671
sketchMenu.add(item);
675672

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);
692676

693677
item = newJMenuItemAlt(tr("Export compiled Binary"), 'S');
694678
item.addActionListener(event -> {
@@ -1366,7 +1350,7 @@ static public JMenuItem newJMenuItem(String title, int what) {
13661350
// Control + Shift + K seems to not be working on linux (Xubuntu 17.04, 2017-08-19)
13671351
static public JMenuItem newJMenuItemShift(String title, int what) {
13681352
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));
13701354
return menuItem;
13711355
}
13721356

0 commit comments

Comments
 (0)