Markdown-it syntax add-on for keystrokes. Renders [[x]] as <kbd>x</kbd>

Usage no npm install needed!

<script type="module">
  import markdownItKbd from '';


markdown-it-kbd Build Status npm version Bower version

markdown-it plugin for keystrokes

Renders [[x]] as <kbd>x</kbd>. (<kbd> is the tag for keystrokes).


const md = require('markdown-it')();
const kbd = require('markdown-it-kbd');


This plugin can also be used together with markdown-it-attrs.

Syntax notes

The end tag ]] must be on the same line as the start tag [[.

The characters “[” and “]” are not allowed within keystroke tags. If you need to use them, escape them with a backslash (i.e. \[ or \]) or use HTML escape sequences (&#91 for [ or &#93; for ]).