[connections/kbd-shortcuts: 6/7] window: Add F1 shortcut to launch help/docs




commit d7d8ae947a028c1c6fd55474ab1feb5ba13beed3
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Mar 16 13:41:51 2021 +0100

    window: Add F1 shortcut to launch help/docs

 src/window.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/window.vala b/src/window.vala
index ca0fd06..526d2e7 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -99,6 +99,15 @@ namespace Connections {
                 (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
                 collection_view.search_bar.search_mode_enabled = 
!collection_view.search_bar.search_mode_enabled;
 
+                return true;
+            } else if (event.keyval == Gdk.Key.q &&
+                       (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
+                Application.application.quit_app ();
+
+                return true;
+            } else if (event.keyval == Gdk.Key.F1) {
+                Application.application.activate_action ("help", null);
+
                 return true;
             }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]