diff options
Diffstat (limited to 'docs/pkgdown.js')
-rw-r--r-- | docs/pkgdown.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 9757bf9..1a99c65 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -152,3 +152,11 @@ async function searchFuse(query, callback) { }); }); })(window.jQuery || window.$) + +document.addEventListener('keydown', function(event) { + // Check if the pressed key is '/' + if (event.key === '/') { + event.preventDefault(); // Prevent any default action associated with the '/' key + document.getElementById('search-input').focus(); // Set focus to the search input + } +}); |