From 87cb63e1fd745e3264bec49e360fb051b96add06 Mon Sep 17 00:00:00 2001 From: q234rty Date: Wed, 14 Aug 2024 16:32:51 +0800 Subject: [PATCH] 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 --- resources/qml/MessageInput.qml | 4 ++-- 1 file 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; }