Composer: on escape, cancel any response

This commit is contained in:
miruka 2020-05-20 07:19:02 -04:00
parent d6846b08d9
commit 8823077a1c
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,5 @@
# TODO
- deselect/unfocus after removing or replying to messages
- add room members loading indicator
- fix event ID mention regex

View File

@ -166,6 +166,14 @@ Rectangle {
}
Component.onCompleted: {
area.Keys.onEscapePressed.connect(ev => {
if (chat.replyToEventId) {
chat.replyToEventId = ""
chat.replyToUserId = ""
chat.replyToDisplayName = ""
}
})
area.Keys.onReturnPressed.connect(ev => {
ev.accepted = true