How to disable Clipboard History and reading from clipboard?

I was surprised to discover that Keyboard Maestro was reading the clipboard every time I copied something to it:

I would like to turn this function off. Your documentation at https://wiki.keyboardmaestro.com/manual/Preferences says that I can set the history size to zero:

If you wish to effectively disable the Keyboard Maestro Clipboard History, you can do so by setting the history size to zero, and then Keyboard Maestro will only read the clipboard when you explicitly ask it to use the clipboard.

But it also says to never set the history size to zero:

Alert: You should never set the max number of items to zero.
If you set the max number of items to zero, then the Copy action will fail.

So I'm confused. Should I set the history to size zero to disable KM from reading my clipboard? Or should I be doing something else?

You need to set it to 1, not zero, to disable it.

defaults write com.stairways.keyboardmaestro.engine MaxClipboardHistory -int 1

FYI, there's an option that lets you turn off clipboard history for individual applications. I had a problem where GIMP was crashing because of the clipboard history, and this solved it. Use Keyboard Maestro->Preferences->Excluded tab to set the applications to be excluded from the clipboard history.

If you choose to set the history to 1, be aware that if you download macros other people have written, they may not work right. Most often, you'll find someone has included an action to delete the most recent item in the clipboard history, and it'll fail. If that happens, just disable that action.

1 Like