From 48cee00e5b4c63f1d10f3006ad3c142c0dd73e6a Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Mon, 16 Apr 2018 18:47:08 +0200 Subject: [PATCH] Pressing escape acts like.. escaping! --- html/js/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/html/js/app.js b/html/js/app.js index 0de33dbc..b2d97d85 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -46,6 +46,13 @@ name : name }); + + document.onkeyup = function (key) { + if (key.which == 27) { // Escape key + $.post('http://' + ESX_MENU.ResourceName + '/menu_cancel', JSON.stringify(data)); + } + }; + ESX_MENU.render(); }