How to expand text in Keyboard Maestro Editor

How can I use my defined KBM text expansions while I am editing a KBM macro?

I have some text expansions that are becoming muscle memory, things like =dd= expands to the current date, 2023.1031 Tuesday, =opt= becomes ⌥, etc.

I would like to use them in my KBM Editor Comments, but they don't expand. Is this possible without having to write my comments in another editor?

This works in a comment action for me:

Keyboard Maestro.kmmacros (21 KB)

Macro screenshot

Maybe you're doing something differently?

Not so much for me.

My Text Expansions are in this group, I presume a default from KBM installation:
image

And here is one that I keep trying to use, but it doesn't expand:
⌘ Macro (v10.2)

Keyboard Maestro Export

Here is what happens when I use it in a comment. In this case, I typed the same trigger string twice:
image

I tried it a second time this time as part of debugging. Usually I type it once, it doesn't work, so I try something else in frustration. I still don't get what is happening, but it seems like I'm closer.

WHOOPS! It seems the definition included the option "Following any character". I suspect that may be the issue!

2 Likes

Why the clipboard cleanup?

I'm not sure what you are referring to, deleting the trigger characters?

Generally, you cannot use Typed String triggers reliably in the Keyboard Maestro editor because any change to the macros will result in the macros being saved which will reset that Typed String trigger buffer.

Typed String triggers also wont work in the Keyboard Maestro Engine because for technical reasons, Keyboard Maestro Engine cannot see the typing (the system allows an application to monitor keystrokes except when that application is itself the front application).

So you will need to use a different trigger in the Keyboard Maestro editor.

1 Like

Since @noisneil's macro is using the Insert Text by Pasting action (as opposed to Insert Text by Typing), the expansion text will replace whatever used to be at the "top" of the System Clipboard history.

See this post from @noisneil for the rest:

(and don't miss the link to Peter's warning)

1 Like

Thanks! I missed that distinction. Now I understand what you were getting at.

I will test to see if pasting rather than typing works better for me, despite @peternlewis's caveat. I will also pursue his suggestion of using a different trigger, something other than a typed string.