diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 876aec5eb..6fc581583 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1416,10 +1416,21 @@ UI.hideRingOverLay = function () { }; /** - * Shows or hides the keyboard shortcuts panel.' + * Shows or hides the keyboard shortcuts panel, depending on the current state.' */ UI.toggleKeyboardShortcutsPanel = function() { $('#keyboard-shortcuts').toggle(); }; +/** + * Shows or hides the keyboard shortcuts panel.' + */ +UI.showKeyboardShortcutsPanel = function(show) { + if (show) { + $('#keyboard-shortcuts').show(); + } else { + $('#keyboard-shortcuts').hide(); + } +}; + module.exports = UI; diff --git a/modules/keyboardshortcut/keyboardshortcut.js b/modules/keyboardshortcut/keyboardshortcut.js index fbcb67e9e..71f896e81 100644 --- a/modules/keyboardshortcut/keyboardshortcut.js +++ b/modules/keyboardshortcut/keyboardshortcut.js @@ -3,13 +3,10 @@ var shortcuts = {}; function initShortcutHandlers() { shortcuts = { - 191: { - character: "/", - function: function(e) { - // Only trigger on "?", not on "/". - if (e.shiftKey) { - APP.UI.toggleKeyboardShortcutsPanel(); - } + 27: { + character: "Esc", + function: function() { + APP.UI.showKeyboardShortcutsPanel(false); } }, 67: { @@ -59,6 +56,15 @@ function initShortcutHandlers() { function: function() { APP.conference.toggleVideoMuted(); } + }, + 191: { + character: "/", + function: function(e) { + // Only trigger on "?", not on "/". + if (e.shiftKey) { + APP.UI.toggleKeyboardShortcutsPanel(); + } + } } }; }