Copying to Named Clipboards not always working in KM7!

Hi,

Since upgrading to KM7, I have been having troubles with my clipboard macros. I have 7 macros for copying to seven different clipboard and pasting from those clipboards. Since upgrading, they are not copying the right information into the clipboard. They are getting the contents of the current clipboard and not not the current selection. They are setup as:

Has the functionality of this action changed? I have also noticed that this is not always consistent. Sometimes it is working as before, but other times it behaves as above.

I use these shortcuts a whole lot. But, with the relative flacky nature now, I am inclined to revert to KM6. Please advise me on how to get this to work better. Thanks.

Richard Guay

Yes, there is a flaw in the Copy, Cut, and Copy to Named Clipboards. They do not wait long enough after the Command-C before continuing so they tend to read the old clipboard.

Try running this action:

  • Set Action Delay, Clipboard Delay, 0.4 seconds.

See Set Action Delay.

Either run it once and set it permanently, or add it before each of the Copy to Named Clipboard actions. You can remove it after you update to 7.0.1 which fixes the issue (I’ll get that out soonish).

Sorry!

1 Like

Peter, thanks for being honest and forthright about the flaw, and for providing a great workaround, and for quick updates.

2 Likes

I actually fixed it by putting a copy action first. I guess it basically did the same thing? When is the fix coming?

The fix will be soon, but not immediate.

Just did you suggestion and that works too. Thanks for the fix and for your quick help. Being in Thailand, I figured I would have to wait a day!

Since I’m in Australia, you’re only an hour or so different to me.

I see. I work for Envato in Australia. But, a lot of our team is all over the world.

It seems I still have issues with this action. I made this macro in Keyboard Maestro 7.0.3:

And, for instance, if my selected text is "Keyboard Maestro Is Awesome!", Keyboard Maestro often pastes "Keyboard Maestro Is Awesome! Keyboard maestro is awesome!"

It pastes it twice. Or it pastes the old clipboard followed by the filtered one.

And, as raguay mentioned, this is not always consistent. Sometimes it works. Sometimes not.

Hey Carey,

Never use a named–clipboard (unless of course you genuinely need too).

The default-system-clipboard is the medium by which named-clipboards are populated, so you DO NOT PRESERVE the contents of the system-clipboard by using a named clipboard.

(UNLESS – you deliberately copy the system-clipboard to a temp-clipboard – then cut/copy to your named-clipboard – then deliberately restore the system-clipboard with your temp-clipboard.)

The appended macro works with perfect reliability on my system (adjust the pauses as needed.)

-Chris

P.S. I'm only using a named-clipboard in this macro to test what you were doing – ordinarily I would NOT do that for this kind of text transformation – I'd use the default-system-clipboard.


Sentence Case.kmmacros (3.9 KB)

I’m really confused with the System Clipboard and the Named Clipboards.

What I want:

  • I have something in the System Clipboard (say an image).
  • I select a text in a text editor and launch a macro to ‘Uppercase First’.
  • The System Clipboard need to be restored to its previous content (the image).

Any help? TIA

Hey Cary,

Okay.

Copy the system clipboard to a temporary clipboard.

Do your processing using the system clipboard.

Then copy that temporary clipboard back to the system clipboard.

If this is still confusing let me know.

-Chris

I really don’t know how this could happen. Is it in a particular application that you typically have troubles?

Not really. It’s pretty random.

Is that not the normal behavior that is suppose to happen with Copy to Named Clipboard? It would make sense if it never copied to the system clipboard and just went straight to the named clipboard bypassing the extra steps ccstone laid out. I use Launchbars clipboard history and it would be nice if this could never go into it's clipboard history when saving to a Keyboard Maestro clipboard history.

Actions "Copy Clipboard to Clipboard" and then "Copy to Named Clipboard" and end with "Copy Clipboard to Clipboard"

Something like this Title Case.kmmacros (27.6 KB)

Not to paste it twice, no.

It might make sense, but it is impossible to do - you can only copy to the System Clipboard. After that the copied data can have something done to it (like copied to a Named Clipboard which is a Keyboard Maestro construct). But there is no other way (except in some specific applications) to get the selection contents out of the application except by copying to the System Clipboard.

Okay thanks for the info Peter, good to know that it has to go through the system clipboard first. Didn’t realize that was a system limitation I guess for security resasons. By the way 7.2 looks amazing and a lot of stuff added that I will have to play with. So glad I migrated from QuicKeys.

1 Like