Is it possible to have string triggers beginning with same keys?

Would it be possible to have something like "@@G" be one string trigger and "@@GG", "@@GGG", and "@@GGGG" all be different triggers for macros. Keyboard Maestro seems to automatically trigger on the first "@@G" and ignore anything after, since it's identifying the raw string value.
The difference between those triggers is the Shift key. So you type "@@G" and let go of the shift key, and the first macro gets triggered, but with "@@GGGG" you let go of the shift key after typing 'G' four times, so it's macro gets triggered. Basically triggering based on when you let go of the shift key.

Hi @Anthney450,

You can reverse the typed string trigger.
Try: G@@, GG@@ etc, if you prefer to use the number of G for different macros.
Or: @GG, @@GG, if you prefer to always start with @.
In other words, you can use the number of the first typed character for different macros, the 2nd repeated character is used to tell KM that the the typed string trigger has completed.

1 Like

Yes. I have many, many typed string triggers (both in KM and in Typinator) that have the same prefix. The key is in always having a suffix that is required.
Here's my typed string naming convention:
;<2-3 char base ID>.<main string>SPACE

For example, to type the full KM name:
;km.nš–
where š– is the SPACE character.

I always start with a semicolon ; and end with the SPACE character.
This has worked very well in avoiding false triggers.

4 Likes

You have summoned my presence?

5 Likes

This is perfect, Thank you so much!. Sorry for the late reply, I wasn't aware I gotten any responses but this is exactly what I was looking for.

haha thank you for your arrival ggg, your presence was necessary for my example above

@JMichaelTX can you elaborate on how that works?

Edit: got it, didn't read carefully how it can be used.
It'd look like this:

;G<SPACE>
;GG<SPACE>
;GGG<SPACE>
;GGGG<SPACE>

SPACE is part of the string, cool :+1:

1 Like