I like "Typed String Triggers“. Eg to go to the KM forum I prefer to type "fkm" rather than use a shortcut. But this trigger type should only be used in text fields, because KM passes the typed characters to the front app and then deletes them, which can have unwanted side effects.
A safe environment for strings would be a prompt. But unfortunately this doesn't work, as _jims recently pointed out.
"This string is typed trigger does not fire within the GUI generated by Prompt With List. I've seen that same limitation with Prompt For User Input. I'm not sure about dialogs created with Custom HTML Prompt."
So what could you do? I tried Sticky Notes!
Here's what I came up with. All strings only work when typed in a very specific window of the app Sticky Notes (German, Notizzettel). The idea is to separate the typed string (trigger) from the app in which the macro is executed.
Example. The front app is my browser. ⌘+space opens this particular sticky window "KM/Sticky String Trigger".
Then I type "fkm". (KM deletes the characters afterwards and the cursor is always in the right place to enter a new string when this window is opened again). KM now switches back to the browser and performs the action "Open URL“.
Basically anything can be done this way, I think. Of course also normal text expansion. If the cursor is not in a text field by mistake (target app), nothing happens, because the text cannot be pasted.
Note: The longer the string, the more likely you need a pause before "Activate Last Application". Otherwise the characters will not be deleted correctly.
Here where I see the advantages of this "system":
-
Strings are more intuitive than shortcuts and you can see what you are typing. Shortcuts are also often already in use.
-
The system seems secure to me. The string triggers only work if Sticky is the front app and only in one specific Sticky window. In all other windows of any app nothing happens if the string is typed.
-
Because this particular sticky window is not the normal writing environment, it needs no or much less prefixes or suffixes around the actual string. So I don't have to type "=km=" if I mean "km".
-
It doesn't need "Enter" at the end of the string. Unlike "Trigger Macro by Name".
-
You can use as many letters as you want as a trigger. Unlike palettes that only allow one letter/character.
I still have one problem though. As I said, ⌘+space shows/hides the sticky window. How do I make it show only this window (KM/Sticky String trigger) and not other sticky windows as well? Unfortunately it does not work like this. Does anyone know how to do it?
Now I still need a smart system for the strings. I do not know yet what would be wise. I'm considering (at the beginning) to have a KM palette besides the sticky window as a reminder. Maybe something like this.
Unfortunately my KM knowledge is rather limited. I'm sure this can all be done much better. If anyone has ideas I would be very happy to hear them. Thanks! And I wish everyone a happy new year!