Fix Alt being Option on Mac

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-03-18 20:56:28 +00:00
parent d593a76f28
commit 7a448c5ba2

View file

@ -45,8 +45,7 @@ _td("Super");
_td("Ctrl");
export enum Modifiers {
ALT = "Alt",
OPTION = "Option", // This gets displayed as an Icon
ALT = "Alt", // Option on Mac and displayed as an Icon
ALT_GR = "Alt Gr",
SHIFT = "Shift",
SUPER = "Super", // should this be "Windows"?
@ -231,9 +230,12 @@ interface IModal {
const modifierIcon: Record<string, string> = {
[Modifiers.COMMAND]: "⌘",
[Modifiers.OPTION]: "⌥",
};
if (isMac) {
modifierIcon[Modifiers.ALT] = "⌥";
}
const alternateKeyName: Record<string, string> = {
[Key.PAGE_UP]: _td("Page Up"),
[Key.PAGE_DOWN]: _td("Page Down"),