Prevent shortcuts from inserting unprintable characters by accident

This commit is contained in:
Nicolas Werner 2024-06-09 15:36:09 +02:00
parent 3533f104bd
commit 4723b677d5
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -27,7 +27,9 @@ Item {
Keys.onPressed: event => { Keys.onPressed: event => {
if (event.text && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && !topBar.searchHasFocus) { if (event.text && event.key !== Qt.Key_Enter && event.key !== Qt.Key_Return && !topBar.searchHasFocus) {
TimelineManager.focusMessageInput(); 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) onRoomChanged: if (room != null)