Add support for keybinding for settings

The settings menu will now be shown if the ctrl+, is pressed. This fixes
the issue of no way to get Settings if the search bar is hidden.
This commit is contained in:
Deepjyoti Barman
2020-09-14 18:16:35 +05:30
parent d9ca19ada6
commit c536886eb9

View File

@@ -1,5 +1,6 @@
window.onload = function() {
this.initBody();
this.listenForSettings();
}
@@ -389,4 +390,15 @@ function extractQuickLinks(passedSqrs) {
// Start the autocomplete
autocomplete(document.getElementById("search-bar-input"), this.validQuickLinks);
}
// Listen to key click
function listenForSettings() {
document.onkeyup = event => {
// Show the settings if ctrl and , is pressed
if (event.ctrlKey && event.which == 188)
showSettings();
}
}