From 595a9399a570e691a414aeeec69625bc82ac42db Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Feb 2017 11:28:08 +0100 Subject: gui/keyboard: drop modifier keys For Linux. --- gui/keyboard.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/keyboard.h b/gui/keyboard.h index 58d4e674..690bd651 100644 --- a/gui/keyboard.h +++ b/gui/keyboard.h @@ -43,9 +43,20 @@ public: #ifndef _WIN32 void keyPressEvent(QKeyEvent* event) override { - //qDebug() << "k" << (event->key() | event->modifiers()); - switch (event->key() | event->modifiers()) + switch (event->key()) { + case Qt::Key_Control: + case Qt::Key_Shift: + case Qt::Key_Meta: + case Qt::Key_Alt: + case Qt::Key_AltGr: + case Qt::Key_CapsLock: + case Qt::Key_NumLock: + break; + case Qt::Key_Escape: + close(); + break; + default: emit key_pressed(QKeySequence(event->key() | event->modifiers())); break; -- cgit v1.2.3