summaryrefslogtreecommitdiffstats
path: root/docs/sphinx-static/custom.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sphinx-static/custom.js')
-rw-r--r--docs/sphinx-static/custom.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/sphinx-static/custom.js b/docs/sphinx-static/custom.js
new file mode 100644
index 0000000000..71a8605305
--- /dev/null
+++ b/docs/sphinx-static/custom.js
@@ -0,0 +1,9 @@
+document.addEventListener('keydown', (event) => {
+ // find a better way to look it up?
+ let search_input = document.getElementsByName('q')[0];
+
+ if (event.code === 'KeyS' && document.activeElement !== search_input) {
+ event.preventDefault();
+ search_input.focus();
+ }
+});