summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-25 11:28:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-25 14:19:59 +0100
commit595a9399a570e691a414aeeec69625bc82ac42db (patch)
tree055f9f0f9bdfecf38f9260cc8a723d78775850ba /gui
parent2826e614fb63448bf5801126e985cc53c1e11b8e (diff)
gui/keyboard: drop modifier keys
For Linux.
Diffstat (limited to 'gui')
-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;