Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

An initial version of a "keyboard shortcuts" help panel.

Boris Grozevd79971a73774
diff --git a/Makefile b/Makefile
index 7d945eb01f..51dc88acf0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ BROWSERIFY = ./node_modules/.bin/browserify
UGLIFYJS = ./node_modules/.bin/uglifyjs
EXORCIST = ./node_modules/.bin/exorcist
CLEANCSS = ./node_modules/.bin/cleancss
-CSS_FILES = font.css toastr.css main.css overlay.css videolayout_default.css font-awesome.css jquery-impromptu.css modaldialog.css notice.css popup_menu.css login_menu.css popover.css jitsi_popover.css contact_list.css chat.css welcome_page.css settingsmenu.css feedback.css jquery.contextMenu.css
+CSS_FILES = font.css toastr.css main.css overlay.css videolayout_default.css font-awesome.css jquery-impromptu.css modaldialog.css notice.css popup_menu.css login_menu.css popover.css jitsi_popover.css contact_list.css chat.css welcome_page.css settingsmenu.css feedback.css jquery.contextMenu.css keyboard-shortcuts.css
DEPLOY_DIR = libs
BROWSERIFY_FLAGS = -d
OUTPUT_DIR = .
diff --git a/css/keyboard-shortcuts.css b/css/keyboard-shortcuts.css
new file mode 100644
index 0000000000..4d53ed4c5e
--- /dev/null
+++ b/css/keyboard-shortcuts.css
@@ -0,0 +1,54 @@
+#keyboard-shortcuts {
+ display: none;
+ position: absolute;
+ bottom: 20px;
+ left: 20px;
+ overflow: hidden;
+ z-index: 1;
+ opacity: .85;
+ border-top-left-radius: 15px;
+ border-top-right-radius: 15px;
+ border-bottom-right-radius: 15px;
+ border-bottom-left-radius: 15px;
+ background-color: rgb(0, 0, 0);
+ background-image: none;
+ background-repeat: repeat;
+ background-attachment: scroll;
+ background-position: 0px center;
+ background-clip: border-box;
+ background-origin: padding-box;
+ background-size: auto auto;
+}
+
+#keyboard-shortcuts.header {
+ font-size: 15pt;
+}
+
+#keyboard-shortcuts.content {
+ font-size: 10pt;
+ color: #ffffff;
+}
+
+#keyboard-shortcuts.item {
+ color: #ffffff;
+ font-size: 10pt;
+}
+#keyboard-shortcuts.item-details {
+ color: #ffffff;
+ font-size: 10pt;
+}
+
+#keyboard-shortcuts.item-action {
+ color: #ffffff;
+ font-size: 10pt;
+}
+
+#keyboard-shortcuts.item-description {
+ color: #ffffff;
+ font-size: 10pt;
+}
+
+#keyboard-shortcuts.regular-key {
+ color: #ffffff;
+ font-size: 10pt;
+}
diff --git a/index.html b/index.html
index b05cf32a30..62c6ebdec6 100644
--- a/index.html
+++ b/index.html
@@ -279,5 +279,72 @@
<a id="feedbackButton" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[data-content]feedback"><i class="fa fa-heart"></i></a>
</div>
</div>
+ <div id="keyboard-shortcuts" class="keyboard-shortcuts" style="display:none;">
+ <div class="header"><h3 data-i18n="keyboardShortcuts.keyboardShortcuts"></h3></div>
+ <div class="content">
+ <ul class="item">
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">M</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.mute"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">V</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.videoMute"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">C</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.toggleChat"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">R</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.raiseHand"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">T</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.pushToTalk"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">D</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.toggleScreensharing"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">F</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.toggleFilmstrip"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">?</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.toggleShortcuts"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">0</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.focusLocal"></strong>
+ </li>
+ <li class="item-details">
+ <span class="item-action">
+ <kbd class="regular-key">1-9</kbd>
+ </span>
+ <strong class="item-description" data-i18n="keyboardShortcuts.focusRemote"></strong>
+ </li>
+ </ul>
+ </div>
+ </div>
</body>
</html>
diff --git a/lang/main.json b/lang/main.json
index 70505ec0f3..e947c3f727 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -11,6 +11,19 @@
"defaultNickname": "ex. Jane Pink",
"defaultLink": "e.g. __url__",
"calling": "Calling __name__ ...",
+ "keyboardShortcuts": {
+ "keyboardShortcuts": "Keyboard shortcuts:",
+ "raiseHand": "Raise your hand.",
+ "pushToTalk": "Push to talk.",
+ "toggleScreensharing": "Switch between camera and screensharing.",
+ "toggleFilmstrip": "Show or hide the filmstrip.",
+ "toggleShortcuts": "Show or hide this help menu.",
+ "focusLocal": "Focus on the local video.",
+ "focusRemote": "Focus on one of the remote videos.",
+ "toggleChat": "Open or close the chat panel.",
+ "mute": "Mute or unmute the microphone.",
+ "videoMute": "Stop or start the local video."
+ },
"welcomepage":{
"go": "GO",
"roomname": "Enter room name",
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index bcfcac3919..300e00a7ed 100644
--- a/modules/UI/UI.js
+++ b/modules/UI/UI.js
@@ -1379,10 +1379,17 @@ UI.showRingOverLay = function () {
};
UI.hideRingOverLay = function () {
- if(!RingOverlay.hide())
+ if (!RingOverlay.hide())
return;
ToolbarToggler.resetAlwaysVisibleToolbar();
FilmStrip.toggleFilmStrip(true);
};
+/**
+ * Shows or hides the keyboard shortcuts panel.'
+ */
+UI.toggleKeyboardShortcutsPanel = function() {
+ $('#keyboard-shortcuts').toggle();
+};
+
module.exports = UI;
diff --git a/modules/keyboardshortcut/keyboardshortcut.js b/modules/keyboardshortcut/keyboardshortcut.js
index 4f48af97d8..1d129c2b06 100644
--- a/modules/keyboardshortcut/keyboardshortcut.js
+++ b/modules/keyboardshortcut/keyboardshortcut.js
@@ -3,6 +3,15 @@
var shortcuts = {};
function initShortcutHandlers() {
shortcuts = {
+ 191: {
+ character: "/",
+ function: function(e) {
+ // Only trigger on "?", not on "/".
+ if (e.shiftKey) {
+ APP.UI.toggleKeyboardShortcutsPanel();
+ }
+ }
+ },
67: {
character: "C",
id: "toggleChatPopover",
@@ -56,7 +65,7 @@ var KeyboardShortcut = {
$(":focus").is("input[type=password]") ||
$(":focus").is("textarea"))) {
if (typeof shortcuts[keycode] === "object") {
- shortcuts[keycode].function();
+ shortcuts[keycode].function(e);
}
else if (keycode >= "0".charCodeAt(0) &&
keycode <= "9".charCodeAt(0)) {