]> git.ardis.lu - event-hashes/commitdiff
Add keyboard shortcut "/" to jump to textarea
authorArdis Lu <ardisglu@gmail.com>
Mon, 13 May 2024 02:12:59 +0000 (19:12 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 13 May 2024 02:12:59 +0000 (19:12 -0700)
index.html

index adab3dda49287a783e1b06e8c4968670bc3a069f..7c1137f738cb8ef5b13226e7694e03cb944aac86 100644 (file)
       gzipBase64ToText(location.hash.substring(1)).then(text => textarea.value = text);
       textarea.dispatchEvent(new Event('input'));
     }
+
+    addEventListener('keyup', e => {
+      if (e.key === '/') {
+        textarea.focus();
+      }
+    });
   </script>
 </body>
 
This page took 0.041547 seconds and 4 git commands to generate.