summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/web/js/ui.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js
index 03cc9ac2..3d16ec29 100644
--- a/kvmd/web/js/ui.js
+++ b/kvmd/web/js/ui.js
@@ -5,7 +5,12 @@ var ui = new function() {
this.init = function() {
Array.prototype.forEach.call(document.getElementsByClassName("ctl-item"), function(el_item) {
- el_item.onclick = function() { __toggleMenu(el_item); };
+ el_item.onclick = () => __toggleMenu(el_item);
+ el_item.onkeyup = function(event) {
+ if (event.code == "Escape") {
+ __toggleMenu(el_item);
+ }
+ };
__ctl_items.push(el_item);
});