[totem/wip/hadess/keyboard-shortcuts: 1/3] main: Add 'K' as a shortcut for Play/Pause




commit 3259112cb38c13c2a2f75b9ed5af8184d80c7e75
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Feb 15 15:01:54 2022 +0100

    main: Add 'K' as a shortcut for Play/Pause
    
    As used on YouTube:
    https://support.google.com/youtube/answer/7631406?hl=en

 data/shortcuts.ui  | 2 +-
 src/totem-object.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/data/shortcuts.ui b/data/shortcuts.ui
index 767d1abac..6d23dc167 100644
--- a/data/shortcuts.ui
+++ b/data/shortcuts.ui
@@ -106,7 +106,7 @@
             <child>
               <object class="GtkShortcutsShortcut" id="play-pause">
                 <property name="visible">1</property>
-                <property name="accelerator">P &lt;ctrl&gt;space</property>
+                <property name="accelerator">P K &lt;ctrl&gt;space</property>
                 <property name="title" translatable="yes" context="shortcut window">Play/Pause</property>
               </object>
             </child>
diff --git a/src/totem-object.c b/src/totem-object.c
index 5da970f69..03e3b0b66 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3492,6 +3492,8 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_AudioPlay:
        case GDK_KEY_p:
        case GDK_KEY_P:
+       case GDK_KEY_k:
+       case GDK_KEY_K:
                totem_object_play_pause (totem);
                break;
        case GDK_KEY_comma:


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