-
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
If a shortcut has an arrow key, right now the text (e.g., "ArrowRight") is printed when the shortcut is formatted for display in
lumino/packages/commands/src/index.ts
Lines 1133 to 1165 in 4f24322
/** | |
* Format a keystroke for display on the local system. | |
*/ | |
export | |
function formatKeystroke(keystroke: string): string { | |
let mods = ''; | |
let parts = parseKeystroke(keystroke); | |
if (Platform.IS_MAC) { | |
if (parts.ctrl) { | |
mods += '\u2303 '; | |
} | |
if (parts.alt) { | |
mods += '\u2325 '; | |
} | |
if (parts.shift) { | |
mods += '\u21E7 '; | |
} | |
if (parts.cmd) { | |
mods += '\u2318 '; | |
} | |
} else { | |
if (parts.ctrl) { | |
mods += 'Ctrl+'; | |
} | |
if (parts.alt) { | |
mods += 'Alt+'; | |
} | |
if (parts.shift) { | |
mods += 'Shift+'; | |
} | |
} | |
return mods + parts.key; | |
} |
A better convention, I think, is to replace arrows in the shortcut key with actual unicode arrow glyphs, i.e., "ArrowRight" with unicode 2192: β
piersdeseilligny
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers