Since I'm such a shell script novice, I don't understand your intent here.
Do you have a better method to disable secure input?
Sorry to be unclear.
I donât think there is a way to disable secure input via shell.
My only intent was to suggest a slightly-more-efficient way of getting the same information via the shell.
Correct. Or âcorrectishâ.
You cannot disable the secure input protection system. Secure input mode will only be turned off if the application(s) that turned it on turns it off or quits (or is killed).
So if you find the offending application, then you can quit or kill (via a script) it to turn off secure input mode.
However for some services, the application will not be known and so it will effectively be the loginwindow process, which is the overarching process that holds your whole login, so killing that will log you out - highly not recommended. If you're going to do that, just logout.
This command works well for me
ioreg -l -w 0 | grep SecureInput | awk 'BEGIN {FS="[^a-zA-Z0-9]+"} {print $8}' | uniq | xargs -n 1 ps aux
And to kill it:
ioreg -l -w 0 | grep SecureInput | awk 'BEGIN {FS="[^a-zA-Z0-9]+"} {print $8}' | uniq | xargs -n 1 kill
Also, thanks to everyone on this thread! What an awesome community!
I also want to share that this is kind of a sad reality for me, because my company's VPN client, turns on SecureInput
while it is running, even if not connected to the VPN. Also, killing it does not help for long, because some unknown process keeps it auto-starting. So many of my macros (particularly ones that provide direct keyboard input when triggered) are useless unless I: Rename the app, kill it, do my work with all my glorious macros, rename the vpn client back to its original name (which triggers the autostart).
Anyways, it would be nice to turn off the "honoring" of the SecureInput
system setting in Keyboard Maestro. Or at least whitelist certain sources of it being turned on. (I notice that Keyboard Maestro is able to detect the culprit since it displays it correctly on the warning message when I open the editor. Perhaps it would not be difficult to add a whitelisting feature.)
Cheers!
I am not a developer, but I don't know that it's possible to do that, because the secure input is an OS-level feature.
Be extremely careful with that as the system can sometimes point to the loginwindow (which is the parent process of your whole login) as the culpret, and this would basically kill your whole login without any chance to save changes.
Unfortunately, this is not possible. Secure Input Mode is a system security facility, Keyboard Maestro cannot work around it.
Maybe it would be possible to disable the facility entirely via some sort of system hack that would almost certainly require turning off System Integrity Protection first, but it would be very hard to recommend such an action even if it was possible,
I'd complain to your IT department, but I know how likely that is to accomplish anything.