summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2024-02-12 20:04:59 -0500
committerLoren Burkholder <computersemiexpert@outlook.com>2024-02-12 20:04:59 -0500
commit74cd74d0f8aace15f0e8398ad4dbaf3e754ca320 (patch)
treecfec91d0ddef5efb9c8a9b23f991553aa1c276e4
parent961cb403f7b25d2b1c55158f3e9cc444a76d740c (diff)
Close the quick switcher on Ctrl+Kquickswitchclose
-rw-r--r--resources/qml/QuickSwitcher.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/resources/qml/QuickSwitcher.qml b/resources/qml/QuickSwitcher.qml
index 10b9bf25..590971c7 100644
--- a/resources/qml/QuickSwitcher.qml
+++ b/resources/qml/QuickSwitcher.qml
@@ -32,6 +32,18 @@ Popup {
roomTextInput.forceActiveFocus();
}
+ Shortcut {
+ id: closeShortcut
+
+ sequence: "Ctrl+K"
+ onActivated: {
+ // It seems that QML takes a second or so to clean up destroyed shortcuts, so instead we'll just disable this shortcut
+ // so it doesn't prevent the quick switcher from opening again
+ closeShortcut.enabled = false;
+ quickSwitcher.close();
+ }
+ }
+
Column {
anchors.fill: parent
spacing: 1