Okay, here's my attempt at a solution. There's a 20% chance I misunderstood your requirements, but give this a shot. My Dock is on the left side of my screen, so to test this macro you will have to do the same thing (that can be fixed later.) Read the opening Comment action to learn what you have to do to set this up. Some of the setup can be automated but I don't want to automate anything if this isn't what you want.
I won't be upset if you are unhappy with this solution. I'm doing it because I enjoy this type of challenge. Don't worry about offending me if you don't like it. Even if you don't like it, you may find some of my techniques to be interesting.
The first thing you will notice is that it is triggered by every hotkey from A-Z, plus the Backquote. The macro is very careful to pass the appropriate key back to whatever app is running if it's not part of any "hotkey sequence" that you have defined in the variable called LocalData. This is one of my tricks to get your requirement to work.
Select App by Typing "Backquote AppNameAbbreviation" Macro (v11.0.3)
Select App by Typing "Backquote AppNameAbbreviation".kmmacros (26 KB)