Copy to Named Clipboard Always Ends Up With a Timeout

Hello,

I have built a macro, that combines text from a system clipboard with text in the current editor by means of a temporary clipboard. See attached.

The problem is that it doesn't work. At the moment, when text is about to be copied into a temporary clipboard it hangs and after some time I see a timeout error.

It used to work with KM 10.x, but after updating to KM 10.2 it behaves as I've described above.

After rewriting a macro to use a system clipboard it all starts working, but the system clipboard is changed, which is undesired.

Any idea?

In-Portal Commit* (fx).kmmacros (3.5 KB)

I tried your Macro out in TextEdit and it seems to work fine (I'm also on KM 10.2)

It perhaps could be simplified a bit. In effect you are combining the Current Clipboard with what was in the Clipboard prior to the macro running. The token for the contents of the Current Clipboard is %SystemClipboard% as you have it and the token for what was in the Clipboard prior to that is %PastClipboard%1%. In fact you can also use %PastClipboard%0% to refer to the Current Clipboard. So, you could do something like:

Click to Show Image of Macro

In fact even copying to your temporary Named Clipboard changes the System Clipboard as Keyboard Maestro uses the System Clipboard to copy the selection into the Named Clipboard. And the Action at the end of your Macro, "Insert Text by Pasting" also changes the current System Clipboard for a similar reason (Keyboard Maestro uses the Clipboard to insert the text).

1 Like

@Zabobon, Wow, my macro does work in TextEdit for me as well.

But I'm using it in the commit dialog of the PhpStorm app (Java-based app), where it partially (named clipboard stuff) doesn't work. I guess there is something odd about that text box, that prevents temporary clipboard operations.

Could you try that or any other free/trial version of JetBrains IDEs?

Thank you.

Does this Macro not work?

In-Portal Commit* (fx).kmmacros (3.0 KB)

Click to Show Image of Macro

It does.

If %PastClipboard% internally uses system clipboard instead of named clipboard, then it should have worked.

Thank you @Zabobon . I now have a better understanding of the Keyboard Maestro.

1 Like