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? - #4 by peternlewis.
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.
I knew somebody smarter than me would make it work better.
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.
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.
@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.
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.