Conflict palette revisited

Hi all,

With trepidation, I’d like to wade into the heavily discussed topic of macro conflicts and propose a new feature (though if there is already a solution to my problem, I’m eager to hear it!). I’ll start with a brief description of the goal and the proposed solution, and then give the detailed context and why it is useful.

The goal is to avoid the Conflict Palette by giving precedence to some macro groups over others. When a conflict between macros occurs I always want the one from the macro group with precedence to be selected automatically by the engine. Each macro group would need a new “precedence” on/off switch that the KBM engine uses to determine precedence, including over those pesty global macros (instead of a switch the precedence could be a number/level, but that’s overkill for my purposes). If there is a conflict between two macros in groups that both have “precedence” set, then we’re back to the Conflict Palette, but I think that would be easy to avoid in practice

This feature would have the effect of enabling “modes”. Environments like emacs have very rich modes, and this feature would enable a similar capability in the KBM environment.

So here’s the context.

When I look at how I invoke macros, my keyboard is divided into two sets of keys: “typing keys” for typing letters (e.g., [a-zA-Z0-9]) and “macro keys” for invoking macros (keypad, functions keys, etc). Both sets of keys can be used to invoke macros when used with palettes or control sequences.

I discovered that my macro groups fall into three types of uses:
Global macros; these almost never use a palette and use up most of the “macro keys”.
App-specific macros; these sometimes use a palette and sometimes don’t
Mode-specific macros; these usually use a palette

The first two have obvious uses. An example of a mode-specific macro group is one that moves a window around. It is typically invoked in this pattern: hit a meta key to active a palette, type a bunch of keys in that mode, and then close the palette and exit the mode. Unlike most global macros, they are typically used with a palette and are typically used as a sequence (‘cause you’re in a mode doing something). The problem is that I can only use the “typing keys” with mode-specific macros and not the “macro keys” because the macros keys are already allocated to the global macros. And using the typing keys for mode-specific macros sometimes conflict with the app-specific macros. Avoid these conflicts really limits the selection of keys and the intuitiveness of the key assignments to mode-specific macros.

So my insight was that I always want the “mode-specific” macros to override the global and app-specific macros. This would enable mode-specific macros to use the keypad and function keys while their palette (or mode, if you don’t want to use a palette) is active, and override app-specific macros for the typing keys. If this isn’t clear I’m happy to provide an example.

I’d love to know if there are other solutions. If not, then it would be wonderful if Peter would consider adding a “precedence” switch to macro groups and having the engine use it to reduce invocation of the Conflict Palette.

Thoughts?

Thanks so much for the wisdom of this community and the elegance of Keyboard Maestro!

Steve

So, when a certain Palette of Macros is showing and its Macros active, you want to disable other macros that might have the same triggers as the Macros on the Palette?

The Global Macro Group is a special Group that cannot be disabled. However you can make a new custom Group which is available in all applications (in effect a Global Group) and put your Global Macros in this Group. And this new custom Group can be enabled/disabled.

Then you would have a Macro that toggles your Mode Macro Palette on/off and disables/enables your custom Global Group (and disables/enables any other Macros or Groups that might conflict).

You would need to set your “Mode Macros” Group to only have its Macros active when its Palette is showing:

EXAMPLE Disable Group of Macros when in Mode.kmmacros (4.7 KB)

Click to Show Image of Macro

Thanks, Zabobon. Yes, I've done a lot of experimentation with turning macro groups on and off, and also using the "Shows/hides a palette when..." feature. The problem isn't that my "global macros" are in the Global Macro Group, it is that I have hundreds of global macros spread across tens of macro groups. Enabling and disabling them all is somewhere between cumbersome and very difficult. If macro groups were hierarchical and I could disable them all with a single "disable" command then that would makes it a more viable approach.

Do they all need to be global? Do they all need hot key triggers?

Could you either:

  1. Put macros in groups limited to certain apps?
  2. Use something like Alfred to run macros by name, rather than triggering by hot key?
1 Like

Hi @svinter , I'm not quite sure if I understand you correctly. Do you mean that you are running out of hot keys? If so, do you also use long press and is tapped once/twice?

In addition: you have 7 modifiers that you can also use together. So, left ⌘ + right ⌘ can trigger something, or any other combination of modifiers.

1 Like

Hi vincent_arden, thanks for the advice. I ended up doing exactly what you proposed: having separate groups and then toggling them on and off. It particularly works great for the keypad.

Thanks!

Hi Frankb,

Yep, I make liberal use of the modifiers, multi-taps, and long presses. It isn't so much the lack of key sequences available, it is more being able to organize a large set of related macros in a mode in an intuitive way that can be remembered easily. I just created about 30 window movement macros that are easy to overlay over the keypad in a memorable way, but impossible (for me) to overlay them onto an arbitrary set of (typing) keys and remember them.

Thanks, though!

Ok, then you're actually using almost everything that can be used :slightly_smiling_face:

Mh, I have one last idea. I use strings in the Spotlight window. I actually wanted to create a real system, but so far ... let's say ... I haven't had time yet.

What I am actually doing so far is launching apps and open web pages.

Example: Open "Spotlight" (in my case ⌥+space), then type

  • s space space = opens Safari, or brings Safari to the front.

Or

  • g o space space = go to Safari and open Google.

Strings could actually be very intuitive, because you can use as many letters as you like (unlike a shortcut) This way, everything could be set up in a way that is easy to remember ... maybe :wink:

Yeah, I love KBM's text search box options. But in a mode I'm doing single-key choices and keeping them single-keys definitely my preferred way to go. I also tend to use a lot of prompts with single-key button selections a lot more text search for these situations, too. Thanks!