Not possible to change text in HTML input field

Modified a Custom Floating HTML Prompt from Mike Pasini. However, I cannot change the contents of an input field. Probably needs to change something in the script, but what?
Note: Mike Pasini thanks for this, learn a lot from this. :+1:

Test.kmmacros (13.2 KB)

1 Like

Which one? He's posted quite a few...

Why are you capturing, and switching on, every single keypress?

window.addEventListener("keydown",...

Most of those cases seem totally inappropriate to the macro -- try deleting the entire <script>...</script> section.

If it delete the entire script then it works. Then I just have to get rid of the fact that pressing a letter combination closes the window and saves the action of the button in %HTMLResult%

As Nige_S writes, we need as little more information to help you. Which macro did you download (by name) and which field is the problem. That should get the ball rolling. (And if you enter "@mrpasini" I'll be notified as soon as you supply that information.)

Some of my HTML prompts do take over the keyboard but not in text prompts. They're usually keyboard shortcuts to activate a button with the label letter underlined to show that function.

Decided not to perform the actions (in this case the letters A and Z) with a keystroke. So deleted the script in question. Thanks for thinking along.