From 4723b677d5231fb973d679123cdcb47b857ac6bc Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 9 Jun 2024 15:36:09 +0200 Subject: [PATCH] Prevent shortcuts from inserting unprintable characters by accident --- resources/qml/TimelineView.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)