From 80270e1f01874fea778afe5f3409de86e987a131 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Fri, 4 Nov 2022 23:42:35 +0100 Subject: Add invert enter key setting --- resources/qml/MessageInput.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'resources/qml') diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index 37d9614a..0800260f 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -216,6 +216,11 @@ Rectangle { popup.close(); } else if (event.matches(StandardKey.InsertLineSeparator)) { if (popup.opened) popup.close(); + + if (Settings.invertEnterKey && !Qt.inputMethod.visible || Qt.platform.os === "windows") { + room.input.send(); + event.accepted = true; + } } else if (event.matches(StandardKey.InsertParagraphSeparator)) { if (popup.opened) { var currentCompletion = completer.currentCompletion(); @@ -227,7 +232,7 @@ Rectangle { return; } } - if (!Qt.inputMethod.visible || Qt.platform.os === "windows") { + if (!Settings.invertEnterKey && !Qt.inputMethod.visible || Qt.platform.os === "windows") { room.input.send(); event.accepted = true; } -- cgit 1.5.1