Curious Behavior of Conflict Palettes

First, conflict palettes are really useful and I thank @peternlewis for inventing them. Now, no big deal, just a little strange. This is a conflict palette. Three items with three equal triggers. I press "b".

image

A new palette with the same three items appears. Two triggers are the same again. I press "a".

image

A new palette appears again. Now the triggers are unique.

image

What prevents KM from selecting the triggers "B", "a", "y" in the first palette? I know of course that I could number the menu item (1, 2, 3) to have unique triggers. I just wonder why KM doesn't do it directly. I'm sure there is a purpose to it. Maybe I can use this if I understand it.

It filters the list depending on what you've typed so far, presenting a "replacement" palette each keypress, and then highlights the next set of choices.

Is it the "replacement" of the palette you're querying? I guess it's more efficient -- it's iterating through ever-decreasing conflicts -- than a static palette with a contextual list (a palette that would then have to be resized every iteration anyway, as the list shrunk).

Mmm ... I'm not sure I understand you. I created the first conflict on purpose by assigning the same shortcut to several macros (⌥⇧k). Therefore the conflict palette opens. That's fine. All other conflicts are not wanted, if they can be avoided. But the first palette creates new conflicts because "B" is always selected as trigger. However, every conflict could be avoided with "B", "a", "y".

I don't know anything about programming, but wouldn't it be more efficient to assign unique triggers immediately instead of generating two new (nested) palettes? I would prefer that :man_shrugging:

You trigger your "conflict hotkey" and KM gives you list of those conflicting macros to choose from. You can now start to filter that list by typing in a string, starting with the first differentiating character (going left to right).

(I am surprised you get the "B" highlighted -- for me it jumps straight to the second character on each line, as it should. But mine are also sorted alphabetically-ascending, which yours aren't. A language setting or preference, perhaps?)

Highlighting the "B" in the first line because "they all start with B but this is the first line it occurs" would be counter-intuitive for most people -- "this is the first difference" is much more understandable. Most people would find it a more difficult UI, trying to compare scattered rather than aligned characters.

It would also be programmatically time-consuming as you would have to compare every character of each line in turn against every character of every following line, looking for uniqueness in the column after the last match -- not so bad with only three lines, but what if you had 20 or 30?

Whereas "Show me all the macros, highlighting the first column where characters differ. Now remove all the macros which don't have the letter just typed in that column and show me the remainder, highlighting the first column where characters differ. Now remove..." is a nice and easy looping comparison of items in an ever-shrinking list against an ever-expanding string.

Thanks Nige, I think I understand it now. Even if I would prefer it differently :smirk:

Then for you the triggers B, a, a are already displayed in the first palette, like for me in the second? Very strange, no idea why.

If I don't want nested palettes, then I guess I have no choice but to number the menu items to create unique triggers. Well, I'll do that then. :face_exhaling:

That'll work fine if you have a static list, but could be a nightmare to maintain. It might be slightly easier if you:

  1. Remove the triggers from your current macros
  2. Aliase them all into a new Group
  3. Set the same (conflicting) hotkey trigger for all the aliases
  4. Changed the alias names to give you the order you want

That would give you the Conflict Palette behaviour you are after but still leave "sensible" names on the original macros for sorting in lists, searching, etc.

I think Keyboard Maestro is taking a simple approach, and perhaps it will make more sense if you see it with a greater variety of macro names:

image

There's a macro for that... :sunglasses:

MACRO: Palette Organizer v1.3 (updated Dec 3, 2021)

1 Like

The conflict palette chooses the first column of letters that are not all the same, and highlights them as selectable.

In the first image, I presume there are other macros listed, as otherwise with all the macros starting from B, then the first letter would be skipped (unless you have the SequentialConflictPalette preference enabled, which it is not by default and can only be adjusted by Terminal commands).

So I presume there is at least a fourth macro in the palette which does not start with B.

Whatever column is used, the available restricting characters are all the characters that appear in that column, and then the palette is narrowed to those matching that selection, and the process is repeated until one remains and it is triggered.

There are lots of other ways it could work, but that is how it works.

Also, number keys do work, as long as they are not used in the triggering process, so 1, 2, 3 would trigger those first three macros, assuming no other macros start with digits.

3 Likes

I have understood everything so far. Thanks to all who have helped!

I will have to think about the best system for me. Maybe letters as triggers are not the best choice at all. Palettes can be designed with columns, icons and special font features to visually group certain macros. Then the mouse can also come in handy. I will think about it.

My main use of Conflict Palettes is as a way to not have to remember lots of hotkeys, especially for Global Macros that do things like opening particular often used folders etc. So I give those Macros a standard pattern of modifier keys followed by a single letter that would be the "obvious" choice so it makes it easy to guess. In this case I have given the hotkey ⌃⌥⌘L to all these Macros. I then click with the mouse to select the one I want. But a subtle trick is to name the most used Macro with a return symbol at the head of its name, which means hitting ⌃⌥⌘L followed by hitting Return launches that "default" Macro. This is a new feature as of KM version 10.

image

3 Likes

Thank you @Zabobon very interesting.

Do you mean copy/paste? Or where do you get this symbol?

Yes, you can use copy/paste. Here it is:

You can also get it by going into the emoji and symbols viewer. There must be a shortcut key for it but I don't know what it is.

Funny, that really works, just tried it. :grinning: Does this also work with the symbols of Tab etc.?

However, such triggers can be used in general. As a trigger, not as part of the name of the macros.

image

No, but it does work with a "space" so, adding a blank space before a Macro's name allows it to be run from the Conflict Palette by hitting the spacebar. A kind of "second default".

image

Yes, but we are talking specifically about Conflict Palettes here. In the above example the trigger for both Macros is ⇧⌘S. By having a space or return symbol at the head of the Macro's name it allows a quick selection from the Conflict Palette. Hitting Return is nice and intuitive so, I don't have to think.

1 Like

Yes, we are talking about conflict palettes because I like the highlighted triggers. Visually, that's a big advantage for me over the triggers of other palettes that are behind the name.

I like your idea: modifier+L for macros with L (or those that belong together). But maybe for me it's better to have everything in one palette and separate visually. Then I don't need triggers but the mouse. I will certainly use your tip :leftwards_arrow_with_hook: :smirk: Let's see.

Conflict Palettes are just one of many solutions - that's the good thing about Keyboard Maestro. For me Conflict Palettes are great for Global Macros specifically opening folders and launching Applications.

But for each App I have a standard Group Palette as a way to launch that App's specific Macros and also a visual way to remind me of the shortcuts I have set.

image

2 Likes

And a shout out for the "Menu Glyphs" macro, available from the "Text" Group in KM's Macro Library, for when you need , , , etc. Probably my most-used macro.

3 Likes