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.
This commit is contained in:
Aleix Pol 2023-05-12 00:43:42 +02:00
parent 9266556510
commit 6bd8bebad9

View file

@ -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 = {};