Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Disable shortcuts when launcher is not available #379

Open
wants to merge 2 commits into
base: xenial
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qml/Launcher/Launcher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ FocusScope {
if (state == "drawer")
return;

if (superPressed) {
if (superPressed && root.available) {
superPressTimer.start();
superLongPressTimer.start();
} else {
Expand Down
4 changes: 4 additions & 0 deletions qml/Shell.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down