From 7ed453de4a77266e7e29f2f944b285b4fe3b248b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 15 May 2016 12:30:35 +0200 Subject: api,gui: disable all keyboard shortcuts while binding a key Previous disallowed binding an already-bound key on Unix since Qxt doesn't pass through bound keys unlike the Windows implementation. Refactor some common code. The Windows implementation isn't even compile-tested. --- opentrack/keybinding-worker.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opentrack/keybinding-worker.hpp') diff --git a/opentrack/keybinding-worker.hpp b/opentrack/keybinding-worker.hpp index fa50a974..19db0fa9 100644 --- a/opentrack/keybinding-worker.hpp +++ b/opentrack/keybinding-worker.hpp @@ -34,9 +34,10 @@ struct Key { bool ctrl; bool alt; bool held; + bool enabled; Timer timer; public: - Key() : keycode(0), shift(false), ctrl(false), alt(false), held(true) {} + Key() : keycode(0), shift(false), ctrl(false), alt(false), held(true), enabled(true) {} bool should_process(); }; -- cgit v1.2.3