summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-06-09 15:36:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2024-06-09 15:36:09 +0200
commit4723b677d5231fb973d679123cdcb47b857ac6bc (patch)
tree4cb737b6f624469fd32df838bd8c0f88986e2fcf /resources
parentProperly restore room mentions state after edit (diff)
downloadnheko-4723b677d5231fb973d679123cdcb47b857ac6bc.tar.xz
Prevent shortcuts from inserting unprintable characters by accident
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/TimelineView.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index c29eb537..53b1951c 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -27,7 +27,9 @@ Item {
     Keys.onPressed: event => {
         if (event.text && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && !topBar.searchHasFocus) {
             TimelineManager.focusMessageInput();
-            room.input.setText(room.input.text + event.text);
+            if (event.modifiers != Qt.ControlModifier) {
+                room.input.setText(room.input.text + event.text);
+            }
         }
     }
     onRoomChanged: if (room != null)