1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-26 20:54:22 +01:00

OS recognition using helpers

This commit is contained in:
yzykov 2020-04-26 19:11:03 -07:00
parent 800816379e
commit 1ab1651bbe

View File

@ -676,8 +676,7 @@ public class Editor extends JFrame implements RunnerListener {
// Since CTRL+SHIFT+U is not working on iBus keyboard input method // Since CTRL+SHIFT+U is not working on iBus keyboard input method
// Lets redirect the shorcut for Linux to CTRL+ALT+U // Lets redirect the shorcut for Linux to CTRL+ALT+U
// Leaving the preexisting behaviour for Windows & Mac OS // Leaving the preexisting behaviour for Windows & Mac OS
String OS = System.getProperty("os.name").toLowerCase(); if (OSUtils.isLinux()) {
if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") >= 0){
item = newJMenuItemAlt(tr("Upload Using Programmer"), 'U'); item = newJMenuItemAlt(tr("Upload Using Programmer"), 'U');
} else { } else {
item = newJMenuItemShift(tr("Upload Using Programmer"), 'U'); item = newJMenuItemShift(tr("Upload Using Programmer"), 'U');