(keymaps: Record<string, string[]>)
| 6 | const separator: MenuItemConstructorOptions = {type: 'separator'}; |
| 7 | |
| 8 | const getCommandKeys = (keymaps: Record<string, string[]>): Record<string, string> => |
| 9 | Object.keys(keymaps).reduce((commandKeys: Record<string, string>, command) => { |
| 10 | return Object.assign(commandKeys, { |
| 11 | [command]: keymaps[command][0] |
| 12 | }); |
| 13 | }, {}); |
| 14 | |
| 15 | // only display cut/copy when there's a cursor selection |
| 16 | const filterCutCopy = (selection: string, menuItem: MenuItemConstructorOptions) => { |