<!-- thumbnail: https://i.sstatic.net/25p0m.png --> <!-- version: 2.2 --> <!-- tag: editing --> <!-- excerpt: Makes using the <kbd>, <sup>, and <sub> tags a snap! This is a cross-browser userscript that adds buttons and keyboard shortcuts that operate in the same manner as the other SE, editing buttons. --> <!-- website: https://github.com/BrockA/SE-misc --> ###About: This script adds buttons and keyboard shortcuts that make it easy to **add `<kbd>` tags and/or superscripts and subscripts**, when editing posts. ###Screenshot: [![This script in action][1]][1] ###To use: Click the button or press <kbd>Alt</kbd><kbd>K</kbd> on the keyboard and `<kbd></kbd>` will be inserted at the cursor. If text is selected, it will be wrapped by the `<kbd>` tags instead. Likewise for the Superscript and Subscript tags, the keyboard shortcuts are <kbd>Alt</kbd><kbd>↑</kbd> and <kbd>Alt</kbd><kbd>↓</kbd> (Up arrow and Down arrow). Tags are wrapped and unwrapped the same way that other markup (Bold, Italic, etc.) is -- including how whitespace and nested tags are handled. ###Download / Install: [Install the script from GitHub][2]: [**<kbd>Install</kbd>**][2] Requires Firefox+Greasemonkey, Chrome+Tampermonkey, or equivalent userscript engine. ###Code: Find the source on GitHub at: [**BrockA/SE-misc/Add_kbd_sup_sub_shortcuts.user.js**][3] You may also make bug reports, pull-requests, etc. there. ---------- Inspired by the question, ["Markdown syntax for `<kbd>foo</kbd>`"][4]. [1]: https://i.sstatic.net/BeZbk.png [2]: https://github.com/BrockA/SE-misc/raw/master/Add_kbd_sup_sub_shortcuts.user.js [3]: https://github.com/BrockA/SE-misc/blob/master/Add_kbd_sup_sub_shortcuts.user.js [4]: https://meta.stackoverflow.com/q/130074/148310