Copy Function Timeouts Without Updating System Clipboard

Hi all,
I'm using the "Copy" function to copy some texts into the system clipboard. And then I want to append the text with text from another variable. The final product is saved back to the system clipboard ready to be pasted.

However, the macro keeps getting time-out at the copy function without updating system clipboard.
Any help is greatly appreciated. I'm using KM 9.

Copy Citation.kmmacros (5.4 KB)

This is very unusual. You must be copying something very large, or maybe from one of the MS Office apps.

IAC, you can change the timeout on the Copy action using its Gear menu:

image

Another option is to use Type a Keystroke of ⌘C with a Pause Until the clipboard has changed:

Pause Until Clipboard Changes (Action Group)

Group.kmactions (1.6 KB)

NOTE: This download is for Actions. Before you import, select the action in your macro after which you wish to insert this action.

I've tried changing time-out time, using your macro, but the clipboard still doesn't update. Could this be a problem with KM 9?

Aaron

Possibly, but let's try some more troubleshooting first so we're not just stabbing in the dark.

  • Do you have any clipboard managers running?
  • What content are you trying to copy?
  • What application does the content come from?
  • Do copy actions work on text that you select in something like Notes.app?
  • Have you taken a look at any logs to try and narrow things down?

Edit: Woops, I've just gone to the next tab I opened and seen that there might indeed be an issue with KM 9. See this thread - Workaround to Clipboard

1 Like

It is indeed a documented issue in KM 9. I was the one who initiated the thread.

Howard

Are you aware if a solution has been found for the issue? I'm having the same problem.

Pretty sure the next version of KM fixed it. 9.0.1 or something like that. Maybe check the release notes for 9.0.1 through 9.0.5?

I am on KM 9.0.5 (on Mojave 10.14.6), and I just ran into this same problem. Having a simple "copy" action in a macro timed out. (Specifics: I am tried to create a macro that copies text I selected in a metadata field in Adobe Lightroom.)

Copying plain text should be very fast. I do that often with KM, and it works well.
Does a manual copy (with the Edit > Copy, or ⌘C) work OK? If so, then likely there is something wrong with your Macro design.

Please upload your macro so we can inspect and test.

Also, Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

Yes, the regular system copy (with the Edit > Copy, or ⌘C) works fine. I created the simplest macro — just the Copy action, and tried it in a number of applications (including "Stickies"), and get the same timeout error each time. Here's the macro and the error:

timeout error

copy test Macro (v9.0.5)

copy test.kmmacros (1.5 KB)

What this means is that Keyboard Maestro simulated the Command-C key, and then the clipboard did not change.

If this happens in multiple applications, then perhaps Keyboard Maestro cannot simulate any keys, which would point to an accessibility problem likely resolved by toggling the accessibility permissions in the System Preferences as described at: Accessibility Permission Problem assistance.

Thanks for the suggestion. I am on Mojave (10.14.6), so I followed the instructions on the help page you referenced:

  • quit both Keyboard Maestro and Keyboard Maestro Engine
  • open System Preferences > Security & Privacy > Privacy pane
  • select Accessibility
  • delete entries for both Keyboard Maestro and Keyboard Maestro Engine
  • launch KM and ensure that the Accessibility for both KM and KME are ticked

security-accessibilty

Alas, the problem remains: the Copy action results in a timeout, when accessed anywhere (Finder, Stickies, TextEdit, etc.).

However, the Paste action works as expected.

I'm experiencing the same thing.