Hide the shortcuts panel when the Escape key is pressed.
This commit is contained in:
parent
2e802c0f6d
commit
2cefea3677
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue