summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 2f85571..544efd3 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -83,10 +83,18 @@ QtChatWindow::~QtChatWindow() {
void QtChatWindow::handleKeyPressEvent(QKeyEvent* event) {
int key = event->key();
Qt::KeyboardModifiers modifiers = event->modifiers();
- if (
- (key == Qt::Key_W && modifiers == Qt::ControlModifier)
- ) {
+ if (key == Qt::Key_W && modifiers == Qt::ControlModifier) {
close();
+ } else if (
+ (key == Qt::Key_PageUp && modifiers == Qt::ControlModifier)
+ || (key == Qt::Key_Left && modifiers == (Qt::ControlModifier & Qt::ShiftModifier))
+ ) {
+ emit requestPreviousTab();
+ } else if (
+ (key == Qt::Key_PageDown && modifiers == Qt::ControlModifier)
+ || (key == Qt::Key_Right && modifiers == (Qt::ControlModifier & Qt::ShiftModifier))
+ ) {
+ emit requestNextTab();
} else {
messageLog_->handleKeyPressEvent(event);
}