Primitives / foldkit-primitives/events

formatHotkey

function · packages/primitives/src/events/hotkeys.ts:231

function formatHotkey(
  pattern: string,
  platform?: Platform,
): Option.Option<string>

What to show beside a control for a pattern: ⌘N on a Mac or iPhone, Ctrl+N elsewhere. The text sits in a left-to-right isolate, so a right-to-left layout does not reorder it into N⌘. None for a pattern matchHotkey would never match.