I have only today understood what a Named Clipboard in Keyboard Maestro is. I am seeking further understanding: why would I use a Named Clipboard and not a Variable? Each is content that is named and stored, can be retrieved, and can be over-written. Neither saves any past contents.
Fwiw — and at least one other poster here had the same confusion — the key to understanding what Keyboard Maestro means by "Clipboard" for me was to change my concept of the System Clipboard from a virtual clipboard (a board with a clip that hold items) to one of the items being held. As I now understand the workings, what I had thought of as a clipboard is, in Keyboard Maestro, a Collection entitled "Clipboard History". From the island of my understanding, calling the item clipped a clipboard and not a clipping is an interface blunder (presumably by OS designers). I'll venture that no-one has ever purchased a clipboard that can hold only one item.
From the wiki:
- Store a copy of another Clipboard (System or Named) that will persist, even across your Mac restarts, until you either change it or delete it.
- Make changes to a Named Clipboard using Actions like Apply_Style_to_Clipboard.
- Store styled text, images, etc that cannot be stored in a Keyboard Maestro Variable (which stores only plain text)
Example Use of Named Clipboards
- Storing styled text and/or images for future use, like a styled email signature or logos.
- Saving the current System Clipboard for future use
- To restore at end of your Macro.
- To use in other Macros.
I would say the ability to store styled text and images is the biggest benefit over Variables.
As @avtraino has already said, Variables store just plain text. If you store the word "red" in a Variable that is all you are storing i.e. "red" without any formatting, font or anything else.
Named Clipboards can store whatever you have copied to the System Clipboard. So, that could be "red" in Helvetica etc. Or an image. Or a sound. Or pretty much anything else that you might use Copy and Paste to achieve in an Application.
For example, in the Mac App Preview you could make a rectangle and rotate that rectangle to a certain angle, copy that to the System Clipboard and use KM to save to a Named Clipboard. Then anytime in the future you could use that saved KM Named Clipboard to paste in that same rotated Rectangle into a new Preview document.
Another example - In Final Cut Pro you can copy effects from one clip in the timeline to another clip. If you are often copying and pasting the same effects you could even save that as a KM Named Clipboard then make a simple Macro to paste in that Named Clipboard to any clip in a future project.
There are some limitations regarding clipboard flavours though. As an example, you don't seem to be able to store Logic Pro regions on a clipboard, if I remember correctly.
Yes, at one point I had to have a serious think for a while to clear my fogginess about the subject of clipboards, due to that terminology!
MacOS continues to offer only one clipping per "clipboard" and only one system-wide clipboard, so I don't think we can pin the blame on Apple... this time.
Since it's not just me who got confused, I wonder if the Keyboard Maestro documentation should touch upon the difference between clipboards and the items held in them. It could be more consistent about what is meant by "clipboard" too (@peternlewis). For example, the Clipboard page says :
The Clipboard History keeps version history of the last two hundred times you have copied something to the System Clipboard. You can then paste any previous system clipboard by triggering the Clipboard History Switcher macro.
Here, "any previous system clipboard" means "any item that had been held in the system clipboard previously". There is no such thing as a "previous" system clipboard – there is only one.