Skip to content

Commit

Permalink
shortcut: ctrl+w to close (closed cutefishos#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Nov 30, 2021
1 parent ad3407a commit 1ebf0a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helper/shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "shortcut.h"
#include "keyboardsearchmanager.h"

#include <QApplication>
#include <QKeyEvent>

ShortCut::ShortCut(QObject *parent)
Expand Down Expand Up @@ -70,6 +71,8 @@ bool ShortCut::eventFilter(QObject *obj, QEvent *e)
emit refresh();
} else if (keyEvent->key() == Qt::Key_H && keyEvent->modifiers() & Qt::ControlModifier) {
emit showHidden();
} else if (keyEvent->key() == Qt::Key_W && keyEvent->modifiers() & Qt::ControlModifier) {
QApplication::quit();
} else if (keyEvent->key() >= Qt::Key_A && keyEvent->key() <= Qt::Key_Z) {
// Handle select
// KeyboardSearchManager::self()->addKeys(keyEvent->text());
Expand Down

0 comments on commit 1ebf0a9

Please sign in to comment.