diff --git a/components/dialogs/SystemDialog.qml b/components/dialogs/SystemDialog.qml index 412566a49..cc3e8d249 100644 --- a/components/dialogs/SystemDialog.qml +++ b/components/dialogs/SystemDialog.qml @@ -123,7 +123,16 @@ Kirigami.AbstractApplicationWindow { }) } - Keys.onEscapePressed: root.reject() focus: true + + function accept() { + const button = dialogButtonBox.standardButton(DialogButtonBox.Ok); + if (button && button.enabled) { + root.accept() + } + } + Keys.onEnterPressed: accept() + Keys.onReturnPressed: accept() + Keys.onEscapePressed: root.reject() } }