How to "Clear All" Windows 10 Action Center notifications with keyboard

In Windows 10 desktop, is there way to "Clear All" of the Action Center notifications with the keyboard?

I know WinA will open the Action Center. But I haven't found a shortcut to dismiss the notifications.


Solution 1:

Try:

WinKey + A (to open Action Center)

Shift + Tab + Tab (to set focus on "clear all")

Space

The above keystrokes can be automated using NirCmd or AHK easily.

Solution 2:

For AutoHotKey users, this little script works for me (Win10 Pro 20H2/19042):

^F12::
    Send, {LWIN DOWN}a{LWIN UP}{SHIFT DOWN}{TAB}{TAB}{SHIFT UP}{SPACE}{ESC}
    return

This makes the hotkey Ctrl+F12 clear all notifications (Based on w32sh's answer). You can change the hotkey by changing the ^F12 to anything you like, eg. #F6 for the Windows key+F6 or ^m for Ctrl+m.

Copy into a file called ClearNotifications.ahk and run, if you have AutoHotKey installed.