Keyboard Maestro “Find app with secure input” Macro

Here is a quick macro for the status menu, which tries to find the culprit app, which has activated SecureInput, using Peters shell-commands from this post Disable Secure Input?.
It is not perfect. If the process ID is low, it finds the ID in many places.

Maybe someone with more RexExp experience can perfect it.

Find app with secure input.kmmacros (5.0 KB)


This should avoid any ambiguity.


Discover App Responsible for Secure-Input .kmmacros (2.7 KB)

1 Like

I knew somebody smarter than me would make it work better. :smile:

I do wonder if a hotkey is a viable solution, when secure input is triggered. I was under the impression that KM could see it with secure input enabled.
That was why I used the status menu trigger.

Hey Jimmy,

It works – I tested with secure input enabled in the App-Store.


Glad it works.

Secure Input disables Typed String triggers (and other things like setting a hot key). But it does not disable hot keys.

This is why you can use a hot key trigger from within a password field, but you cannot use a Typed String trigger from within a password field.

I came across this thread and saw a few parts that really jumped out at me as very inefficient so I took a few minutes to optimize it.

The ioreg -l -w 0 command is extremely inefficient. Running ioreg, especially showing all properties, dumps a LOT of text. It is like opening a fire hydrant then using a straw to get a drink!
A test run took over 2.5 seconds and dumped over 18,000 lines which came to 4.2MB.

A better option is to only have it return only the specific section that holds the value we need, in this case the IOResources object and only the top entry. That command is ioreg -n IOResources -r -d 1 -l and a test run was over 100 times faster (0.021 seconds, 34 lines)

Instead of sending the output text to the grep or perl programs, keep it internal as a variable and grab only the process ID number using regex.

If it found a process ID number, then get the application name. Another optimization is for the ps lookup. We don't need to get a list of all process by all users and then filter out what we need. Using the -p option with the process ID will return only that process.

Here is what I've come up with. The Execute Shell Script action can be used in your own macro if you need to check if Secure Input is on or not. I hope someone finds it useful.

Is Secure Input enabled.kmmacros (4.0 KB)


@Onan, thanks for sharing your enhancements to this process/macro.

You did all the hard work, but I have a minor enhancement to improve the output. This gives you a more visible notice of results, whether Secure Input has been enabled, or not.

It's just a minor change to your last Action, so, I'll just post my changes:

Note that the below is an upload of my ACTIONS, not the entire MACRO.
After you download it, open Onan's macro, click on the last Action, and then select File > Import Actions ... This should attach my Actions at the end of the macro, and you can, if you wish, delete (or disable) the corresponding Action in Onan's macro.

Enhancement to Onan's Secure Input Macro.kmactions (4.4 KB)

1 Like

My macro sends to a notification instead of a display text window because I was getting annoyed by having to keep closing the windows. But the notification box is small and wouldn’t be able to display all the text you’ve added.

Nice update though. It leaves many options up to the end user on how they want to be notified.

Thanks Onan.
This has replaced my original macro.
I was sure someone would come by this post to make the macro better and several have. :slight_smile:

I just used my personalized version of Onan’s macro to get out of a jam.

Something on my system was enabling secure-input, but I didn’t have anything running that reasonably might be the culprit.

I ran the macro and found out Safari of all things was the troublemaker even though there were no secure-input fields in any open tab.

Quitting and restarting Safari solved the problem.


Great. Any idea how to get this to stop pestering me?

I used to be able to click "Never" but this is something new.