MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / keyToDisplayName

Function keyToDisplayName

source code/keybindings/parser.ts:107–140  ·  view source on GitHub ↗

* Map internal key names to human-readable display names.

(key: string)

Source from the content-addressed store, hash-verified

105 * Map internal key names to human-readable display names.
106 */
107function keyToDisplayName(key: string): string {
108 switch (key) {
109 case 'escape':
110 return 'Esc'
111 case ' ':
112 return 'Space'
113 case 'tab':
114 return 'tab'
115 case 'enter':
116 return 'Enter'
117 case 'backspace':
118 return 'Backspace'
119 case 'delete':
120 return 'Delete'
121 case 'up':
122 return '↑'
123 case 'down':
124 return '↓'
125 case 'left':
126 return '←'
127 case 'right':
128 return '→'
129 case 'pageup':
130 return 'PageUp'
131 case 'pagedown':
132 return 'PageDown'
133 case 'home':
134 return 'Home'
135 case 'end':
136 return 'End'
137 default:
138 return key
139 }
140}
141
142/**
143 * Convert a Chord to its canonical string representation for display.

Callers 2

keystrokeToStringFunction · 0.85
keystrokeToDisplayStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected