From 386f637b94578bebf5f6a60880617dbfb66f56d3 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 21 Feb 2023 17:08:59 +0100 Subject: [PATCH] Add Ctrl+U shortcut for switching user This is a key combination that doesn't seem to be used either in NeoChat nor with a common meaning in other chat clients, so let's use it for switching the user. --- src/qml/Component/UserInfo.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qml/Component/UserInfo.qml b/src/qml/Component/UserInfo.qml index f95f0f80e..c777a69ca 100644 --- a/src/qml/Component/UserInfo.qml +++ b/src/qml/Component/UserInfo.qml @@ -74,7 +74,7 @@ QQC2.ToolBar { } visible: switchUserButton.checked - onVisibleChanged: if (visible) focus = true + onVisibleChanged: if (visible) accounts.forceActiveFocus() clip: true model: AccountRegistry @@ -183,6 +183,10 @@ QQC2.ToolBar { QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay Layout.minimumWidth: Layout.preferredWidth Layout.alignment: Qt.AlignRight + Shortcut { + sequence: "Ctrl+U" + onActivated: switchUserButton.toggle() + } } QQC2.ToolButton { icon.name: "list-add"