diff --git a/src/backend/user_files.py b/src/backend/user_files.py index 14268a34..b81c56b9 100644 --- a/src/backend/user_files.py +++ b/src/backend/user_files.py @@ -288,6 +288,8 @@ class UISettings(JSONDataFile): "sendFile": ["Alt+S"], "sendFileFromPathInClipboard": ["Alt+Shift+S"], "inviteToRoom": ["Alt+I"], + "leaveRoom": ["Alt+Escape"], + "forgetRoom": ["Alt+Shift+Escape"], "toggleFocusRoomPane": ["Alt+R"], }, diff --git a/src/gui/Pages/Chat/Chat.qml b/src/gui/Pages/Chat/Chat.qml index 923dee06..4095e3e6 100644 --- a/src/gui/Pages/Chat/Chat.qml +++ b/src/gui/Pages/Chat/Chat.qml @@ -26,6 +26,24 @@ Item { readonly property alias roomPane: roomPaneLoader.item + HShortcut { + sequences: window.settings.keys.leaveRoom + onActivated: utils.makePopup( + "Popups/LeaveRoomPopup.qml", + chat, + {userId, roomId, roomName: roomInfo.display_name}, + ) + } + + HShortcut { + sequences: window.settings.keys.forgetRoom + onActivated: utils.makePopup( + "Popups/ForgetRoomPopup.qml", + chat, + {userId, roomId, roomName: roomInfo.display_name}, + ) + } + Timer { interval: 100 running: ! userInfo