fix: enhance shortcut key detection for alt key combinations and update Discord invite link across all pages.

This commit is contained in:
abdullahalam123
2025-11-21 19:32:08 +05:30
parent 1a17cd4e7e
commit 83aadb6d98
14 changed files with 57 additions and 39 deletions

View File

@@ -155,7 +155,16 @@ export class ShortcutsManager {
if (e.altKey) keys.push('alt');
if (e.shiftKey) keys.push('shift');
const key = e.key.toLowerCase();
let key = e.key.toLowerCase();
if (e.altKey && e.code) {
if (e.code.startsWith('Key')) {
key = e.code.slice(3).toLowerCase();
} else if (e.code.startsWith('Digit')) {
key = e.code.slice(5);
}
}
if (!['control', 'shift', 'alt', 'meta'].includes(key)) {
keys.push(key);
}
@@ -184,6 +193,6 @@ export class ShortcutsManager {
return;
}
}
}, { capture: true });
}, { capture: true });
}
}