Hesoyam

Keyboard Input

Shortcut hint. Kbd swaps glyphs for the current OS — do not hard-code ⌘.

Modifiers

Boolean props render the platform key. Apple gets Command / Control / Option / Shift glyphs; other platforms get Ctrl, Alt, and Shift.


        
1 <Kbd meta />
2 <Kbd shift />
3 <Kbd alt />
4 <Kbd ctrl />

Combination

Stack modifiers, then put the trigger key in the default slot.

K P

        
1 <Kbd meta shift />
2 <Kbd meta>K</Kbd>
3 <Kbd meta alt>P</Kbd>

Small

Use small inside menus, command rows, and table cells.

/ K

        
1 <Kbd small>/</Kbd>
2 <Kbd small meta>K</Kbd>

In prose

Press K to open the command menu.


        
1 Press <Kbd meta>K</Kbd> to open the command menu.

Best practices

  • Shortcut chips in UI chrome: menus, button suffixes, empty states. Long-form docs that narrate a shortcut can write the glyphs in text so a copy stays readable.
  • Pass meta, shift, alt, ctrl. Hard-coding Cmd+K is wrong on Windows and Linux.
  • Children are one key: K, 7, Enter, Esc. Do not lowercase, do not spell modifiers in the slot.
  • Punctuation stays outside the element. “Press K to open the command menu.” — the period is not a key.
  • KeyboardInput is the same export as Kbd. New code should import Kbd.