From 90dd2532b536b4e76e51dd11f8fb30f1df1a8706 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk <201152+ok2@users.noreply.github.com> Date: Wed, 10 Jun 2026 00:26:59 +0200 Subject: [PATCH] helwasm: Enter in the master field copies the result (like Copy) --- helwasm/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helwasm/index.html b/helwasm/index.html index 0470af9..b76e1b2 100644 --- a/helwasm/index.html +++ b/helwasm/index.html @@ -521,6 +521,14 @@ $("#qsecret").addEventListener("click", () => $("#qsecret").classList.toggle("revealed")); // Click the master field to show what you typed; click again to re-mask. $("#master").addEventListener("click", () => $("#master").classList.toggle("revealed")); + // Enter in the master field copies the result, like pressing Copy (the keydown + // gesture lets the clipboard write through). Generate first so it's current. + $("#master").addEventListener("keydown", (e) => { + if (e.key !== "Enter") return; + e.preventDefault(); + quickGen(false); + if (lastSecret) copyText(lastSecret); else toast("Nothing to copy"); + }); $("#copy").onclick = () => (lastSecret ? copyText(lastSecret) : toast("Nothing to copy")); $("#saveBtn").onclick = saveStep;