Feature Request: Add a "Copy" Button to Display Text in Window

Hi @peternlewis,

Is it possible to add a "Copy" button to the "Display Text in Window" window?

I found myself very often need to copy the text from the Display Text in Window window.
Of course, this will copy the entire text in the window. If we need to copy a portion of the text, we will still need to do the traditional select-and-copy method. But still, it would useful.

It's fine if this is not easily implemented and/or not on the top to-do list or even not planned to be implemented at all, we could use the "set the clipboard to text" action (it's just I don't always need to copy the text, so I want the copy button to be handy when needed).

1 Like

In the absence of the button why not just do AC?


Not sure where you are getting the text from but in order to show it in the Window Keyboard Maestro will have it somewhere (probably in a Variable?). So, you could just make setting the Clipboard to that Variable a part of your Macro.

It's probably no harm having it in the Clipboard as it will be pushed out of first place as soon as you copy something else. But if it's important that is is not in the Clipboard unless you press a button I suppose you could display the text first in a User Prompt window and make a button on that to copy it to the Clipboard. I quite often use User Prompt Windows instead of Display Text for that reason.

EXAMPLE Display Text with Option to Copy to Clipboard.kmmacros (6.9 KB)

click to show whole example Macro

EXAMPLE Display Text with Option to Copy to Clipboard

1 Like

That's a great suggestion. I did not know we could just do A to select all text. This will greatly improve my workflow. Thank you very much!

Yes. I've mentioned this in the OP, and it is what I'm currently doing for a display text that I most often need to paste.

This is a very creative use of the Prompt window, which allows us to add custom buttons. It just never came to my mind that this action could be used as an advanced "Display Text in Window" action. I'll think about it.
The issues are that we cannot change fonts for the Prompt window, and I don't always need to interact with KM window. But again, this is a great idea and I may have need of it in future. Thanks!

I've made a few HTML Prompt window macros to display text, but generally, if we could use the "Display Text in Window" action, then I usually prefer it. It feels much lighter and is much easier to edit its content within the action.


Plenty of good solutions with forethought here! Still, I use Display in Window ad-hoc for random stuff so it would be nice to have the a copy button built-in.

1 Like

I do too. I usually need to convert a Javascript that includes KM variables (%Variable%), then past the converted result into VSCode for testing. I do use AC. Have been looking for more direct way to do the conversion.