From 6bd8bebad93fe99dea8f151bdbc948041a6ac06c Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 12 May 2023 00:43:42 +0200 Subject: [PATCH] mousepad: Provide an out for touchpad users At least my touchpad cannot have left and right buttons at the same time. This makes it possible to exit at least using the keyboard. --- app/qml/mousepad.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/qml/mousepad.qml b/app/qml/mousepad.qml index 83edddc1e..bf867555e 100644 --- a/app/qml/mousepad.qml +++ b/app/qml/mousepad.qml @@ -56,7 +56,7 @@ Kirigami.Page wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter - text: i18n("Press the left and right mouse buttons at the same time to unlock") + text: i18n("Press %1 or the left and right mouse buttons at the same time to unlock", unlockShortcut.nativeText) } Connections { @@ -75,6 +75,15 @@ Kirigami.Page onTapped: lockButton.visible = false } + Shortcut { + id: unlockShortcut + sequence: "Alt+X" + onActivated: { + console.log("shortcut triggered, unlocking") + PointerLocker.isLocked = false + } + } + onClicked: { var clickType = ""; var packet = {};