From c49d19b43e654e79a24e01e780492a084572c9b0 Mon Sep 17 00:00:00 2001
From: Jacob Wahlman <jacwa448@student.liu.se>
Date: Wed, 13 May 2020 18:43:29 +0200
Subject: [PATCH] added shortcut for help

---
 b_asic/GUI/about_window.py | 1 +
 b_asic/GUI/main_window.py  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/b_asic/GUI/about_window.py b/b_asic/GUI/about_window.py
index ea38c7c4..0cb5fa7e 100644
--- a/b_asic/GUI/about_window.py
+++ b/b_asic/GUI/about_window.py
@@ -46,6 +46,7 @@ class KeybindsWindow(QDialog):
             "'Ctrl+Q' - Quit the application.\n"
             "'Ctrl+LMouseButton' - On a operation will select the operation, without deselecting the other operations.\n"
             "'Ctrl+S' (Plot) - Save the plot if a plot is visible.\n"
+            "'Ctrl+?' - Open the FAQ section."
         )
 
         information_layout.addWidget(title_label)
diff --git a/b_asic/GUI/main_window.py b/b_asic/GUI/main_window.py
index 2829fcaa..72dfdcf6 100644
--- a/b_asic/GUI/main_window.py
+++ b/b_asic/GUI/main_window.py
@@ -80,8 +80,11 @@ class MainWindow(QMainWindow):
         self.ui.faqBASIC.triggered.connect(self.display_faq_page)
         self.ui.aboutBASIC.triggered.connect(self.display_about_page)
         self.ui.keybindsBASIC.triggered.connect(self.display_keybinds_page)
+        self.shortcut_help = QShortcut(QKeySequence("Ctrl+?"), self)
+        self.shortcut_help.activated.connect(self.display_faq_page)
 
         self.logger.info("Finished setting up GUI")
+        self.logger.info("For questions please refer to 'Ctrl+?', or visit the 'Help' section on the toolbar.")
 
     def init_ui(self):
         self.ui.core_operations_list.itemClicked.connect(self.on_list_widget_item_clicked)
-- 
GitLab