diff --git a/include/ChatPage.h b/include/ChatPage.h
index e8a40adebff24c3219b04ffb49cdd8fc62bd3434..4c8ed05b50bffe2215319c15a7e463146b8b1054 100644
--- a/include/ChatPage.h
+++ b/include/ChatPage.h
@@ -48,6 +48,7 @@ public:
 
         // Initialize all the components of the UI.
         void bootstrap(QString userid, QString homeserver, QString token);
+        void showQuickSwitcher();
 
 signals:
         void contentLoaded();
@@ -69,14 +70,10 @@ private slots:
         void addRoom(const QString &room_id);
         void removeRoom(const QString &room_id);
 
-protected:
-        void keyPressEvent(QKeyEvent *event) override;
-
 private:
         void updateTypingUsers(const QString &roomid, const QList<QString> &user_ids);
         void updateDisplayNames(const RoomState &state);
         void loadStateFromCache();
-        void showQuickSwitcher();
 
         QHBoxLayout *topLayout_;
         Splitter *splitter;
diff --git a/include/MainWindow.h b/include/MainWindow.h
index 0c2316a3d1058b92bd7f00814c90e85f71bead23..95935c462606e415285db119c147ae60b885ae55 100644
--- a/include/MainWindow.h
+++ b/include/MainWindow.h
@@ -43,6 +43,7 @@ public:
 
 protected:
         void closeEvent(QCloseEvent *event);
+        void keyPressEvent(QKeyEvent *event);
 
 private slots:
         // Handle interaction with the tray icon.
diff --git a/src/ChatPage.cc b/src/ChatPage.cc
index 514494ea28a42de8d03b7b9ffeee2d6c29c267ea..d8280a4a6ad31e6bb69a81e60656a95032f97a42 100644
--- a/src/ChatPage.cc
+++ b/src/ChatPage.cc
@@ -576,15 +576,6 @@ ChatPage::loadStateFromCache()
         client_->sync();
 }
 
-void
-ChatPage::keyPressEvent(QKeyEvent *event)
-{
-        if (event->key() == Qt::Key_K) {
-                if (event->modifiers() == Qt::ControlModifier)
-                        showQuickSwitcher();
-        }
-}
-
 void
 ChatPage::showQuickSwitcher()
 {
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index 8cb2b56249b12231e42a15cba76668236c38e0ec..f6276967ba1789f9011309212b25cc0620bd2d96 100644
--- a/src/MainWindow.cc
+++ b/src/MainWindow.cc
@@ -100,6 +100,15 @@ MainWindow::MainWindow(QWidget *parent)
         }
 }
 
+void
+MainWindow::keyPressEvent(QKeyEvent *e)
+{
+        if ((e->key() == Qt::Key_K) && (e->modifiers().testFlag(Qt::ControlModifier)))
+                chat_page_->showQuickSwitcher();
+        else
+                QMainWindow::keyPressEvent(e);
+}
+
 void
 MainWindow::restoreWindowSize()
 {