From d2c62529117e878cb92b59039aa367909e4c3871 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Sat, 17 Jul 2021 19:24:45 -0400 Subject: [PATCH] More shortcut stuff --- resources/qml/InviteDialog.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/InviteDialog.qml b/resources/qml/InviteDialog.qml index 3415a93e..23420fa2 100644 --- a/resources/qml/InviteDialog.qml +++ b/resources/qml/InviteDialog.qml @@ -29,10 +29,6 @@ ApplicationWindow { height: 380 width: 340 - Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && event.modifiers & Qt.ControlModifier) - Keys.onEnterPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept() - Keys.onReturnPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept() - Shortcut { sequence: StandardKey.Cancel onActivated: inviteDialogRoot.close() @@ -43,6 +39,10 @@ ApplicationWindow { anchors.margins: 10 spacing: 10 + Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers & Qt.ControlModifier)) + Keys.onEnterPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept() + Keys.onReturnPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept() + Label { text: qsTr("User ID to invite") Layout.fillWidth: true @@ -69,7 +69,7 @@ ApplicationWindow { // onActivated: invitees.accept() // } - Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && event.modifiers & Qt.ControlModifier) + Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers & Qt.ControlModifier)) Keys.onEnterPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept() Keys.onReturnPressed: if (event.modifiers & Qt.ControlModifier) invitees.accept()