789
export function toElectronAccelerator(keyCode: KeyCode): string | null {
790
if (keyCode >= KeyCode.Numpad0 && keyCode <= KeyCode.NumpadDivide) {
791
>
// [Electron Accelerators] Electron is able to parse numpad keys, but unfortunately it
keyCodes.ts
792
>
// renders them just as regular keys in menus. For example, num0 is rendered as "0",
793
>
// numdiv is rendered as "/", numsub is rendered as "-".
794
>
//
795
>
// This can lead to incredible confusion, as it makes numpad based keybindings indistinguishable
796
>
// from keybindings based on regular keys.
797
>
//
798
>
// We therefore need to fall back to custom rendering for numpad keys.
799
>
return null;
800
>
}
801
802
switch (keyCode) {