hubl/src/scripts/keyboard-shortcuts.js

10 lines
244 B
JavaScript
Raw Normal View History

2021-04-15 19:58:19 +00:00
document.addEventListener("keydown", function (e) {
/*
CTRL + K : Focus on the user search
*/
if(e.ctrlKey && e.key == "k") {
document.querySelector('#general-search input[type="text"]').focus();
e.preventDefault();
}
});