summaryrefslogtreecommitdiffhomepage
path: root/gui/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/keyboard.h')
-rw-r--r--gui/keyboard.h15
1 files changed, 13 insertions, 2 deletions
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;