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.
Thanks so much for the wisdom of this community and the elegance of Keyboard Maestro!