"⌘C" Not Always Working in Display Text Window

In the Display Text Window, when I select the text and press ⌘C, the text is not always copied to my clipboard. Sometimes, I have to press ⌘C multiple times or use the contextual menu
to make sure that I have copied the text. Often, I would check the clipboard history to see if the text has been copied.

Has anyone experienced the same issue with the Display Text Window?
This has been an issue to me for a long time.

Hey Martin,

I don't recall having this problem on my macOS 10.12.6 Sierra system.

I haven't tested extensively beyond that.

-Chris

I just made a gif to show the problem.
The first a few ⌘C works. But it suddenly stopped working (after selecting "6 to 3"), as if the window has lost focus. But the window was clearly on focus.
If the window loses focus, the "OK" button will not have the blue background color. Also, I did not click elsewhere. I just selected "6 to 3" and then hit ⌘C immediately.

With "Visualize" I think I may have at least accidentally spotted the issue.

In the Gif (and in my later tests), when ⌘C was not working, the red circle was always present. The red circle actually shows a mouse click. After selecting the text, I removed my fingers from the trackpad. But the red circle was still there, which indicate the computer thinks my fingers were still on the trackpad (like press the mouse and hold it).

After I finish selection, the red circle usually disappears after 1 second. But if I press any key before the red circle disappears, then the red circle will remain there persistently. Then I will not be able to copy any text. It only happens to the Display Text window. I don't have this issue in other windows (such as the KM editor window).

At first I thought "Visualize" (the app displays the red circle at mouse click) causes the issue. But after quitting the app, the same behavior persist as long as I press any key within that time window.

This is very weird behavior. Can anyone test it to see if the same issue is there?

Here is my suggested test:

  1. Select some texts in the Keyboard Maestro Display text window. Before you release the the mouse to finish the selection, press any modifier keys, such as ⌘.
  2. Then release the mouse to finish the selection.
  3. Then hit ⌘C to see if the selection is successfully copied to the clipboard.

I use three finger tap-and-hold for window-dragging and text selection.

Hey Martin,

I tried this on my Mid-2010 17" MacBook Pro with both a USB mouse and the built-in trackpad.

No problems detected on my macOS 10.12.6 Sierra system.

I don't have the 3-finger gesture on this system though.

Single-Click and hold to move a window and select text.

You're using BetterTouchTool aren't you? Have you tried without it running?

This is on Big Sur? You might as well report it to Peter I reckon.

Contact Keyboard Maestro Support

-Chris

I have BTT, but after quitting BTT, the problem does not go away.

Thanks for sharing this information. I disabled the three finger drag. The problem goes away. So I guess it is related to this function.
Edit: Spoke too soon. I forgot I had to test it in the Display Text window of Keyboard Maestro. I retested it. It turns out the problem is still there.

Yes. I'm on Big Sur. I will report it to @peternlewis.

Thanks!

1 Like

Another phenomenon:

As shown in the gif below,

  1. I first select lines 5 to 1. Before releasing I pressed ⌘ once to freeze the mouse selection red circle indicator (this ⌘ key is not shown by "Visualize").
  2. Then I press ⌘C to copy the selection. Clipboard does NOT update here.
  3. After releasing ⌘C, I move the mouse to the end of "3", and click there.
  4. The result is that lines "4-5" are copied over.

So the system delayed the copy function, because it thinks I have not done with selection yet. The last click at the end of line "3" makes "line 4 and line 5" as the selection. Then the system process the copy command. The result is that lines 4 and 5 are copied.

Sounds like an issue with your mouse/track pad handling and the selection.

I suggest you look at resolving that to resolve the problem.

I have no idea how Keyboard Maestro could be involved in that aspect of the issue though.

Thanks, Peter.

I've tested in the safe mode. I still have the problem.

Since it only happens to the display text window and not in any other window in KM or other apps, whatever the mouse/trackpad issue is, it affects only the display text window in KM, as far as I have experienced. I don't know what else I can do to identity the cause. Any suggestions?

@peternlewis, does the Display Text window have any special characteristics? I was thinking, maybe there was some particular features of the display text window has caused this issue. If there are some similar windows, I can perhaps test in those similar windows.

I have no issues in the Custom HTML prompt windows.
No issues in the dialogue windows created by AppleScript.

There is nothing particularly special about the Display Text window.

Sorry, I don't really have any idea what the issue might be.

ok. Thanks. It's not a critical issue. Now I've know how the problem is triggered, I can do my best to avoid it.

For the sake of records, I'll add here that on an older Mac, I have the same issue. I installed everything on the new Mac via Time Machine. So if the issue is due to any apps or settings, it was already there on the old Mac.

I also tested with a regular mouse instead of the trackpad, still the same issue.

Since the problem is present in the safe mode, most third-party softwares may be excluded?

The next step might be a fresh reinstallation of either KM or the OS. I'll report when I have updates.

Keyboard Maestro does not install anything, so a fresh install of Keyboard Maestro rarely has any value - the only thing it will resolve is if their is a corruption in the application itself.

You're right. I had it reinstalled. But the issue is still there.

Not sure if this is related, because I do not even understand in which way KM is involved here, but just to add some thoughts in case it triggers some ideas:

In my (programming) experience, this could be related to a lost/discarded event. Which could happen if my code would run into an exception that it didn't catch, or if it called some longer-taking functions that would lead to this. To prevent this from happening, I'd decouple the event from my code, by postponing it with a timer or, nowadays, with dispatch_async(get_main_dispatch_queue(), ...). That way, the event is running and finished quickly, and my processing for the event happens briefly afterwards, without disturbing the event handling.

1 Like

Have you checked Console.app to see if KM shows any kind of exceptions / errors? Not that I'd expect there to be exceptions in such a simple and common case.

Thinking out of the box I tried this with TextEdit.app (instead of KM Display text window)

and the problem exists there, too.

So I'd say this has nothing to do with KM!

BTW - I'm using Magic Trackpad 2, Mohave but NOT Better Touch Tool.

1 Like

Hi @Thomas_Tempelmann,
Thanks for the suggestion. I did not even know Console.app before.
I opened it and clicked the "Errors and Faults" tab. Here are some sample results:

Error Records **error 09:34:41.433564-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5**

error 09:34:42.092411-0400 analyticsd [Fault] Transform 'MT_com.apple.automation.do_shell_script' hit unrecoverable error with reason='' and context='' with event=''

error 09:34:42.435189-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:42.533889-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:43.436927-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:43.462044-0400 kernel Sandbox: routined(378) deny(1) mach-lookup com.apple.Maps.MapsSync.store

error 09:34:43.464709-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:43.472233-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:44.438357-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:45.439944-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:45.600770-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:46.441760-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:46.566561-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:47.443542-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:48.445461-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:48.667256-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:49.651655-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:51.742127-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:52.751663-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:53.334331-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:54.335341-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:54.741595-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:55.336626-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:55.850282-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

error 09:34:56.337958-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:57.339082-0400 LCCDaemon IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:57.742459-0400 karabiner_observer IOConnectCallMethod(kIOHIDLibUserClientOpen):e00002c5

error 09:34:58.950227-0400 routined error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.Maps.MapsSync.store was invalidated.}

As you can see, there are a few error codes every second.
I can't understand any of them. Can you help?
Thanks!

Interesting. I don't have this problem in TextEdit on my computer.

Use the Filter box and enter "maestro" so that the errors are limited to it before you post that list, as, sadly, there are a LOT of errors that may or may not matter.