diff --git a/telethon_generator/data/html/js/search.js b/telethon_generator/data/html/js/search.js
index f356d463..909325f7 100644
--- a/telethon_generator/data/html/js/search.js
+++ b/telethon_generator/data/html/js/search.js
@@ -218,6 +218,18 @@ function getQuery(name) {
}
}
+document.onkeydown = function (e) {
+ if (e.key == '/' || e.key == 's' || e.key == 'S') {
+ if (document.activeElement != searchBox) {
+ searchBox.focus();
+ return false;
+ }
+ } else if (e.key == '?') {
+ alert('Pressing any of: /sS\nWill focus the search bar\n\n' +
+ 'Pressing: enter\nWill navigate to the first match')
+ }
+}
+
var query = getQuery('q');
if (query) {
searchBox.value = query;