mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Prevent shortcuts from inserting unprintable characters by accident
This commit is contained in:
parent
3533f104bd
commit
4723b677d5
1 changed files with 3 additions and 1 deletions
|
@ -27,9 +27,11 @@ 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();
|
||||||
|
if (event.modifiers != Qt.ControlModifier) {
|
||||||
room.input.setText(room.input.text + event.text);
|
room.input.setText(room.input.text + event.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
onRoomChanged: if (room != null)
|
onRoomChanged: if (room != null)
|
||||||
room.triggerSpecialEffects()
|
room.triggerSpecialEffects()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue