Text expansions issue

Hi i use text expansions often with Keyboard Maestro. For some reason, this one snippet never deletes the first two keys in the mail applicaiton and some others, but it works totally fine in others. In the mail application, it always winds up being "CyCould you please help?"

Do you have any idea why this is happening?

Thanks, Dan

Which mail application? Mail.app or something else?

Keyboard Maestro will be sending the five deletes and then the characters from your text, so the question is simply why the result is not what it should be.

Possible causes are:

  • Typing something after the trigger text very quickly. If you type “cyph” very quickly for example, then the deletes will delete the spaces and the “ph” and leave the ch.
  • Something messing around with the keyboard event queue. Badly behaved programs can sometimes extract characters from the queue and then insert them back in to the queue (at the end) which results in out of order characters.
  • Having some other type expansion program also doing something with the “cyph”.
  • Having something set up in the System Preferences text shortcuts that is being activated.
  • Timing issues if the deletes are too fast for the target application (which should be impossible with the event queue, but people are remarkably good at writing bad applications sometimes).

If you don’t find an answer from the above, try this:

  • Trigger on “cyph” *without simulating the 5 deletes.
  • Actions:
  • Pause 1 second
  • Type a Delete Keystroke
  • Pause 1 second
  • Type a Delete Keystroke
  • Pause 1 second
  • Type a Delete Keystroke
  • Pause 1 second
  • Type a Delete Keystroke
  • Pause 1 second
  • Type a Delete Keystroke
  • Pause 1 second
  • Insert Text by Typing “Could…”

That will let you see whether anything else unexpected is happening, and see if it is a timing issue.

1 Like

Thanks Peter. Its the default apple mail app.

It happens no matter how slowly i type it out and even when i type nothing after it. I don’t have any other expansions/programs that i think could be interferring.

I tried doing the steps you suggested, but was confused- after it didn’t do deletes anymore, i was just deleting the end of the expanded sentence with each delete key? Sorry if i misunderstood

However, i just tried removing the space at the end of the 4 letters and it is working fine now. I guess that the space was messing with it?

Check your System Preferences, text shortcuts, see if you have the mapping there (synced from an iPhone perhaps).

My suggestion was to slow the whole process down. Stop Keyboard Maestro from doing the deletes automatically, then have it do the deletes slowly and then the expansion, giving you a chance to see what is happening.

1 Like

Oh ok i understand now. I’m going to stick with using the macro without the space at the end because its working fine now, but ill remember that if this kind of thing happens again. Thank you!