1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -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

View File

@@ -34,7 +34,7 @@ Rectangle {
}
StyledText {
text: "Del: Clear • 1-9: Actions • ?: Help • Esc: Close"
text: "Del: Clear • Shift+Del: Clear All • 1-9: Actions • ?: Help • Esc: Close"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter