summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/options-dialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 4cff6e77..9631d41e 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -15,7 +15,15 @@
static QString kopts_to_string(const Shortcuts::key_opts& kopts)
{
if (static_cast<QString>(kopts.guid) != "")
- return "Joystick button " + QString::number(kopts.button);
+ {
+ const int btn = kopts.button & ~Qt::KeyboardModifierMask;
+ const int mods = kopts.button & Qt::KeyboardModifierMask;
+ QString mm;
+ if (mods & Qt::ControlModifier) mm += "Control+";
+ if (mods & Qt::AltModifier) mm += "Alt+";
+ if (mods & Qt::ShiftModifier) mm += "Shift+";
+ return mm + "Joy button " + QString::number(btn);
+ }
if (static_cast<QString>(kopts.keycode) == "")
return "None";
return kopts.keycode;