Managing Overlapping Keyboard Shortcut Triggers

I have a lot of macros that have nothing to do with each other but have the same keyboard shortcut triggers.

KM handles this by giving the option to select macros with the same shortcut from a list, which is handy until there are lots of macros with the same keyboard shortcut, and then sorting through the list becomes too intensive.

For example, my Cmd-Shift+T has piled up over the years:
Screen Shot 2022-03-29 at 1.27.52 AM

Basically, I have an idea for how to handle this and am looking for input.

My current plan is make keyboard shortcut triggers context specific by utilizing the 'Enable/Disable Macro Group' action - triggered by when a particular app is activated or deactivated.

That means that for every app I need to make 2 macro groups. One group for macros that are connected to keyboard shortcut triggers and another group to manage the enabling/disabling of the first group.

Here's an example with some Finder macros:
Screen Shot 2022-03-29 at 12.28.14 AM

The Finder group will hold macros that control the Finder KBS macro group (among other macros that won't be context specific):

Next, the Finder KBS group will hold any Finder specific macro that has a keyboard shortcut trigger (just one right now):

If I do this for all my apps with keyboard shortcut triggers, this allows me to use a specific shortcut over and over without having to select from a list.

Some questions:

  1. Has anyone tried anything like this?
  2. Will all this enabling and disabling of macro groups work consistently when flying through various applications? In other words – is group enabling / registering KB shortcuts pretty much instant or might it take too long for this method to be effective?
  3. What are some other options?

I will at least try this method for a while to see if I can clean things up, but I'd love any input you all have.

Here are some probably eliminated options, but I'm open to being persuaded otherwise:

  1. String triggers
    Sure, there are string triggers that allow me to get really specific - BUT these can be hard to remember in the moment time. They're great for very specific things but only if used all the time.
  2. Execute macro by name
    Same issue as string triggers - I have to remember something close to the exact name

I've just woken up, so forgive me if I'm being thick.

As you can use the same hotkey over and over if the macros that use it are available in different apps, I'm wondering... are you trying to use the same hotkey for multiple macros, while the same app is in focus, whose behaviour will be determined by which other apps are also running?

I need coffee.

By the way, if you don't have one already, permit me to briefly evangelise about the Stream Deck. I never have to think about hotkeys. Ok, sermon over.

Yes, I'm trying to use the same hotkey for multiple macros – or I suppose I should say I'm trying to do a better job of it.

The insight is that having all of these macros enabled on the same hotkey causes conflicts that result in a mental slowdown when trying to use them. The slowdown comes from having to pick from a KM menu which macro to use OR deciding to move the macro to a different hotkey to avoid the conflict.

Even moving the hotkey to something else makes it just as confusing. Is the command I want Cmd-Shift+D, Ctrl-Option-Cmd+D, Option-Cmd+D, etc? At that point I have to look it up in KM:
Screen Shot 2022-03-29 at 11.11.54 AM

Not cool.

Essentially I want to maximize my "first thought" when it comes to what hotkey to use across multiple apps. The idea is that if my first thought is to assign it to whatever, then I'll be more likely to remember the macro later when I know I want to do whatever macro but can't remember how I trigger it.

For example, my "first thought" hotkey for the above Finder macro that opens my favorite Finder tabs is F for Favorite, for which I will use Cmd-Shift+F.

But I might have another "first thought" F for something else. I have a macro to F(ix) resolution when one of the games I plays messes it up. If I assign it to Cmd-Shift+F, then there will be a conflict and every time I want to use it – I'll have to choose between the 2 Cmd-Shift+F macros.

I'm trying to avoid that mental slowdown. It's not a hard decision in the moment, but those moments add up. It gets worse the more and more I Cmd-Shift+F macros.

So the idea is – when I'm in Finder – enable Finder specific macros. When I switch to my game (or some other app) – disable Finder macros and then enable game specific macros. That allows me to assign multiple macros to the same hotkey – removing the global element.

I'm using the Application trigger for this and wondering if this will blow up in my face somehow. Either through KM hotkey enabling limitations or the added mental load of maintaining this convention.

Stream Deck? Are you talking about that elgato device? It looks neat and if you're telling me that KM support it then it's immediately going on my wish list.

I don't think it will solve my problem, but it will give me more buttons to press and that's not a bad thing.

Why don’t you just have a macro group specific to each application, which is active only when that application is at the front? This somehow seems too obvious … am I missing something about what you wish to accomplish?

@dgbeecher This was what I was confused about too. App-specific groups already solve the problem of hotkey conflicts between apps. Are we missing something?

Yep. It's brilliant.

That's it. Only difference form what you specified is that you need 2 groups. The reason being is that if group that enables the macros gets disabled then it can't re-enable itself or other macros later when the app is activated again.

I'm asking to see if anyone has run into any issues doing this.

I ask because sometimes I use triggers and they have unintended consequences. For example, I had a series of Folder triggers that would move screenshot files and rename them, but this ended up firing multiple times, giving errors about not being able to save a file.

I'm curious about using applications triggers and what kind of gotchas there might be.

Ohhhh the buttons have dynamic labeling! Might be at the top of my wish list now...

I think I was just asking in a convoluted way "is this a good idea and are there unforeseen consequences of doing it this way?"

I think there might be a misunderstanding. I'm talking about macro groups that limit the availability of macros to specific apps. Unless I'm still misreading your description, you seem to be trying to solve a problem that's already natively solved by KM.

With your Finder group (far left) selected, look at the group settings panel (far right).


Yes! I need that. Had no idea it existed. There are so many facets to keyboard maestro. Thanks so much