From c8805112acca1ba3bd0056fcf0b9332c4ba10f03 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 11 Nov 2015 15:28:50 +0100 Subject: shortcuts: alloy kbd mods for joystick buttons --- opentrack/shortcuts.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'opentrack/shortcuts.cpp') 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 { -- cgit v1.2.3