MacOS – n easy way to clear/empty the clipboard

copy/pastemacos

I would like to find a combination of keys to clear the contents of the clipboard or better yet an application that can configure a timer to clear it automatically one minute after last paste operation.

Best Answer

Yes, you have a choice of three built in methods for clearing the clipboard.

AppleScript/Automator are two simple methods for programmatically manipulating the clipboard.

Here's a little script that does what you want.

tell application "System Events"
    try
        set the clipboard to ""
    on error err_message
        display dialog err_message
    end try
end tell

Also, Automator allows the same. You'll need to define a variable, double click on the name text to set it to null, and then drag in the set clipboard action before running / saving it. The benefit of using automator is that you can assign it as a service and then use system keyboard shortcuts to call it.

screenshot of automator setting the clipboard to null

For AppleScript or one of the nice terminal answers here that use pbpaste you might want to look at a free tool like FastScripts to launch the action from anywhere.