A Python markdown extension for wrapping keyboard shortcuts in a special tag
Project description
TORO KBD Markdown Extension
The toro-mkdocs-kbd wraps your keyboard shortcut into a KBD tag. The tag will contain three attributes; linux, macos, and windows. The values in the attributes will be the keyboard shortcut based on the OS.
Installation
pip install toro-mkdocs-kbd
Usage
The markdown syntax will be the keyboard shortcut between two questions marks. A plus sign will be used to separate the keys. MOD will be used as a generic symbol for both the ctrl and command key.
??MOD+A??
The produced HTML of the markdown syntax will be:
<p><kbd linux="Ctrl + A" macos="⌘A" winodws="Ctrl + A"></kbd></p>
Conversion
Markdown | Windows/Linux | macOS |
---|---|---|
??mod?? | Ctrl | ⌘ |
??alt?? | Alt | ⌥ |
??enter?? | Enter | ↩ |
??shift?? | Shift | ⇧ |
??ctrl?? | Ctrl | ⌃ |
??left?? | Left | ← |
??right?? | Right | → |
??up?? | Up | ↑ |
??down?? | Down | ↓ |
??tab?? | Tab | ⇥ |
??esc?? | Esc | ⎋ |
??space?? | Space | Space |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
toro-mkdocs-kbd-1.0.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for toro_mkdocs_kbd-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2b712211885edf1e8b0173d431c3ffbfc28e21d91b150f7eb54e2e249606b93 |
|
MD5 | decf47264f7b38d9ddb0092629c383fe |
|
BLAKE2b-256 | 88d1e4eef2c11a96c23ed6114cfda5f396d54fa25475c11368ecb5906fc22332 |