Cycling through clipboard history using keyboard shortcut

Currently I am using ctrl+v to active the clipboard history switcher, then using arrow to select the one I need, then press enter key to paste the clipboard content.

How can I just use ctrl+v to cycling through the clipboard history? so the action will be:
press ctrl+v to bring up the clipboard history switcher
press ctrl+v again to navigate forward to the second clipboard history (currently it is the down arrow key)
press ctrl+shift+v to navigate backward to the previous clipboard history (currently it is the up arrow key)

I got this behavior in another application which I think it is really convenient I am thinking if I can use KM to enable this feature in all application.


I have not tested this. But I would do it this way. ⌃+v opens the clipboard history switcher and a palette. The palette makes ⌃+v = arrow down (while it is open).
Enter paste the clipboard and ⌃+v closes everything again.

That should work, I think :innocent:

1 Like

Thanks @Frankb! Could you point me to the direction on how to open "a palette" and "makes ⌃+v = arrow down (while it is open)"? I'll search on "palette" as well.

I really don't understand much about it. How to do it really well, others will have to show you. The best I can manage is this.

This macro activates the Clipboard History Switcher and the Palette (Palette Nav).

Now you can navigate eg. space = down arrow and c = up arrow.

The palette also has a macro to disable everything when you hit enter to paste the desired clipboard.

It works. But as I said, this is really not state of the art.

1 Like

I am able to get your idea and understood some part (hopefully).

What should be the condition to enable the Macro group "Palette Nav"? And what macros should be created in that group? should this group be disabled by default and only enable it when first ^+v is pressed?

"Now you can navigate eg. space = down arrow and c = up arrow."
What I would like is to re-use ^+v to cycle through the clipboard history, not use different key stroke to do the nav of clipboard history

As what I understood as far:

  1. the first ^+v will activate the clipboard history switcher and show the palette "Palette Nav".
  2. when "Palette Nav" palette is showing (how to express this condition?), keyboard press ^+v should mimic down arrow in the clipboard history switcher to move to the next entry, right?
  3. when "Palette Nav" palette is showing, "return" will do the paste, hide clipboard history switcher, hide the palette, and disable the macro group "Palette Nav".

Yes, I know. I thought at first that it can't be done because a conflict arises. But the conflict can be avoided by having ⌃v in its own macro group.

That means you need two macro groups.

(1) ⌃+v does the following:

  • Shows the palette
  • Shows the Clipboard Manager
  • Disables this macro group.

(2) The Palette, here you need 2 macros.

  • ⌃+v = down arrow
  • Enter = Paste, hide clipboard manager, hide palette, enable macro group (with ⌃+v).

When the clipboard manager and palette are visible, ⌃+v becomes down arrow and you can navigate because the macro group 1 is disabled. Only when you press Enter this group will it be reactivated so that you can start again from the beginning with ⌃+v to open den Clipboard Manager....

This all works here but it's complicated, I can't explain it better, and I'm sure there's a better way to do it.

I have found a pretty good solution after all, I think. :slightly_smiling_face:

Clipboard Manager TEST Macros.kmmacros (9.3 KB)

Macro A: Opens the Clipboard Manager (⌃+v) and/or allows navigation with the same shortcut.

Macro B and C: Are self-explanatory

Macro D: Enter. If the Clipboard Manager is open, Enter pastes the selected clipboard and closes the Clipboard Manager. If not, it is simply Enter.

Thanks for the great idea! I am able to get it work and combine all of them into 1 macro. macro D is not needed as I think it is the default behavior when clipboard manager is open. (macro D is also triggered for every "enter" key unless we put some enable/disable to fine control it.

It's working fine for me. The apple script did the magic to check if the clipboard window exist. Where can I get more information regarding use apple script to check if a windows/popup exist?

For example (How to detect the outlook reminder popup and move it?) I'd like to know if the outlook's meeting reminder popup window exist and move it to the another location? If this can be done, I can schedule it to run every 1 or 2 min without using image recognition.

You see, you understand more about KM than I do. :wink: