From 3e92b882c9a90e45129560d6a911a615022407f4 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 9 Jul 2020 22:17:15 -0400 Subject: [PATCH] Open event context menu on menu keypress --- TODO.md | 2 +- src/gui/Pages/Chat/Composer/Composer.qml | 2 +- src/gui/Pages/Chat/Composer/MessageArea.qml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index d700e519..c36e2e79 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,6 @@ # TODO -- event menu key right click +- focus first item in menu if opened by kb - composer menu? - fix members not synced bug - fix local unread counters order diff --git a/src/gui/Pages/Chat/Composer/Composer.qml b/src/gui/Pages/Chat/Composer/Composer.qml index 0df667d8..44f8d8e1 100644 --- a/src/gui/Pages/Chat/Composer/Composer.qml +++ b/src/gui/Pages/Chat/Composer/Composer.qml @@ -41,7 +41,7 @@ Rectangle { Layout.fillHeight: true Layout.fillWidth: true - MessageArea { id: messageArea} + MessageArea { id: messageArea } } UploadButton { diff --git a/src/gui/Pages/Chat/Composer/MessageArea.qml b/src/gui/Pages/Chat/Composer/MessageArea.qml index 1a413cbd..13587d2b 100644 --- a/src/gui/Pages/Chat/Composer/MessageArea.qml +++ b/src/gui/Pages/Chat/Composer/MessageArea.qml @@ -175,6 +175,11 @@ HTextArea { Keys.onEnterPressed: ev => Keys.returnPressed(ev) + Keys.onMenuPressed: ev => { + if (eventList && eventList.currentItem) + eventList.currentItem.openContextMenu() + } + Keys.onTabPressed: ev => { ev.accepted = true textArea.insertAtCursor(indent)