Multiple select from Clipboard History Switcher pastes wrong data?

So I hadn’t had occasion to select multiple items to paste items back, until just now, and it seems that items don’t get pasted back correctly when multiple items are selected.

Use case:

Clipboard history switcher has these items listed

One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten

I select all odd items (One, Three,…)

Press Enter, and I get this pasted into the front window:

Three
Three
Five
Nine
Nine

If i start with the same list of One…Ten, and select all ten and hit enter, I get this back:

One
Two
Three
Five
Six
Seven
Eight
Nine
Ten
Ten

Four is missing, and two Tens .

Is this a known bug or some other explanation?

edit: so I’ve tried this a few times, and each time it’s slightly different, which would suggest some sort of race condition I guess? Can anyone else reproduce or refute my experience?

See the wiki article Sometimes the Wrong Thing is Pasted.

In this case, you don’t have any control over the timing except for the hidden preference that controls the delay after the Command-V.

defaults write com.stairways.keyboardmaestro.engine SimulateKeystrokeCommandKeyDelay -float 0.15

Try increasing that and seeing if that resolves the problem. Set it high to start with and then drop it back down if it works reliably.

There are other possibilities (eg, clipboard caching in the target application) that will be more difficult to work around.

Peter please delete this if feel like it (of course you can do whatever you want since it is your forum) because I don't want to intrude. Looks like Peter already answered your question directly so you should be covered.

I have tried several clipboard managers QuicKeys, QuickSilver, Launcbar, Clipboard History, Clipboard Center etc. Just found "Paste – Clipboard history manager" ‎Paste - Endless Clipboard on the App Store this week and I really like it in conjunction with use of a trackpad for two finger scrolling (though arrow keys work too). It's different than any of the others that I have used in a good way. It was $2 on Tuesday so I have not time tested it.

My question to Peter is would you suggest not using applications like this in conjunction with Keyboard Maestro if you are not using Keyboard Maestro clipboard history. I worry about things conflicting like the documentation you posted states.

I think you pretty much already answered my question with this statement.

Feature request :wink:

Can we have a single paste operation from the switchers that concatenates all selections together? Or, is it possible for me to write a macro that can read the selections in the switcher ? If I’m selecting multiple items to paste somewhere, I would rather that be one undo away from the previous state anyway.

Thanks!

There should not be any issues using multiple clipboard history apps together. Each one will read the clipboard. Some apps don’t like some of their clipboard flavors being read (Microsoft and Adobe apps are, unsurprisingly, the most common offenders), and having multiple apps reading the clipboard may increase the chances of those sorts of issues.

Keep in mind that each will have its own history, so if you delete an entry from one, it wont delete from the other. And things like how they deal with passwords may be different.

But there should not be conflicts in general.

Its a good idea, I'll add it to the list. The first half is on the list, but its always problematic in that you likely want some sort of separator, and then how do you set that? But the second one would allow you to build what you want, so it definitely has potential.

1 Like

Hey Peter,

I'd like to see SHIFT-RETURN (or other keyboard shortcut) insert a default separator between multiple pasted items.

Make the default separator selectable with an expert pref but initially a set to a linefeed (or two).

So that would fairly easily account for item 1.

Item 2 would also be great.

-Chris

Sometimes I think you guys never want 7.0 to ship…

Hey. You’re the one who said bring on the ideas. :smiling_imp:

-ccs

1 Like