Setting up custom, app-specific keyboard shortcuts

I only had a few minutes to read your question, but I want to chime in with my first thought.

Yes, that's how that works, but you can fix that by having a single macro, instead of two, and branch to the appropriate code for the appropriate app if your preferred app is "at the front" like this: (in my case, News and Messages are sample apps)