I have been experiencing an issue that I’m not entirely clear on how to diagnose. This concerns using Keyboard Maestro with (among others) the editor Alpha (alphacocoa.sourceforge.io/).
I only recently acquired a new Mac with Big Sur installed, replacing a 12-year old Mac Pro. For some years I had relied on QuicKeys on that machine. On the new machine have returned after many years to Keyboard Maestro, which I had relied on prior to making the move to QuicKeys.
One set of personal KM macros I use frequently wrap text on the clipboard in HTML/CSS tags. For example, one macro takes a URL on the clipboard and turns it into a list item:
Insert text <LI><A HREF=“
Paste from the clipboard
Insert text “></A>
This seems to work fine in other text editors I sometimes use (including TextEdit and BBEdit), but in Alpha quite frequently (25-35% of the time) the inserted text is slightly garbled, with characters in the inserted text out of order from what’s specified in the macro, or occasionally just missing. For example, instead of "<LI><A HREF=“ what will appear is "<LI<>A HREF=“ or "<LI<A HREF=“ or "<LI<>A HREF=“ and similarly “></A> might become "“></>A” or ““<>/A>” or whatever. It’s not consistent, and I can invoke the same macro 20 times in a row and get 15 instances that are what they’re supposed to be and another 5 randomly mixed in with characters swapped around,, or occasionally dropped.
I’m guessing it’s something to do with the inserted text being inserted too quickly, or something of that nature? However, I have I tried to fool around with pauses in the macro and so forth, to no avail. I'm looking for suggestion that will help these macros run reliably. (I'm also posting to the Alpha help list for ideas.) Otherwise, Alpha is very fast and I have no other problems with it.
Thanks in advance.
For reference, here's an example as it currently stands:
Usually anything to do with keystroke automation, you may need to put some delay to improve reliability. Use this action to simplify putting delays between actions.
If I had to guess, the first thing I would try would be to make everything either “insert by typing” or “insert by pasting” rather than mixing the two.
Interesting suggestion. However, that seems to replace what was on the system clipboard with the first set of text that I was trying to insert by typing, yielding the result <LI><A HREF=“<LI><A HREF=““></A>
No "seems" about it – it does – because the system clipboard is the only clipboard. All copied and pasted text go through it. All other clipboards in KM or otherwhere are pseudo-clipboards.