Close the quick switcher on Ctrl+K

This commit is contained in:
Loren Burkholder 2024-02-12 20:04:59 -05:00
parent 961cb403f7
commit 74cd74d0f8
No known key found for this signature in database
GPG key ID: AB62CB312CEC2BBC

View file

@ -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