From b496110aa31cd37fd97164ef21d8baa10776d95d Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 19 Mar 2024 21:56:48 -0400 Subject: [PATCH] volumeosd: Properly bind volume keys Partially addresses https://invent.kde.org/plasma/plasma-mobile/-/issues/328 Apparently in in Qt 6 the "shortcut" property in QAction no longer maps properly to the given Qt key?? Qt.Key_VolumeUp/Qt.Key_VolumeDown -> no key Then I tried putting in Qt.Key_A which mapped to Qt.Key_Ctrl + Qt.Key_Q... Using the `shortcuts` property made it work properly here. This will be obsolete with Plasma 6.1 https://invent.kde.org/plasma/plasma-pa/-/merge_requests/221 --- components/mobileshell/qml/volumeosd/VolumeOSDProvider.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mobileshell/qml/volumeosd/VolumeOSDProvider.qml b/components/mobileshell/qml/volumeosd/VolumeOSDProvider.qml index 846b2984..52709833 100644 --- a/components/mobileshell/qml/volumeosd/VolumeOSDProvider.qml +++ b/components/mobileshell/qml/volumeosd/VolumeOSDProvider.qml @@ -44,21 +44,21 @@ QtObject { VolumeLib.GlobalAction { objectName: "increase_volume" text: i18n("Increase Volume") - shortcut: Qt.Key_VolumeUp + shortcuts: [Qt.Key_VolumeUp] onTriggered: MobileShell.AudioInfo.increaseVolume() } VolumeLib.GlobalAction { objectName: "decrease_volume" text: i18n("Decrease Volume") - shortcut: Qt.Key_VolumeDown + shortcuts: [Qt.Key_VolumeDown] onTriggered: MobileShell.AudioInfo.decreaseVolume() } VolumeLib.GlobalAction { objectName: "mute" text: i18n("Mute") - shortcut: Qt.Key_VolumeMute + shortcuts: [Qt.Key_VolumeMute] onTriggered: MobileShell.AudioInfo.muteVolume() } }