fix: correct mac modifier and emoji key detection in input handler

This commit is contained in:
cmesona
2025-06-09 15:59:16 +02:00
parent 4170aca548
commit 2d011ff42e
3 changed files with 76 additions and 29 deletions
+18
View File
@@ -150,3 +150,21 @@ export function getMessageTypeClasses(type: MessageType): string {
return severityColors["white"];
}
}
export function getModifierKey(): string {
const isMac = /Mac/.test(navigator.userAgent);
if (isMac) {
return "⌘"; // Command key
} else {
return "Ctrl";
}
}
export function getEmojiKey(): string {
const isMac = /Mac/.test(navigator.userAgent);
if (isMac) {
return "⌥"; // Option key
} else {
return "Ctrl";
}
}