Skip to content
Navigation

Primary

Keyboard input

A key highlights a keyboard button inside an instruction and sets it apart from ordinary text and code.

Example

Key

Press Esc to close the window.

Key

Markup

Markdown
:kbd[Ctrl]
  • The square brackets hold the key label, as on the keyboard. It is plain text: HTML does not work inside, the < and > signs are shown as is.
  • An empty key :kbd[] stops the build with the error CONTENT_COMPONENT_SLOT_REQUIRED.

Variants

Combinations

Write each key separately and put a + sign between them as plain text. Keys joined by + become one SIMAI Framework combination: the keys stand side by side, without the + sign between them. Keys with words between them (“then”, “after that”) stay separate: they are pressed one after another.

Key combination

Open search with ⌘+K, then press Enter.

Key combination

Accessibility

  • The key is output as a <kbd class="sf-kbd"> element of the SIMAI Framework key component, a key of one sign (⌘, K) as a square. A combination is output as an outer <kbd class="sf-kbd--group"> with the keys inside, and the + sign stays in the markup as a .sf-kbd-join element. Screen readers recognise them as keyboard input.
  • Write the label as a word or a symbol, as on the keyboard: Esc, Enter, ⌘.
  • For a menu command, a file name or code choose plain text or backticks, not a key.

Parameters

No parameters.

Markup with parameters, for example :kbd[Esc]{size=1}, stops the build with the error CONTENT_COMPONENT_PROP_UNKNOWN.

See also