macOS secure input mode

Make it Visible


What is it?

macOS has this 'thing' / feature called secure input mode, it makes good sense, if the OS determines that you are inputting potentially sensitive data, secure input mode kicks in and prevents ALL keystroke monitoring, even from applications you have explicitly given permission to monitor your keystrokes!

Why is this an issue?

It seems that on my system, secure input mode sometimes/often becomes triggered and gets stuck in an 'active state' this prevents applications such as Keyboard Maestro and Text Expander from functioning as intended.

At the time of writing I am involved with creating a series of training videos, for this I record my screen using an application called ScreenFlow which captures my screen, mouse cursor and critically my keystrokes, so that these elements can be presented in the final video. Visual cues for keyboard shortcuts like Cmd+C and Cmd+V are comforting so that you the viewer can clearly see how the instructor is moving content from position A to position B without the need to vocalise these actions.

Secure Input mode is an absolute disaster when it comes to ScreenFlow, if active during my recording session, none of my keystrokes will be recorded! I have had to re-record a few videos when this has occurred.

Addressing the problem

Why not just check to see if secure input is enabled?

First, you need to discover whether or not Secure Input mode is active or not?

Over on the Keyboard Maestro forum I discovered an AppleScript that can be run to determine if secure input is enabled.

forum post:


This provided me with a convenient way to check if secure input was active or not, alas I failed to remember to run the script every single time!


I took the important lines of code out of the AppleScript, turned them into a shell script and in combination with a tool called TextBar we can run the script in the background every 10 seconds and display a warning message in the menu bar whenever Secure Input becomes active. I get a warning message in my menu bar!

If you would like to download the shell script:

Download the Shell Script