diff --git a/data/widgets/select_accelerator.xml b/data/widgets/select_accelerator.xml
index 4ebe709e8..287b511d3 100644
--- a/data/widgets/select_accelerator.xml
+++ b/data/widgets/select_accelerator.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/src/app/ui/select_accelerator.cpp b/src/app/ui/select_accelerator.cpp
index ff6be37d1..1c5023da1 100644
--- a/src/app/ui/select_accelerator.cpp
+++ b/src/app/ui/select_accelerator.cpp
@@ -95,7 +95,7 @@ SelectAccelerator::SelectAccelerator(const ui::Accelerator& accel, KeyContext ke
ctrl()->Click.connect(base::Bind(&SelectAccelerator::onModifierChange, this, kKeyCtrlModifier, ctrl()));
shift()->Click.connect(base::Bind(&SelectAccelerator::onModifierChange, this, kKeyShiftModifier, shift()));
space()->Click.connect(base::Bind(&SelectAccelerator::onModifierChange, this, kKeySpaceModifier, space()));
- windows()->Click.connect(base::Bind(&SelectAccelerator::onModifierChange, this, kKeyWinModifier, windows()));
+ win()->Click.connect(base::Bind(&SelectAccelerator::onModifierChange, this, kKeyWinModifier, win()));
m_keyField->AccelChange.connect(&SelectAccelerator::onAccelChange, this);
clearButton()->Click.connect(base::Bind(&SelectAccelerator::onClear, this));
@@ -157,10 +157,13 @@ void SelectAccelerator::updateModifiers()
shift()->setSelected(m_accel.modifiers() & kKeyShiftModifier ? true: false);
space()->setSelected(m_accel.modifiers() & kKeySpaceModifier ? true: false);
#if __APPLE__
- windows()->setVisible(false);
+ win()->setVisible(false);
cmd()->setSelected(m_accel.modifiers() & kKeyCmdModifier ? true: false);
#else
- windows()->setSelected(m_accel.modifiers() & kKeyWinModifier ? true: false);
+ #if __linux__
+ win()->setText(winKeyName);
+ #endif
+ win()->setSelected(m_accel.modifiers() & kKeyWinModifier ? true: false);
cmd()->setVisible(false);
#endif
}
diff --git a/src/ui/accelerator.cpp b/src/ui/accelerator.cpp
index a27da0753..47900da18 100644
--- a/src/ui/accelerator.cpp
+++ b/src/ui/accelerator.cpp
@@ -91,7 +91,7 @@ Accelerator::Accelerator(const std::string& str)
else if (tok == "cmd") {
m_modifiers = (KeyModifiers)((int)m_modifiers | (int)kKeyCmdModifier);
}
- else if (tok == "windows") {
+ else if (tok == base::string_to_lower(winKeyName)) {
m_modifiers = (KeyModifiers)((int)m_modifiers | (int)kKeyWinModifier);
}
@@ -352,7 +352,7 @@ std::string Accelerator::toString() const
if (m_modifiers & kKeyAltModifier) buf += "Alt+";
if (m_modifiers & kKeyShiftModifier) buf += "Shift+";
if (m_modifiers & kKeySpaceModifier) buf += "Space+";
- if (m_modifiers & kKeyWinModifier) buf += "Windows+";
+ if (m_modifiers & kKeyWinModifier) { buf += winKeyName; buf += "+"; }
// Key
if (m_unicodeChar) {
diff --git a/src/ui/accelerator.h b/src/ui/accelerator.h
index 4e7f255d3..1ae41d2ea 100644
--- a/src/ui/accelerator.h
+++ b/src/ui/accelerator.h
@@ -15,6 +15,12 @@
namespace ui {
+#ifdef _WIN32
+ const std::string winKeyName = "Win";
+#else
+ const std::string winKeyName = "Super";
+#endif
+
class Accelerator {
public:
Accelerator();