Paste from Clipboard History 1 and keep position?

That would be great! I see no advantage to the order changing after a paste.

1 Like

Don't necessarily want to change, always on the lookout for better ways to do things or to learn the power of the software better.

Pasting always has to set the system clipboard, that is how pasting works. The clipboard can be restored afterwards, but there are problems with that as described in wiki FAQ Why is the clipboard not restored after any clipboard action?.

Keyboard Maestro does not restore the system clipboard, not after this case, nor any other case where it pastes (eg with the Insert Text by Pasting action) because to do so invites problems. Either the clipboard is restored too quickly, and the original system clipboard is pasted instead of the desired one, or the clipboard is restored too slowly and something else has replaced it and is then overwritten.

Yes, it would be nice to be able to paste from something other than the system clipboard, but macOS does not support that concept.

2 Likes

Curious statement. If we can write a macro to do this, why can't you do it internal to KM? After all, you have direct control over everything except what is on the System clipboard.

1 Like

The point is, if you write it, then you take responsibility, and you have the option of controlling the delay.

If Keyboard Maestro does it, then when it fails, you have no recourse except to blame Keyboard Maestro for the system pasting the wrong thing.

Keyboard Maestro cannot do it reliably, so Keyboard Maestro does not do it.

1 Like

Perhaps so. But couldn't you at least do this:

Provide an option to paste from PastClipboard N, and then do NOT remove that clipboard from the history.

In that case, all the user would have to do is delete PastClipboard 0.

1 Like

That is doable, although it would break one of the rules about the clipboard history, that duplicate entries are removed. Admittedly, this rule has caused problems when trying to manipulate the clipboard on occasion, and it's not clear that it adds a whole lot of value (although clearly if you open the clipboard history and instead of seeing ten things you end up just seeing a pair of things multiple times that is a case where the rule adds value).

2 Likes

Hey Peter,

LaunchBar also removes duplicate entries from its clipboard history.

I find this annoying under several circumstances, and I think I would prefer to allow duplicates.

Perhaps with the ability to manually flush dupes at need, but I could live without it.

Usually I manage to muddle-through with both Keyboard Maestro's and LaunchBar's clipboard histories, but I still sometimes get bit in unexpected ways.

-Chris

1 Like

Right, but that is the exact point, and the user would be well aware of this when using this new paste action Paste from PastClipboard & Keep. Of course, with the use case we are discussing here, the duplicate would be quickly removed by the user's macro action Delete PastClipboard 0

Yes, I understand that. Internally, it would make no difference, I could keep references to the two clipboards.

But I do wonder whether it would end up with the history being cluttered up by many duplicates of the same thing. For example, I know when I am programming and moving things around, I will often copy the same variable name multiple times, and to have that scattered through the history would seem less than useful for the normal use of the clipboard history switcher for example.

I'm not sure how to best resolve these two conflicting use cases.

Well, to be clear, Chris is asking for something different that I am.
I'm asking that you only allow duplicates in the one case where the user has used a specific action designed just for that.

So, in my case, the normal remove dups would continue.

Yes, I understand that. Potentially the Set Clipboard to Past Clipboard action could have a specific option for this purpose. Or possibly there could be some more comprehensive difference in/control over behaviour.

I will ponder it.

3 Likes

Hey @peternlewis,

That sounds fairly reasonable...

If there was a way to do these two things then I think most of the expressed issues could be solved.

  • Copy without removing dupes.
  • Paste without removing dupes.

Then again the user would only have to accidentally copy something that's duplicated to have it suddenly screw up something they've been painstakingly building in the history.

What about the ability to toggle on/off duplicate removal?

-Chris