1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

Update initial focus on IPC Notifications & Notepad

This commit is contained in:
purian23
2025-09-05 23:40:09 -04:00
parent 5f97fd4f7c
commit c9d7641d86
3 changed files with 31 additions and 3 deletions

View File

@@ -138,6 +138,22 @@ QtObject {
ensureVisible()
}
function selectNextWrapping() {
keyboardNavigationActive = true
if (flatNavigation.length === 0)
return
// Re-enable auto-scrolling when arrow keys are used
if (listView && listView.enableAutoScroll) {
listView.enableAutoScroll()
}
selectedFlatIndex = (selectedFlatIndex + 1) % flatNavigation.length
updateSelectedIdFromIndex()
selectionVersion++
ensureVisible()
}
function selectPrevious() {
keyboardNavigationActive = true
if (flatNavigation.length === 0)
@@ -408,6 +424,9 @@ QtObject {
} else if (event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace) {
clearSelected()
event.accepted = true
} else if (event.key === Qt.Key_Tab) {
selectNextWrapping()
event.accepted = true
} else if (event.key >= Qt.Key_1 && event.key <= Qt.Key_9) {
const actionIndex = event.key - Qt.Key_1
executeAction(actionIndex)