closing all notification alerts at once
Concerning closing all alert notification via a keyboard shortcut, you have the options listed below available. Both use a bit of AppleScript to close the alert notifications by automatically pressing &quot;Close&quot; on each notification until there are no more notification available. The script has been extensively tested and should cover all edge cases with proper error handling.
Using an Alfred workflow
If you use Alfred, you have this workflow available: Notification dismisser. It will close all the currently displayed notifications with a shortcut or Alfred keyword. Super simple to use and works as expected.
Without using Alfred
If you don't use Alfred, you can take the main script from the workflow and using Automator save it as a &quot;Quick Action&quot;. Then set a keyboard shortcut for it in System Preferences. Does the same as the workflow, albeit requires a bit more effort than clicking &quot;install&quot; as with Alfred.
Full disclosure, I'm the author of the workflow and script. Hope it helps someone to save a couple precious seconds!