From 5d9704fe7eefaf6e0422f029fc1f845cd6a86792 Mon Sep 17 00:00:00 2001 From: Kugi Eusebio Date: Mon, 19 Apr 2021 15:04:39 +0800 Subject: [PATCH 1/2] Disable shortcuts when launcher is not available This will disable launcher shortcuts when launcher is disabled or not available i.e. Launcher is disabled in lock screen. --- qml/Shell.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qml/Shell.qml b/qml/Shell.qml index ebc7cf020..f54ebf4b0 100644 --- a/qml/Shell.qml +++ b/qml/Shell.qml @@ -625,18 +625,21 @@ StyledItem { GlobalShortcut { shortcut: Qt.MetaModifier | Qt.Key_A + active: launcher.available onTriggered: { launcher.toggleDrawer(true); } } GlobalShortcut { shortcut: Qt.AltModifier | Qt.Key_F1 + active: launcher.available onTriggered: { launcher.openForKeyboardNavigation(); } } GlobalShortcut { shortcut: Qt.MetaModifier | Qt.Key_0 + active: launcher.available onTriggered: { if (LauncherModel.get(9)) { activateApplication(LauncherModel.get(9).appId); @@ -647,6 +650,7 @@ StyledItem { model: 9 GlobalShortcut { shortcut: Qt.MetaModifier | (Qt.Key_1 + index) + active: launcher.available onTriggered: { if (LauncherModel.get(index)) { activateApplication(LauncherModel.get(index).appId); From 46d9488929764dd00166930b2812a95249a6703d Mon Sep 17 00:00:00 2001 From: Kugi Eusebio Date: Mon, 19 Apr 2021 15:26:27 +0800 Subject: [PATCH 2/2] Disable super key events when launcher is not available --- qml/Launcher/Launcher.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/Launcher/Launcher.qml b/qml/Launcher/Launcher.qml index d81d35411..dd4fefbe6 100644 --- a/qml/Launcher/Launcher.qml +++ b/qml/Launcher/Launcher.qml @@ -72,7 +72,7 @@ FocusScope { if (state == "drawer") return; - if (superPressed) { + if (superPressed && root.available) { superPressTimer.start(); superLongPressTimer.start(); } else {