In the KM Editor, "Copy" is never disabled, even when nothing is selected

In all the macOS apps that I've checked, (eg, Notes, Safari, Messages, etc.) when you have nothing selected, the "Copy" command for the app is greyed out. But in the KM Editor, if nothing is selected, the Copy command is still active, and if you press Copy (or Cmd-C) the clipboard is actually overwritten with an empty string. I don't think that's consistent with other macOS apps. I'm not sure if this behaviour is desirable.

This isn't a huge deal, now that I understand, but it caused me to spend 2 minutes troubleshooting this odd behaviour. And here I am spending 5 minutes more discussing it.

This may sound like a stupid question, but are you sure you had nothing selected? In 11.0.3. on Sonoma, at least, Copy is disabled with nothing selected:

image

-rob.

1 Like

If you think I had something selected, then tell me how pressing copy at that moment would overwrite a clipboard containing text with an empty clipboard. If I had something selected, wouldn't the selection get overwritten with "whatever is selected" rather than getting "overwritten by an empty string" as I indicated above?

In any case, you seem to have the editor in a different state than I have, if you got "Copy" working correctly. Something you and I are doing must be different. I'm using the same version of KM as you. My guess is that you don't have a text window in focus with the text cursor flashing in the window without any text selected.

Sorry, I misread your post, as I didn't see anything about having a text window in focus. I read this part—"But in the KM Editor, if nothing is selected, the Copy command is still active"—quite literally, so I opened the editor and made sure nothing was selected.

Based on your comment, this morning I selected a comment box in one of my macros, and made sure the cursor was in the text area itself. And now I see the issue, and it's even weirder: The empty string doesn't even show in the clipboard switcher:

image

But it's definitely there, as I can't paste anything now, even though "this is a test" should be pasted. Seems like a bug (perhaps in the macOS text area handling?) to me, but perhaps @peternlewis can explain what's going on?

-rob.

Yes, I specifically didn't indicate the full context of my question because I was wondering if other contexts might exist and might produce different results. Perhaps I'm feeling a bit deceptive about doing that now. Perhaps I should have conducted more tests like you did.

I'll need more information because I cannot duplicate it.

If I select a macro, and then deselect it so nothing is selected, then Copy is disabled:

image

If I place my text insertion cursor in the title of a macro, but with no selection, then Copy is disabled.

Same for every other text field I tried.

Pressing Command-C just beeps.

Running 11.0.3 on macOS 14.5, just click anywhere within a text field in a macro—I just tried with a shell script action, and it works as above: Copy is enabled, nothing is apparently copied if you do copy, but you then can't paste what the clipboard shows as the first item in the clipboard.

I tested on two Macs and have the same results on both.

-rob.