I will show you how to view and erase the contents of the clipboard when copying and pasting on your Mac.
I will also show you how to manage the clipboard history.
How to view the contents of the Mac clipboard
▶ Brings the Mac Finder to the front.
▶ From the Apple menu, select “Edit” -> “Show Clipboard”.
▶ As shown in the figure, the screen is displayed and the contents of the clipboard are displayed.
At the bottom of the screen, the type of clipboard content (“PNG image” in the figure) is displayed.
How to erase the contents of the Mac clipboard
▶ From the Finder, launch “Terminal.app” in the folder “Applications” -> “Utilities”.
▶ When “Terminal” starts, copy and paste the following command.
pbcopy < /dev/null
▶ After pasting, press the return(enter) key on your keyboard to execute.
▶ After executing, check if it is deleted by the previous item “How to view the contents of the Mac clipboard“.
How to automatically erase the contents of the Mac clipboard
For security reasons, this is a trick that can be used when you want to erase the contents of the clipboard at regular intervals.
Here, we will show you how to use a free app called “Clear Clipboard” and how to use AppleScript.
Introduction of a free app, “Clear Clipboard”
“Clear Clipboard” is easy to use, so I recommend it.
▶ When you launch the app, an icon will appear in the menu bar.
▶ Various settings can be made on the Preference screen.
The settings are as follows:
Item | Description |
---|---|
Auto clear clipboard with a delay of 〜 seconds | Automatically erases the clipboard after ~ seconds |
Clear clipboard on computer sleep | Automatically clear the clipboard when your Mac is asleep |
Clear clipboard on display sleep | Automatically clear the clipboard when the display is in sleep |
Clear clipboard on screen lock | Automatically erase the clipboard when the screen is locked |
Show status bar icon | When there is data in the clipboard, the icon is displayed in black, and when there is no data, it is displayed in light gray. |
Play sound on clearing finsh | Sounds when erasing clipboard data |
Keyboard shortcut | Register a keyboard shortcut to erase the clipboard data |
Introduction of the method using AppleScript
Please refer to the link below for how to use AppleScript.
Clear Clipboard on OS X after ‘n’ seconds
The script below clears the clipboard every S seconds:
#!/bin/sh # pbclear [seconds] S=${1:-10} while true do pbcopy < /dev/null sleep $S done
Save it to a file named pbclear, set executable permissions with chmod +x pbclear, and put it somewhere in your path, for instance, /usr/local/bin. Then run it in the background with pbclear 60 & to clear the clipboard every 60 seconds.
How to manage your Mac clipboard history
On Mac, only one data can be saved in the clipboard.
To extend this to have multiple clipboard histories, you need to use apps.
The apps are introduced in detail in the article linked below.
Conclusion
The clipboard function of Mac is not so good compared to Windows, but there are various apps that expand the function, so it is recommended to try them once.
Reference information
This is the end of this article.
コメント