Copy with Ctrl+Shift+1, Ctrl+Shift+2, paste (respectively) with Ctrl+1, Ctrl+2 (etc)

I want to be able to do the following:

  1. Select text (e.g., example text one)
  2. Hit Ctrl+Shift+1
  3. Select text 2 (e.g., example text two)
  4. Hit Ctrl+Shift+2
  5. Hit Ctrl+1 and paste example text one
  6. Hit Ctrl+2 and paste example text two

I don't need a UI, popups or anything.

I only need shortcuts 0-9

Paste should be in plain text only.

Is this possible with Keyboard Maestro? If so, how?

Macro 1, Hot Key trigger Ctrl +Shift +1
Action Copy to Named Clipboard "Copy 1"

Macro 2, Hot Key trigger Ctrl +Shift +2
Action Copy to Named Clipboard "Copy 2"

Macro 1, Hot Key trigger Ctrl 1
Action Paste from Named Clipboard "Copy 1"

Macro 2, Hot Key trigger Ctrl 2
Action Paste from Named Clipboard "Copy 2"

4 Likes

Fantastic. I will buy this program and give that a try.

2 Likes

Do the reverse, give it a try and then buy it. Keyboard Maestro has a 30 day free trial. I have no interest in customers who can't get value out of Keyboard Maestro purchasing it.

5 Likes

It worked and I bought it.

2 Likes

I'm having an issue actually. My normal Cmd+C/Cmd+V are "taken over" by the last thing I paste using Ctrl+1 (etc.).

I tried making a named clipboard for the standard copy/paste, and that worked, but then I cannot paste from my screenshot app.

So, ideally, I want my regular Cmd+V and Cmd+C left completely alone. Is there a way to do that?

I figured it out: you have to backup your system clipboard and then restore it for each paste.

Each time Keyboard Maestro either saves or pastes from a named clipboard it makes use of the System Clipboard so, whatever is copied or pasted from the named clipboard also becomes the item in the System Clipboard.

If you want whatever was in the System Clipboard before using your Macros to remain, you can do that by using the Action Delete Past Clipboard to in effect reset the Clipboard each time.

So, for the Copy Macro:

Macro 1, Hot Key 3 trigger Ctrl +Shift +1
Action Copy to Named Clipboard 5 "Copy 1"
Pause for a short time (to make sure Clipboard has changed)
Action Delete Past Clipboard 0 (which returns the Clipboard to what was in there before)

And for the Paste Macro:

Macro 1, Hot Key 3 trigger Ctrl 1
Action Paste from Named Clipboard "Copy 1"
Pause for a short time (to make sure Clipboard has changed)
Action Delete Past Clipboard 0 (which returns the Clipboard to what was in there before)

https://wiki.keyboardmaestro.com/action/Delete_Past_Clipboard

I didn't understand if you want to copy/paste in a sequence or not. Anyway, if you want, take a look at this too.