Leader key implementation in KM

Hi, @phario.

I've mocked up a simple example to help explain the palette hierarchy approach.



If you download, install, and try these macros I think it will help you understand the notes below.

Palette Hierarchy Mock-up.kmmacros (28.1 KB)

After enabling the three example groups (LK 1, LK 2.1, and LK 2.2), use ⌘+' to display the Home palette.


Notes:

  • I use descriptive names for the macros and sub palettes, but each entry on a given palette has a unique first character; thus, all palette actions can be triggered with a single key press.

  • The Show Palette of Macros action is quite versatile. Individual macros can be added to the action (like with the Home palette and Palette 2.1) or a group can be specified and the group macros will be rendered on the palette (like Palette 2.2).

  • For Show Palette of Macros actions that include individual entries, @noisneil's Show a Palette of Macros - Auto-Create and Populate works quite well. (Above I mentioned that I'm creating a macro that works similarly, however, the macros can be in any macro group. Don't worry about that detail since that's really a secondary issue. If/when I share that macro on the forum, you might find it useful.)

  • When using @noisneil's Show a Palette of Macros - Auto-Create and Populate or when specifying a group as with Palette 2.2, @DanThomas's Palette Organizer is a great tool to set the order of the palette entries.

  • I use three different styles just to demonstrate this flexibility. Note that palette styles can be copied and pasted. Double-click a Show Palette of Macros action palette to open the Theme Editor.


On my mac, the Home palette is obviously more complex:

On my system, some branches are three palettes deep, but macros that deep are rarely used (but since they are logically grouped, they can be easily found when needed).

In practice, 95+% of my macros are triggered from the Home palette (using Hyper+A; a single key press) or from a palette at Level 2 (using Hyper+A; a single key press to display one of the Level 2 palettes; a single key press to trigger the Level 2 macro).

Very quickly my muscle memory takes over.


Of course, my most frequently used macros still have dedicated hot keys, but the palette hierarchy approach is great for many others.

1 Like