diff --git a/src/webui/www/public/scripts/client.js b/src/webui/www/public/scripts/client.js index a468f4d96..92c11e755 100644 --- a/src/webui/www/public/scripts/client.js +++ b/src/webui/www/public/scripts/client.js @@ -352,11 +352,20 @@ window.addEvent('load', function () { function closeWindows() { MochaUI.closeAll(); -} +}; -window.addEvent('keydown', function (event) { - if (event.key == 'a' && event.control) { - event.stop(); - myTable.selectAll(); +var keyboardEvents = new Keyboard({ + defaultEventType: 'keydown', + events: { + 'ctrl+a': function(event) { + myTable.selectAll(); + event.preventDefault(); + }, + 'delete': function(event) { + deleteFN(); + event.preventDefault(); + } } }); + +keyboardEvents.activate(); diff --git a/src/webui/www/public/scripts/mocha-init.js b/src/webui/www/public/scripts/mocha-init.js index 8f38dc073..c5af9a377 100644 --- a/src/webui/www/public/scripts/mocha-init.js +++ b/src/webui/www/public/scripts/mocha-init.js @@ -29,6 +29,8 @@ function getLocalStorageItem(name, defaultVal) { return val; } +var deleteFN = function() {}; + initializeWindows = function() { function addClickEvent(el, fn) {