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 wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter 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 { Connections {
@ -75,6 +75,15 @@ Kirigami.Page
onTapped: lockButton.visible = false onTapped: lockButton.visible = false
} }
Shortcut {
id: unlockShortcut
sequence: "Alt+X"
onActivated: {
console.log("shortcut triggered, unlocking")
PointerLocker.isLocked = false
}
}
onClicked: { onClicked: {
var clickType = ""; var clickType = "";
var packet = {}; var packet = {};