How to specify two letter or more keybinds for Palettes?

I wish I can specify in triggers two letter hotkeys to activate macros.

For example I have a palette that inserts some words :

And since they have the same 'hotkey', there will be a conflict palette and then next key to activate the macro be will be randomly chosen by KM like here :

What I wish however is to specify my own two letter binds for macros.

So for example I want 'insane' macro to be triggered via palette > i > n and 'insert' macro to be triggered with palette > i > s. But I want to choose these options myself and KM reflect my choices in the Palette conflict. Not KM choosing the letter triggers itself. Because it's really hard for me to predict what it will choose and I want to create my own system of palette triggers and conflict resolvers.

I tried to instead of hotkey trigger to instead trigger by typed string like here :

But that did not work for some reason. :disappointed:

Thank you for any help. I really wish I can set this up. This would be insanely huge for me as I can create very powerful palettes this way.

@dunkaroo had an interesting method for using multiple letter hotkeys. The image from his post is gone but you can still glean most of it from the thread and supplied macro.

I’ve read it and from what I got, I have to create a whole new palette for my second letter binds and then call from letters with conflicts to these palettes. But then if I have say another conflict on some other letter, I would have to create yet another palette. This is a bit ridiculous. :disappointed:

I really wish there was a very simple way to define two letter binds. This would make palettes a lot more amazing than they already are.

In ideal world. I wish I could get some new trigger perhaps where you can chain keys to reach the macro from the palette. Similar to Hot Key, but you specify the first hotkey, then the next one. Usually going two levels deep is enough but you could extend it to more nesting hotkeys.

So in a way you do get the similar nesting of palettes behaviour but without creating all these 100’s of palettes and cluttering up KM groups. This would be a very clean and very powerful way to power up KM palette usage. I hope @peternlewis can agree.

In all seriousness, the levels of awesome, nested palettes can bring with this new trigger for palettes would be amazing.

Of course if something like this, can already be achieved without being super painful to both create and maintain, I would love to hear it. But I think a native support for this kind of thing from KM would be phenomenal to have.

Oh and it would work really well with KM’s already really smart conflict palette. In cases where the user does not specify the conflict trigger himself, KM will do it for the user like it does already.

Yes you understood it correctly. It is cumbersome but I thought it was clever.

You can't have two-letter triggers for a macro (other than typed-string, which you might try for those macros). But you can achieve something very close.

For the macros that have a conflict, start the name of them with characters that will be used in the conflict palette. So, in this case:

  • n - insane
  • s - insert

Then when you get the conflict palette you can type "n" or "s" to select the one you want.

3 Likes

Oh that is actually quite a smart solution to this. And something that works quite nicely too.

Thank you @JMichaelTX

You might also try using typed-string triggers for these. That will allow you to avoid the conflict palette:

I started the typed-strings with a ";", but that is just my convention -- you don't need it.

I'm missing some trick to using typed string triggers in this way. When I start typing the palette just closes and the text is sent to the underlying window. Is there a trick to how the Macro Group is defined?

Below is what have. The Cmd-\ opens the palette, but when I start typing "test" the moment I press "t" key the palette just closes.

Macro group:
18

Macro in above macro group:
31

Thanks!
dave

Hey Dave,

Typed-String triggers are exclusively for use in editable text areas.

For instance I have a macro where I type “;sis” (mnemonic for SystemInfoShort), and it is replaced with this:

Model Identifier: MacBookPro6,1
System Version: macOS 10.12.6 (16G1510)


Try giving your macros single-key keyboard shortcuts in your example.

-Chris

JMichaelTX how did you get your example to work in the context of a macro group then? Could you provide a little more context (e.g. how is macro group defined)?
Thanks!
dave

Thanks ccstone, but I'm still missing how @JMichaelTX is showing several characters in a pallet in in this screenshot:

image

Hey Dave,

He's using a Typed String trigger, and the Palette is set to show the trigger.

This is NOT a Hot Key trigger.

-Chris

Hey Dave,

Here's an example of same.

Typed String Trigger Example.kmmacros (4.0 KB)

Install it – enable it.

Move to TextEdit or another text-editor, and type tst;<space>

-Chris

1 Like

Keep in mind that Typed String triggers are generally only suitable for places where you are in a text typing context (eg typing in to a word processor), so they are not generally applicable in a context like the Finder or where you would use a palette across different environments.

This is because the keys will still be typed, and by default a sequence of delete keys will be simulated before running the macro that will “undo” the typing. In a non-typing context, those delete keys could do all manner of damage. And even if you disable the option, the typed keys will typically have some odd behaviour (eg selecting files in the Finder).

So Typed String triggers are not an appropriate answer to “I want to have a two character hot key sequence”.

Thanks for the explanation. I agree it doesn't really meet the need. Perhaps Keyboard Maestro could just support typing multiple keys after a pallet is activated. So the user could type the string once the pallet is activated. As an added bonus, it could filter or highlight the remaining options based on the keys pressed so far.

Or I guess another way of looking at it is, why doesn't the pallet have the typing behavior right away rather than requiring a hot key first and then allowing typing to select from the conflicts?