diff options
Diffstat (limited to 'gui/keyboard.h')
-rw-r--r-- | gui/keyboard.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/keyboard.h b/gui/keyboard.h index 0a06a3af..ea35d372 100644 --- a/gui/keyboard.h +++ b/gui/keyboard.h @@ -22,13 +22,17 @@ class OTR_GUI_EXPORT keyboard_listener : public QDialog { Q_OBJECT - Ui_keyboard_listener ui; + #ifdef _WIN32 - auto make_token(); - KeybindingWorker::Token token; + void receive_key(const Key& k); + + KeybindingWorker::Token token{[this](const Key& k) {receive_key(k);}}; #else void keyPressEvent(QKeyEvent* event) override; #endif + + Ui_keyboard_listener ui; + public: keyboard_listener(QWidget* parent = nullptr); signals: |