summary refs log tree commit diff
path: root/resources/qml/MessageInput.qml
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-11-04 23:54:14 +0100
committerGitHub <noreply@github.com>2022-11-04 23:54:14 +0100
commit314785d05c755ccf0077169639af39ba01da8614 (patch)
treea7ae9fdd8dabe25b49770ebc4369692b47270fd9 /resources/qml/MessageInput.qml
parentMerge branch 'macos_notification_actions' into 'master' (diff)
parentMove invert enter key setting (diff)
downloadnheko-314785d05c755ccf0077169639af39ba01da8614.tar.xz
Merge pull request #1221 from LordMZTE/invert-enter
Add invert enter key setting
Diffstat (limited to 'resources/qml/MessageInput.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; }