From: Ardis Lu Date: Mon, 13 May 2024 02:12:59 +0000 (-0700) Subject: Add keyboard shortcut "/" to jump to textarea X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=bf0c211202fd4c52a6ed9cfbe8511e2986377e2d;p=event-hashes Add keyboard shortcut "/" to jump to textarea --- diff --git a/index.html b/index.html index adab3dd..7c1137f 100644 --- a/index.html +++ b/index.html @@ -444,6 +444,12 @@ gzipBase64ToText(location.hash.substring(1)).then(text => textarea.value = text); textarea.dispatchEvent(new Event('input')); } + + addEventListener('keyup', e => { + if (e.key === '/') { + textarea.focus(); + } + });