summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-rw-r--r--logic/shortcuts.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp
index 6d77c3e0..1ffecd3a 100644
--- a/logic/shortcuts.cpp
+++ b/logic/shortcuts.cpp
@@ -141,8 +141,11 @@ void Shortcuts::reload(const t_keys& keys_)
#ifndef _WIN32
const int idx = keys.size() - 1;
tt& kk_ = keys[idx];
- auto& fn = std::get<1>(kk_);
- connect(k, &QxtGlobalShortcut::activated, [=]() { fn(true); });
+ auto fn = std::get<1>(kk_);
+ connect(k, &QxtGlobalShortcut::activated, [=, fn = std::move(fn)](bool keydown) {
+ if (keydown || !held)
+ fn(keydown);
+ });
#endif
}
}