integrations icon indicating copy to clipboard operation
integrations copied to clipboard

feature request: shortcut markup for <kbd> elements

Open nekomeowww opened this issue 1 year ago • 2 comments

Currently the experience of writing <kbd> elements and nested <kbd> elements for keystrokes when documenting key bindings are causing headaches.

Can we introduce some of the currently using markup for <kbd> and port them into markdown-it by looking up the rehype, remark and micromark communities?

nekomeowww avatar Nov 26 '23 09:11 nekomeowww

This would be great, since when trying to use markdown-it-kbd and bi-directional-links at the same time - the latter starts cluttering the log with attempts to parse kbd as bi-directional syntax.

Ampernic avatar Apr 05 '24 17:04 Ampernic

[!NOTE] In Nolebase, I directly use <kbd data-macos-keyboard-key="command">command</kbd> + <kbd data-keyboard-key="space">space</kbd> markup along with the CSS styles I manually tweaked for VitePress to make it possible to attach icons and logos for the keys.

These are the known markups I know for sure to look into:

nekomeowww avatar Apr 06 '24 04:04 nekomeowww