diff --git a/src/shortcuts/chars.ts b/src/shortcuts/chars.ts deleted file mode 100644 index 0f989193..00000000 --- a/src/shortcuts/chars.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {isMac} from '../utils/platform'; - -import {Key as K, ModKey as MK} from './const'; -import {Chars} from './types'; - -const cmMac = { - [MK.Mod]: 'cmd', -}; - -const cmPC = { - [MK.Mod]: 'ctrl', -}; - -export const cmChars: Chars = { - [K.Esc]: 'Escape', - ...(isMac() ? cmMac : cmPC), -}; diff --git a/src/shortcuts/formatter.ts b/src/shortcuts/formatter.ts index c7eae850..c6426fe6 100644 --- a/src/shortcuts/formatter.ts +++ b/src/shortcuts/formatter.ts @@ -1,6 +1,5 @@ import {isMac} from '../utils/platform'; -import {cmChars} from './chars'; import {ModKey as MK} from './const'; import {Defs, PlatfrormDefs} from './types'; @@ -28,10 +27,7 @@ class ShortCutFormatter { toCM(name: string): string | null { const defs = this.#map.get(name); if (!defs) return null; - return defs - .map((str) => cmChars[str] ?? str) - .sort((a) => (a === MK.Shift ? -1 : 0)) - .join('-'); + return defs.sort((a) => (a === MK.Shift ? -1 : 0)).join('-'); } toView(name: string): string | undefined {