Keyboard shortcuts
Describe keys and shortcut combinations with Markdown.
Display a key
Write :kbd[Key] in your .mdx pages. No import or plugin is required:
Press Esc to close a dialog or Enter to confirm.
Press :kbd[Esc] to close a dialog or :kbd[Enter] to confirm.
Write a shortcut
Write the complete combination inside one directive, separating keys with +:
Press Control plus KCtrl+K to open search.
Press :kbd[Ctrl + K] to open search.
Use spaces around the separator. RDX shows each key separately and provides a
single text alternative for assistive technology, using the interface language
from lang in rdx.config.ts. The English alternative for this example is
"Control plus K"; in Brazilian Portuguese it is "Control mais K".
Multiple modifiers and the plus key work the same way:
Control plus Shift plus PCtrl+Shift+P or Control plus PlusCtrl++.
:kbd[Ctrl + Shift + P] or :kbd[Ctrl + +].
Write individual keys separately when they describe independent actions: Enter to confirm and Esc to close.
Shortcut reference tables
| Action | Shortcut |
|---|---|
| Open search | Control plus KCtrl+K |
| Save | Control plus SCtrl+S |
| Close a dialog | Esc |
| Action | Shortcut |
| :------------- | :------------- |
| Open search | :kbd[Ctrl + K] |
| Save | :kbd[Ctrl + S] |
| Close a dialog | :kbd[Esc] |
These shared shadcn/ui components render semantic <kbd> elements and follow
the site's light and dark themes. Use them to describe shortcuts supported by
your application. See Search for RDX's search shortcut.