How to set a key to mimic clicking an app in the dock
This is the kind of task QuicKeys used to be very good at. 

Press a button, return cursor to its start point.

It's still available [will run in nag-free demo mode for a month, then go to nagware unless you buy it] &amp; has instructions to install under more recent macOSes, but idk whether it's still up to the task.