1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

add clear all keybinding to notifs

This commit is contained in:
bbedward
2025-08-16 10:32:06 -04:00
parent eb48c3c1b5
commit 115e9e0f81
2 changed files with 18 additions and 1 deletions

View File

@@ -390,6 +390,23 @@ QtObject {
}
function handleKey(event) {
if ((event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace) && (event.modifiers & Qt.ShiftModifier)) {
NotificationService.clearAllNotifications()
rebuildFlatNavigation()
if (flatNavigation.length === 0) {
keyboardNavigationActive = false
if (listView) {
listView.keyboardActive = false
}
} else {
selectedFlatIndex = 0
updateSelectedIdFromIndex()
}
selectionVersion++
event.accepted = true
return
}
if (event.key === Qt.Key_Escape) {
if (keyboardNavigationActive) {
keyboardNavigationActive = false