Cannot enter text into Terminal

I did as instructed, Typed String trigger trigger “=x=” and Insert Text by Typing action “hello”, added a sound alert at end. Tried in Terminal, TextEdit, and Mail new message. I type the "=x=" and I hear the sound, but nothing is typed, or deleted. If I type "=x=" again the second time, I don't hear the sound. I only hear the sound first time third time and every second time thereafter.

I added an alert at the end, nothing gets typed, but alert sound is played.

I'm not sure if you meant to reply to Peter or to me.

Sorry, I accidentally appended an extra quote mark to the macro's command when I exported it. I've updated the link to fix that and change the trigger to Control-Option-D.

I tested it in Terminal and iTerm on a folder with folders in it and in both cases it not only pasted the command on the command line but it returned the size of the directories in that directory.

I ran it from a Global Macro Group, as Peter suggested. Just make sure your Macro Group enables Terminal in some way.

I am trying everything both you and Peter mention. So far the macros I am trying, execute Because I get the alert but nothing is typed Into the front most window whether Mail New Message, Terminal or TextEdit.

Ken G. Brown

That makes me think the macro is not active when you're in Terminal. Which would be odd for a Global Macro Group. Sure you enabled the macro itself?

With 1) my Directory macro in the Global Macro Group and 2) the macro itself enabled (I think the default on import is to disable it) and 3) a Terminal or iTerm window active (well any application like a text editor if you have the macro in the Global Macro Group), the command should be deposited in the window.

Yes, the macro executes because I hear the Alert sound located right after the attempt to type text, whether Mail, Terminal or TextEdit windows are front most with insertion bar active ready to type in them. I see the ‘=x=‘ and hear the Alert but nothing else gets typed.

Ken G. Brown

Would you mind uploading your macro so we can see what's going on?

Here it is I think: test.kmmacros (1.7 KB)

Once I enabled it, that macro works exactly as expected here. I tried it in Terminal.

Alright then, it seems like it should work here as well but does not. I tried disabling Little Snitch, Quitting PathFinder, quitting KeyCue but nothing helped yet. I can’t think of what else might be getting in the way. I’ve also added KM in System Preferences/Privacy where it seemed appropriate.
What next?
Thx.
Ken G. Brown

Look at the Engine Log (Open Logs Folder under the Help menu of the Editor) for a clue. And try the Interactive Help on that menu, too. Good luck!

Will do. Another thing I tried was doing Record, clicked into partially hidden TextEdit window, sorta expected to see Activate textEdit first but did not. Trying explicitly doing Activate TextEdit before the Insert Text by Typing, did not help.

Ken G. Brown

Further:

Engine log shows:

2020-05-16 12:02:30 Execute macro “test” from trigger The exact case string “=x=” is typed (then deleted)

Don’t see anything other than my ‘=x=‘ typed in the TextEdit window and ‘=x=' stays there.

Ken

Seems like something is swallowing your keystrokes. Keyboard Maestro is sending them, according to the log.

Yet further:

Tried KM “test" from another admin logon that I had not used before, same symptoms.

Ken

Further:

Engine log shows:

2020-05-16 12:02:30 Execute macro “test” from trigger The exact case string “=x=” is typed (then deleted)

Don’t see anything other than my ‘=x=‘ typed in the TextEdit window and ‘=x=' stays there.

Ken

Tried macro “test” on my MacBookPro macOS Mojave 10.14.6 (18G5027) and it worked properly.

Tried macro “test” on my MacPro macOS Mojave 10.14.6 (18G5027), from another fresh admin account and it did not work.

Tried logging in with shift key held down, “test” did not work.

Ken

Further:

Engine log shows:

2020-05-16 12:02:30 Execute macro “test” from trigger The exact case string “=x=” is typed (then deleted)

Don’t see anything other than my ‘=x=‘ typed in the TextEdit window and ‘=x=' stays there.

Ken

Since you're running Mojave, it might be worth going through the accessibility/permissions dance again on the Mac Pro.

Good idea.
I just noticed that the Named Clipboard Switcher Cut, Copy, paste functions no longer work either.

What are all the permissions I should check? I must have missed something.

Thx,

Ken

Ok, that solved my problem, working now! Yay!
I went into System Preferences/Security & Privacy/Privacy/Accessibility and toggled everything off, quit System Preferences, then toggled everything on again and KM is back in operation properly.

I see in Troubleshooting, a bug in Mojave is mentioned. Should have looked there first.

<https://wiki.keyboardmaestro.com/manual/Troubleshooting>

Thx everyone,

Ken G. Brown

1 Like

Glad you solved it!