Paste previous

I got an email from Peter N Lewis that mentioned a “paste previous” macro that came pre-installed with Keyboard Maestro. I assume this macro pastes the first and second items on the clipboard with a single keystroke. I accidentally deleted this macro. Can anyone post this macro so I can start using it?

It’s in the Macro Library.

Select “Macro Library” from the Window menu to open it, then select “All Entries” in the Categories column and type “paste previous” into the search field at the bottom. The “Paste Previous Clipboard” macro will be found and you just have to click the Insert button to get it into KM.

BTW, that macro doesn't "paste the first and second items on the clipboard", but pastes the second most recent one. If you want to paste the most two recent clipboards (most recent first and then second most recent) you can do it like this:

If you want to paste them in the reverse order, you can do this:

Many thanks, the last macro you posted is what I actually wanted to do.

I use this a lot, but I prefer to paste the previous clip and leave it as #2 in the history so I finish it off by setting the system clipboard to Past Clipboard 1 again at the end, leaving everything the way it was.

I’ve been told to watch out for timing issues, but I’ve not run into a problem: http://wiki.keyboardmaestro.com/Troubleshooting#Sometimes_the_Wrong_Thing_is_Pasted