Skip to content
Snippets Groups Projects
Commit 94237516 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

docs/sphinx: add 's' keyboard binding to focus search


This is pretty ubiquitous. ('/' is already taken by some browsers for
quick search)

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 96871b38
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,10 @@
'theme_overrides.css',
]
html_js_files = [
'custom.js',
]
html_context = {
"display_gitlab": True,
"gitlab_user": "qemu-project",
......
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();
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment