diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:02:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:18:31 +0200 |
commit | 2dd8064c20d88c26a11240c6a871f670b5109d71 (patch) | |
tree | a6aa04113adc5837f02548464766b9291ecab89a /opentrack-logic/shortcuts.h | |
parent | 2eccd41897d6794a80b3ed2fcaaded85c453d46d (diff) |
logic, gui: reload keybinding description on profile change
Diffstat (limited to 'opentrack-logic/shortcuts.h')
-rw-r--r-- | opentrack-logic/shortcuts.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/opentrack-logic/shortcuts.h b/opentrack-logic/shortcuts.h index 87e24d4f..d6a87672 100644 --- a/opentrack-logic/shortcuts.h +++ b/opentrack-logic/shortcuts.h @@ -45,6 +45,8 @@ public: using fun = std::function<void(bool)>; using tt = std::tuple<K, fun, bool>; + using t_key = std::tuple<key_opts&, fun, bool>; + using t_keys = std::vector<t_key>; std::vector<tt> keys; #ifdef _WIN32 KeybindingWorker::Token key_token; @@ -56,10 +58,10 @@ public: #endif {} - void reload(const std::vector<std::tuple<key_opts&, fun, bool>> &keys_); + void reload(const t_keys& keys_); private: void free_binding(K& key); - void bind_keyboard_shortcut(K &key, const key_opts& k, bool held); + void bind_shortcut(K &key, const key_opts& k, bool held); #ifdef _WIN32 void receiver(const Key& k); #endif |