(id: ShortcutLabelId)
| 48 | } |
| 49 | |
| 50 | export function getShortcutLabel(id: ShortcutLabelId): string { |
| 51 | const modifier = resolveDisplayPlatform() === 'darwin' ? 'Cmd' : 'Ctrl' |
| 52 | |
| 53 | switch (id) { |
| 54 | case 'treeRename': |
| 55 | return 'F2' |
| 56 | case 'treeDelete': |
| 57 | return 'Del' |
| 58 | case 'tabNew': |
| 59 | return `${modifier}+N` |
| 60 | case 'tabClose': |
| 61 | return `${modifier}+W` |
| 62 | case 'messageCopy': |
| 63 | return `${modifier}+C` |
| 64 | case 'messagePrev': |
| 65 | return 'Shift+Space' |
| 66 | case 'messageNext': |
| 67 | return 'Space' |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | export function formatShortcutTooltip(label: string, shortcutId: ShortcutLabelId): string { |
| 72 | return `${label} (${getShortcutLabel(shortcutId)})` |
no test coverage detected