1 files changed, 12 insertions, 0 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index 9574751b..2191c6de 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -18,6 +18,7 @@
#include <QApplication>
#include <QImageReader>
#include <QSettings>
+#include <QShortcut>
#include <QtConcurrent>
#include "AvatarProvider.h"
@@ -148,6 +149,17 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
trySync();
});
+ connect(
+ new QShortcut(QKeySequence("Ctrl+Down"), this), &QShortcut::activated, this, [this]() {
+ if (isVisible())
+ room_list_->nextRoom();
+ });
+ connect(
+ new QShortcut(QKeySequence("Ctrl+Up"), this), &QShortcut::activated, this, [this]() {
+ if (isVisible())
+ room_list_->previousRoom();
+ });
+
connect(top_bar_, &TopRoomBar::mentionsClicked, this, [this](const QPoint &mentionsPos) {
if (user_mentions_popup_->isVisible()) {
user_mentions_popup_->hide();
|