From 08f15b6a013cc1e1f8770fa2447d25a52b2e1f4d Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 9 Jul 2020 21:40:33 -0400 Subject: [PATCH] Support menu key for room/member lists currentItem Allow opening context menu for AccountDelegate, RoomDelegate and MemberDelegate by selecting an item with up/down (when focusing filter field) and pressing the menu key. --- src/gui/MainPane/BottomBar.qml | 4 ++++ src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/gui/MainPane/BottomBar.qml b/src/gui/MainPane/BottomBar.qml index a4a0ba1b..85f194ec 100644 --- a/src/gui/MainPane/BottomBar.qml +++ b/src/gui/MainPane/BottomBar.qml @@ -55,6 +55,10 @@ Rectangle { if (window.settings.clearRoomFilterOnEnter) text = "" } + Keys.onMenuPressed: + if (roomList.currentItem) + roomList.currentItem.doRightClick(false) + Keys.onEscapePressed: { mainPane.toggleFocus() if (window.settings.clearRoomFilterOnEscape) text = "" diff --git a/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml b/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml index a856c899..909206f0 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml @@ -43,6 +43,9 @@ HColumnLayout { currentItem.leftClicked() currentItem.clicked() } + + Keys.onMenuPressed: + if (currentItem) currentItem.doRightClick(false) } Layout.fillWidth: true