You should be able to use automator to create a service that runs an applescript, and then in system preferences link a keyboard shortcut to the service to trigger it.
Also this would give you the right click option in applications to trigger the script.
(Of course once Monterey is released: create a shortcut with a keyboard shortcut attached
)