Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Hide the shortcuts panel when the Escape key is pressed.
Boris Grozev2cefea36770c
diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex fc72facb08..dfd49b52a9 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -1398,10 +1398,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.jsindex 1d129c2b06..4d23429889 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: {@@ -52,6 +49,15 @@ function initShortcutHandlers() {function: function() {APP.conference.toggleVideoMuted();}+ },+ 191: {+ character: "/",+ function: function(e) {+ // Only trigger on "?", not on "/".+ if (e.shiftKey) {+ APP.UI.toggleKeyboardShortcutsPanel();+ }+ }}};}