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
pull/1795/head
q234rty 3 months ago
parent c8c3d1c611
commit 87cb63e1fd
No known key found for this signature in database
GPG Key ID: D7E83C63C8CC4545
  1. 4
      resources/qml/MessageInput.qml

@ -173,7 +173,7 @@ Rectangle {
} else if (event.matches(StandardKey.InsertLineSeparator)) { } else if (event.matches(StandardKey.InsertLineSeparator)) {
if (popup.opened) if (popup.opened)
popup.close(); popup.close();
if (Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) { if (Settings.invertEnterKey) {
room.input.send(); room.input.send();
event.accepted = true; event.accepted = true;
} }
@ -195,7 +195,7 @@ Rectangle {
return; return;
} }
} }
if (!Settings.invertEnterKey && (!Qt.inputMethod.visible || Qt.platform.os === "windows")) { if (!Settings.invertEnterKey) {
room.input.send(); room.input.send();
event.accepted = true; event.accepted = true;
} }

Loading…
Cancel
Save