Type a Keystroke: not working

I can not seem to use the Type a Keystroke action as I can't type anything in the relevant box.

  1. I have restarted my computer (Mac OS 12.4) to no avail.
  2. Keyboard Maestro Engine and Keyboard Maestro are both selected/active under Accessbility.
  3. Keyboard Maestro Engine running
  4. I have not received any message from KM about secure input being enabled. I have no idea how I'd check this on my own

The problem is true on both computers: M1 MacBook Air and 2017 iMac 27"

I've seen previous topic on this issue, but none of the suggested causes seem to be a problem in my case. Or it's a cause that I can't detect.

Using KM 10.1.1

This inability to just type a keystroke kinda takes all the potential joy out of using KM. Hopefully this can be resolved soon.

Probably no help - so apologies in advance. But just in case:

The only times I have had this with Keyboard Maestro is to do with the dreaded secure input being enabled... when that happens I can't type in keystrokes (as you are saying) or even set hotkeys.

But a solution that works consistantly for me is to set a corner to put the Display to Sleep in System Preferences>Desktop & Screen Saver>Hot Corners...

When I realise Secure Input is enabled and I can't enter stuff, I move the mouse to that corner and straight away out again. That solves it (for me). Hope it solves it for you too.

Zabobon: Thanks so much for your suggestion. I certainly would never have thought to try your approach. I just tried now ... but alas it did not work for me. Probably will help someone in the future though!

1 Like

As with all these "it was working and now it isn't" cases -- what's changed? That'll give you something to concentrate on in your troubleshooting.

Meanwhile -- can you successfully copy a "Type a Keystroke" action from one macro to another? If so, shout out if you need a particular keystroke and, hopefully, someone will oblige.

@Nige_S When I review the relatively short number of macros I have which are somewhat similar then I'm always using the "hotkey" approach. That obviously worked fine ... but no longer does!

In the current case I want to type command-A, followed by command-C to copy all the text in a markdown document. (The rest of the macro auto-takes me over to my web design app so the content is ready to be pasted into whatever page I'm working on at the website.)

So, yes, a short term solution would be great!

However, longer term it's pretty important to know how to identify and solve this problem. Essentially KM is almost useless in this current state.

Quick update: my MacBook Air now can type in keystrokes! Yea. But I have zero idea why or what happened to create the change. My iMac however still can do nothing.

At least I know have my wanted macro that includes using command-A followed by command-C followed by several more steps. And the macros sync via iCloud.

... but there must be some way "in the moment" to figure out what's causing this. It seems to be related to "secure input lockout". A couple of folks, a few years ago, wrote KM macros to find what app was the source of the problem. However their instructions via Terminal and/or their KM macro both do nothing for me. Perhaps enough has changed with OS to make those old commands/macros useless. Or I'm doing something wrong. But if I could efficiently find the "cause" of the problem then I could go about fixing things.

This is the thread I saw about the issue from 2015:

Apologies -- I may have been too literal in my reading, and confused the issue! I thought you meant you couldn't create a new "Type a Keystroke" action because

...rather than "my existing macros don't work because KM won't type anything in the relevant box".

If it actually is the first (which I now doubt!) then:


I'm not so sure -- as I understand it, that would prevent KM from interacting with other apps' text input boxes rather than stopping you from typing into KM itself. Simple way to check -- if you've got a macro that types into eg a Safari form field, run that next time you can't type into KM. If the macro works then it isn't a secure input problem.

Otherwise you're into standard troubleshooting territory. Keep a mental (or paper!) note of what you are doing so you can get a "before" and "after" view when the problem next crops up and look for patterns in the occurrences.

But I suspect that @Zabobon's reading is the correct one, so listen to him and not me!

Yes, it sounds like it is "secure input" which is why I shared my method of forcing out of that mode (which unfortunately didn't work for you).

Usually putting the display to sleep or restarting the Mac gets out of that mode. But you said you already tried restarting. It might be worth just having a look at what login items you have automatically launching at startup in System Preferences>Users & Groups>Login Items

Thanks to @Zabobon and @Nige_S for your continuing hints and help.

What's especially weird is my 2 computers have the same (or almost the same-if there's a difference I can't find it now) setup in terms of login items. I have turned off some login items on my iMac but with no benefit after restarting. M1 MacBook Air is fine. (Current iMac is Intel, if that makes a difference). I'm attaching 2 screenshots. One is from my current login items from Users & Groups area. The other is from auto-logins from Bartender 4 (which includes a wider range of apps). Bartender may be very hard to interpret as it only includes icons ... but maybe something will jump out at you as a possible culprit.


If you haven’t already, try toggling the accessibility settings as described in these two threads:

(Whatever version of macOS you’re on, this may still be relevant.)


@tiffle Thanks so much! In the first linked thread there were 2 suggestions:

  1. "The solution - as described in the links here - was going to System Preferences->Security & Privacy->Privacy->Accessibility and then turning off and then back on the Accessibility settings for Keyboard Maestro and KM Engine that solved the problem." This did not work for me because clicking on the settings did not work (i.e. I could not click "on" to off)
  2. " if things are still causing problems you can use the Terminal “tccutil reset Accessibility” command to reset the Accessibility permissions, then Restart". Yes!!!! This approach did work. Granted once I used the terminal command my Mac froze ... but I restarted and then had to set Accessbility for a bunch of things again ... but that was pretty easy.

I'm stating both in case someone else runs into this problem. My guess is the checking off/on in Accessibility settings will work for most folks with the problem. But for those with a deep problem of this sort like me ... the Terminal command does the trick!

Thanks for everyone who chimed it. This was a completely perplexing problem. Hopefully no one else will experience this.


I am having the same issue but with one exception: it will accept keystrokes that are not modifiers (eg A ) . but I can't choose modifiers. I have tried all of these solutions, to no avail. help?