[vlc-commits] qml: forward unhandled keys as hotkeys in medialib views

Pierre Lamot git at videolan.org
Fri Jan 10 15:06:32 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Dec 17 13:33:43 2019 +0100| [53dc0d638f1de8101f195ec52761acfe3ad4839a] | committer: Jean-Baptiste Kempf

qml: forward unhandled keys as hotkeys in medialib views

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53dc0d638f1de8101f195ec52761acfe3ad4839a
---

 modules/gui/qt/medialibrary/qml/MainDisplay.qml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 11aa280800..5af7af0749 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -64,6 +64,12 @@ Widgets.NavigableFocusScope {
         history.previous(History.Go)
     }
 
+    Keys.onPressed: {
+        //unhandled keys are forwarded as hotkeys
+        if (!event.accepted)
+            rootWindow.sendHotkey(event.key, event.modifiers);
+    }
+
     Component {
         id: musicComp
         MusicDisplay {



More information about the vlc-commits mailing list