diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-11 15:28:50 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-11 15:28:50 +0100 |
commit | c8805112acca1ba3bd0056fcf0b9332c4ba10f03 (patch) | |
tree | 1c7e3f7fdb2feebba1664eea5f2a64dbfbd4db7f /gui/keyboard.h | |
parent | e79ab73d99d3cc19e0db82cce8884589e0e93396 (diff) |
shortcuts: alloy kbd mods for joystick buttons
Diffstat (limited to 'gui/keyboard.h')
-rw-r--r-- | gui/keyboard.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/keyboard.h b/gui/keyboard.h index b840bc78..75226aa3 100644 --- a/gui/keyboard.h +++ b/gui/keyboard.h @@ -22,7 +22,11 @@ public: { if(k.guid != "") { - joystick_button_pressed(k.guid, k.keycode, k.held); + int mods = 0; + if (k.alt) mods |= Qt::AltModifier; + if (k.shift) mods |= Qt::ShiftModifier; + if (k.ctrl) mods |= Qt::ControlModifier; + joystick_button_pressed(k.guid, k.keycode | mods, k.held); } else { |