summaryrefslogtreecommitdiffhomepage
path: root/opentrack/shortcuts.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-11-11 15:28:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-11-11 15:28:50 +0100
commitc8805112acca1ba3bd0056fcf0b9332c4ba10f03 (patch)
tree1c7e3f7fdb2feebba1664eea5f2a64dbfbd4db7f /opentrack/shortcuts.cpp
parente79ab73d99d3cc19e0db82cce8884589e0e93396 (diff)
shortcuts: alloy kbd mods for joystick buttons
Diffstat (limited to 'opentrack/shortcuts.cpp')
-rw-r--r--opentrack/shortcuts.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp
index 108b6b3b..6eab6071 100644
--- a/opentrack/shortcuts.cpp
+++ b/opentrack/shortcuts.cpp
@@ -38,7 +38,10 @@ void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k)
if (k.guid != "")
{
key.guid = k.guid;
- key.keycode = k.button;
+ key.keycode = k.button & ~Qt::KeyboardModifierMask;
+ key.ctrl = !!(k.button & Qt::ControlModifier);
+ key.alt = !!(k.button & Qt::AltModifier);
+ key.shift = !!(k.button & Qt::ShiftModifier);
}
else
{