summary refs log tree commit diff
diff options
context:
space:
mode:
authorq234rty <q23456yuiop@gmail.com>2024-08-14 16:32:51 +0800
committerq234rty <q23456yuiop@gmail.com>2024-08-14 16:52:50 +0800
commit87cb63e1fd745e3264bec49e360fb051b96add06 (patch)
tree76bfc1b80f06ed199acef573342258026ce7b4b4
parentSuppress warning for unused previousCount on macOS (diff)
downloadnheko-87cb63e1fd745e3264bec49e360fb051b96add06.tar.xz
Always allow sending messages by enter even with IMEs
Qt.inputMethod.visible is true in kwin_wayland when maliit is enabled and activated,
however kwin does not actually show maliit w/o touch input [1].

Moreover, having send by enter might still be desired even for virtual keyboards.

Remove the check for virtual keyboards as suggested by @deepbluev7,
people could still use Settings.invertEnterKey for newlines.

[1]: https://invent.kde.org/plasma/kwin/-/blob/v6.1.4/src/inputmethod.cpp?ref_type=tags#L185
-rw-r--r--resources/qml/MessageInput.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml

index 8b6af57a..58ae90bb 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml
@@ -173,7 +173,7 @@ Rectangle { } else if (event.matches(StandardKey.InsertLineSeparator)) { if (popup.opened) popup.close(); - if (Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) { + if (Settings.invertEnterKey) { room.input.send(); event.accepted = true; } @@ -195,7 +195,7 @@ Rectangle { return; } } - if (!Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) { + if (!Settings.invertEnterKey) { room.input.send(); event.accepted = true; }