1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 05:52:50 -05:00

Tab and backtab keyboard navigation on supported content

This commit is contained in:
bbedward
2025-09-27 09:08:41 -04:00
parent 3dd9ab8a29
commit b45837ff5c
4 changed files with 22 additions and 7 deletions

View File

@@ -57,13 +57,11 @@ DankModal {
modalFocusScope.Keys.onPressed: (event) => {
switch (event.key) {
case Qt.Key_Up:
case Qt.Key_Backtab:
selectedIndex = (selectedIndex - 1 + optionCount) % optionCount;
event.accepted = true;
break;
case Qt.Key_Down:
selectedIndex = (selectedIndex + 1) % optionCount;
event.accepted = true;
break;
case Qt.Key_Tab:
selectedIndex = (selectedIndex + 1) % optionCount;
event.accepted = true;