summaryrefslogtreecommitdiffhomepage
path: root/opentrack/win32-shortcuts.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-25 16:43:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-25 16:43:31 +0100
commit7be318b0ed09705bfbc62adc25c8b1a399b1f656 (patch)
tree16caf53a360357d252f2f2152d0a5947440b7038 /opentrack/win32-shortcuts.cpp
parent1ad391151314daf4ba689f3cc684c0a2d836e3a7 (diff)
win32: try win_key with modifier first
Diffstat (limited to 'opentrack/win32-shortcuts.cpp')
-rw-r--r--opentrack/win32-shortcuts.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/opentrack/win32-shortcuts.cpp b/opentrack/win32-shortcuts.cpp
index 1f1d51a4..a0ed51b3 100644
--- a/opentrack/win32-shortcuts.cpp
+++ b/opentrack/win32-shortcuts.cpp
@@ -166,16 +166,27 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods)
auto our_mods = qt & Qt::KeyboardModifierMask;
{
+ const auto key_ = qt;
+ for (auto& wk : windows_key_sequences)
+ {
+ if (wk.qt == key_)
+ {
+ dik = wk.win;
+ mods = Qt::NoModifier;
+ return true;
+ }
+ }
}
-
- const auto key = qt & ~Qt::KeyboardModifierMask;
- for (auto& wk : windows_key_sequences)
{
- if (wk.qt == key)
+ const auto key = qt & ~Qt::KeyboardModifierMask;
+ for (auto& wk : windows_key_sequences)
{
- dik = wk.win;
- mods = static_cast<Qt::KeyboardModifiers>(our_mods);
- return true;
+ if (wk.qt == key)
+ {
+ dik = wk.win;
+ mods = static_cast<Qt::KeyboardModifiers>(our_mods);
+ return true;
+ }
}
}
return false;