Skip to content

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

fix(keyboard-shortcuts) Check modifier key (#13520)

Robert Pintilii8acce9a2f535
diff --git a/react/features/keyboard-shortcuts/utils.ts b/react/features/keyboard-shortcuts/utils.ts
index f2f2eb59c6..342c596b0d 100644
--- a/react/features/keyboard-shortcuts/utils.ts
+++ b/react/features/keyboard-shortcuts/utils.ts
@@ -33,7 +33,7 @@ export const getPriorityFocusedElement = (): HTMLElement | null =>
*/
export const getKeyboardKey = (e: KeyboardEvent): string => {
// @ts-ignore
- const { altKey, code, key, shiftKey, type, which } = e;
+ const { altKey, code, key, shiftKey, type, which, ctrlKey } = e;
// If alt is pressed a different char can be returned so this takes
// the char from the code. It also prefixes with a colon to differentiate
@@ -50,6 +50,10 @@ export const getKeyboardKey = (e: KeyboardEvent): string => {
// keyboard key. To be safe, when a key is "Unidentified" it must be
// further analyzed by jitsi to a key using e.which.
if (typeof key === 'string' && key !== 'Unidentified') {
+ if (ctrlKey) {
+ return `-${key}`;
+ }
+
return key;
}