KeyTip draws a shortcut as Kbd keycaps, optionally after the action it performs. It takes the same string useHotkeys registers, so one constant drives both and the hint cannot drift from the binding. mod shows as ⌘ on macOS and iOS and as Ctrl everywhere else.
A space separates the steps of a sequence, drawn with "then"; an array lists alternatives, drawn with "or". The full syntax is on the useHotkeys page.
A hover that names the action and its keys teaches the shortcut. Pass a KeyTip as a tooltip's label:
KeyTip is inline, so it sits in a line of text.
Symbols such as ⌘ and ⇧ are read inconsistently, or not at all. The keycaps are hidden from assistive technology, and a screen reader hears the combination spelled out instead: "Undo, Command+Z" on a Mac, "Undo, Control+Z" elsewhere.
The page renders Ctrl on the server, where the platform is unknown, and switches to ⌘ right after it hydrates on Apple platforms, without a hydration warning.