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




commit 4f6c2b41ed86dc3b1b47367ca8744d3b48b03be5
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]