You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/docs/sphinx-static/custom.js

10 lines
298 B
JavaScript

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();
}
});