mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 12:13:31 -04:00
feat(Launcher/Spotlight): improve context keyboard navigation and mode persistence (#2467)
* feat(Spotlight): fix submenu keyboard navigation * feat(Launcher/Spotlight): disable persisting last mode when changed by triggers * feat(Launcher/Spotlight): add option to disable last mode being persisted * fix(Launcher/Spotlight): fix context menu keys navigation * fix(NiriOverviewOverlay): fix context menu keys navigation and position
This commit is contained in:
@@ -340,6 +340,31 @@ Item {
|
||||
return count;
|
||||
}
|
||||
|
||||
function handleKey(event) {
|
||||
if (!openState)
|
||||
return;
|
||||
switch (event.key) {
|
||||
case Qt.Key_Down:
|
||||
selectNext();
|
||||
event.accepted = true;
|
||||
return;
|
||||
case Qt.Key_Up:
|
||||
selectPrevious();
|
||||
event.accepted = true;
|
||||
return;
|
||||
case Qt.Key_Return:
|
||||
case Qt.Key_Enter:
|
||||
activateSelected();
|
||||
event.accepted = true;
|
||||
return;
|
||||
case Qt.Key_Left:
|
||||
case Qt.Key_Escape:
|
||||
hide();
|
||||
event.accepted = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function selectNext() {
|
||||
if (visibleItemCount > 0) {
|
||||
keyboardNavigation = true;
|
||||
|
||||
Reference in New Issue
Block a user