Skip to content

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

feat(keyboard-shortcuts): Adds support for any keyboard layout.

damenchobf2254c7530b
diff --git a/react/features/keyboard-shortcuts/utils.ts b/react/features/keyboard-shortcuts/utils.ts
index 342c596b0d..c7e628d5b4 100644
--- a/react/features/keyboard-shortcuts/utils.ts
+++ b/react/features/keyboard-shortcuts/utils.ts
@@ -38,9 +38,10 @@ export const getKeyboardKey = (e: KeyboardEvent): string => {
// 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
// alt combo from simple keypress.
- if (altKey) {
- const replacedKey = code.replace('Key', '');
+ const replacedKey = code.replace('Key', '');
+
+ if (altKey) {
return `:${replacedKey}`;
}
@@ -54,6 +55,10 @@ export const getKeyboardKey = (e: KeyboardEvent): string => {
return `-${key}`;
}
+ if (code.startsWith('Key')) {
+ return replacedKey;
+ }
+
return key;
}