diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-06-09 15:36:09 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-06-09 15:36:09 +0200 |
commit | 4723b677d5231fb973d679123cdcb47b857ac6bc (patch) | |
tree | 4cb737b6f624469fd32df838bd8c0f88986e2fcf /resources | |
parent | Properly restore room mentions state after edit (diff) | |
download | nheko-4723b677d5231fb973d679123cdcb47b857ac6bc.tar.xz |
Prevent shortcuts from inserting unprintable characters by accident
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/TimelineView.qml | 4 |
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) |