In the new release of Keyboard Maestro (v.7.0) a bunch of new features were added to the already incredible application.
Then I decided to go further and automatically get the content of my system clipboard when it displays, and send beck to the clipboard when I close the window.
And this is a screenshot of the “Custom HTML Prompt” in action.
How does it works?
It works very easily: you have only to write an HTML page and modify the body in this way:
That’s all. It tells KeyboardMaestro where to place the window and the width and height of the same.
Then in the code I use custom KeyboardMaestro object to get the clipboard into my text field:
document.getElementById('mytext').value = window.KeyboardMaestro.GetVariable( 'TextClip')
And last but not least, to make the button “COPY TO CLIPBOARD” work copying to clipboard and closing the form:
case "toclipboard": window.KeyboardMaestro.SetVariable( 'TextClip', text ); window.KeyboardMaestro.Submit(); break;