all repos — honk @ 375e7bd5dc46ea775d6579d7a99dbfc50fbe2ded

my fork of honk

ignore alt and ctrl in hotkey
Ted Unangst tedu@tedunangst.com
Mon, 28 Aug 2023 15:00:18 -0400
commit

375e7bd5dc46ea775d6579d7a99dbfc50fbe2ded

parent

783734d1517aaa255d5be0b24da3342aa5dcb6e3

1 files changed, 7 insertions(+), 3 deletions(-)

jump to
M views/honkpage.jsviews/honkpage.js

@@ -440,9 +440,11 @@ }

} } -document.addEventListener("keydown", function(e) { +function hotkey(e) { if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) - return; + return + if (e.ctrlKey || e.altKey) + return switch (e.code) { case "KeyR":

@@ -463,7 +465,9 @@ document.getElementById("searchbox").focus()

e.preventDefault() break } -}) +} + +document.addEventListener("keydown", hotkey) function addemu(elem) { const data = elem.alt