summaryrefslogtreecommitdiffhomepage
path: root/opentrack/shortcuts.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-29 12:25:27 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-29 12:25:27 +0100
commite7d57ba055627e6b6c8f6de61a497894e0caa658 (patch)
tree1ffe7924840380d3404e2a80d31623428925f5ec /opentrack/shortcuts.h
parent8a87e1a658f04eaffa10da30f019a64902f8d917 (diff)
implement zero shortcut
Diffstat (limited to 'opentrack/shortcuts.h')
-rw-r--r--opentrack/shortcuts.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h
index 541d7699..7f5f9f1f 100644
--- a/opentrack/shortcuts.h
+++ b/opentrack/shortcuts.h
@@ -69,16 +69,17 @@ private:
LPDIRECTINPUTDEVICE8 dinkeyboard;
Key kCenter;
Key kToggle;
+ Key kZero;
QMutex mtx;
public:
volatile bool should_quit;
~KeybindingWorker();
- KeybindingWorker(Key keyCenter, Key keyToggle, WId handle, Shortcuts& sc);
+ KeybindingWorker(Key keyCenter, Key keyToggle, Key keyZero, WId handle, Shortcuts& sc);
void run();
- void set_keys(Key kCenter, Key kToggle);
+ void set_keys(Key kCenter, Key kToggle, Key kZero);
#else
public:
- KeybindingWorker(Key, Key, WId) {}
+ KeybindingWorker(Key, Key, Key, WId) {}
void run() {}
#endif
};
@@ -97,6 +98,7 @@ public:
K keyCenter;
K keyToggle;
+ K keyZero;
WId handle;
#ifdef _WIN32
@@ -105,12 +107,13 @@ public:
struct settings {
pbundle b;
- key_opts center, toggle;
+ key_opts center, toggle, zero;
main_settings s_main;
settings() :
b(bundle("keyboard-shortcuts")),
center(b, "center"),
toggle(b, "toggle"),
+ zero(b, "zero"),
s_main(bundle("opentrack-ui"))
{}
} s;
@@ -123,6 +126,7 @@ private:
signals:
void center();
void toggle();
+ void zero();
};
class KeyboardShortcutDialog: public QWidget