Insert text from clipboard by typing

Yes, I didn't think the clipboard was the issue here, this is a typing issue.

So the "ABC" keyboard layout? I've actually never heard of that one. However in my tests, that was fine: @$test

No, Perl has nothing to do with this.

I would suggest you change to a different keyboard layout and see if that resolves the problem.

Almost certainly the keyboard mapping as reported to Keyboard Maestro is incorrect, or there is something else weird going on.

As previously, I would suggest:

  • Check the keyboard layout
  • Restart in safe mode
  • Try in a new account

Something is weird or corrupted on your Mac.

I don't know of any such tool. Keyboard Maestro only does it via debugging messages if enabled.

@rob, have you tried the Safe Boot that @peternlewis suggested?

At this point I think you're wasting time until you do that.

  1. Boot in Safe Mode
  2. Open one of the apps where you have problems, and try just normal typing.
  3. Now start up KM, and try the simplest Macro, the one that just types the problem characters.

Report your results here.

Will try that soon (if IT did not block that).

Just tried the same macro (without Safe Boot) on my old MacBook Pro, also configured with an "ABC" keyboard. There it works fine!

The problem with this new machine is that it is configured via MDM by IT (instead of manually by me) and I'm restricted in what I can do (plus they installed a lot of software I'd rather not have on my machine - like a virus scanner that slows down my builds, making the new machine no faster than the 4 years old one...)

It is not at all implausible that they have some sort of key logging software or other event monitoring process that is messing up the event queue and interfering with the simulated keystrokes.

Actually, that is a thought, fire up Terminal, turn on Secure Keyboard Entry:

image

That will act as if you are in a password field, which will block applications from seeing the event queue. It will stop Keyboard Maestro’s Typed String trigger, but hot keys still work. So you a hot key triggered macro to type your text in there. See if that changes anything. It probably wont, but if it did, it would definitely point the finder at some software messing around with the event queue.

In "Secure Keyboard Entry" mode it also only displays the text after @$.

(hope to try Safe Mode this weekend)

Same erratic behavior in Safe Mode.

Also with different keyboard layouts.

Out of curiosity I created a snippet in Alfred that expands to $@test.

That snippet works fine; all text is inserted in the underlying App, so also $@.

Even if I let KM insert all characters as single actions, the $@ is not inserted by KM...

If I put a long pause (I tried 5 seconds) between each character, only $ is not inserted.

Since I get a beep instead, for a moment I hoped this would be it, but unfortunately not: https://discussions.apple.com/thread/2560932