The key-binding source (same shape as in config).
A pretty label such as "⌘⇧R" or "Ctrl+Shift+R".
formatBinding("mod+shift+r"); // "⌘⇧R" on macOS, "Ctrl+Shift+R" on other
formatBinding("shift+?"); // "⇧?" on macOS, "Shift+?" on other
export function formatBinding(binding: KeyBinding): string {
const tokens = formatBindingTokens(binding);
return isMac() ? tokens.join("") : tokens.join("+");
}
Formats a key-binding string into a human-readable label for display in the help modal. Uses platform-appropriate symbols (⌘ ⌥ ⌃ ⇧) on macOS and spelled-out names (Ctrl, Alt, Shift) elsewhere.