MCPcopy Create free account
hub / github.com/experdot/pointer / getShortcutLabel

Function getShortcutLabel

src/renderer/src/utils/shortcutPresentation.ts:50–69  ·  view source on GitHub ↗
(id: ShortcutLabelId)

Source from the content-addressed store, hash-verified

48}
49
50export 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
71export function formatShortcutTooltip(label: string, shortcutId: ShortcutLabelId): string {
72 return `${label} (${getShortcutLabel(shortcutId)})`

Callers 4

getContextMenuItemsFunction · 0.90
getContextMenuItemsFunction · 0.90
MessageContent.tsxFile · 0.90
formatShortcutTooltipFunction · 0.85

Calls 1

resolveDisplayPlatformFunction · 0.85

Tested by

no test coverage detected