MCPcopy Index your code
hub / github.com/hoothin/UserScripts / keydonwHandler

Function keydonwHandler

DownloadAllContent/DownloadAllContent.user.js:2209–2219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2207 downloadSingleShortcutInput.style.cursor = "cell";
2208 downloadCustomShortcutInput.style.cursor = "cell";
2209 let keydonwHandler = e => {
2210 if (e.key) {
2211 if (e.key == "Backspace") {
2212 e.target.value = "";
2213 } else if (e.key != "Control" && e.key != "Shift" && e.key != "Alt" && e.key != "Meta") {
2214 e.target.value = formatShortcut(e);
2215 }
2216 }
2217 e.preventDefault();
2218 e.stopPropagation();
2219 };
2220 downloadShortcutInput.addEventListener("keydown", keydonwHandler);
2221 downloadSingleShortcutInput.addEventListener("keydown", keydonwHandler);
2222 downloadCustomShortcutInput.addEventListener("keydown", keydonwHandler);

Callers

nothing calls this directly

Calls 1

formatShortcutFunction · 0.85

Tested by

no test coverage detected