summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorLordMZTE <lord@mzte.de>2022-11-04 23:42:35 +0100
committerLordMZTE <lord@mzte.de>2022-11-04 23:42:35 +0100
commit80270e1f01874fea778afe5f3409de86e987a131 (patch)
treec67d447604b7c7ae2a00ee3c76747293f06dca16 /resources/qml
parentMerge branch 'macos_notification_actions' into 'master' (diff)
downloadnheko-80270e1f01874fea778afe5f3409de86e987a131.tar.xz
Add invert enter key setting
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MessageInput.qml7
1 files changed, 6 insertions, 1 deletions
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; }