Function: markdown-insert-kbd
markdown-insert-kbd is an interactive and byte-compiled function
defined in markdown-mode.el.
Signature
(markdown-insert-kbd)
Documentation
Insert markup to wrap region or word in <kbd> tags.
If there is an active region, use the region. If the point is at a word, use the word. Otherwise, simply insert <kbd> tags and place the point in between them.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-insert-kbd ()
"Insert markup to wrap region or word in <kbd> tags.
If there is an active region, use the region. If the point is at
a word, use the word. Otherwise, simply insert <kbd> tags and
place the point in between them."
(interactive)
(if (use-region-p)
;; Active region
(let ((bounds (markdown-unwrap-things-in-region
(region-beginning) (region-end)
markdown-regex-kbd 0 2)))
(markdown-wrap-or-insert "<kbd>" "</kbd>" nil (car bounds) (cdr bounds)))
;; Markup removal, markup for word, or empty markup insertion
(if (thing-at-point-looking-at markdown-regex-kbd)
(markdown-unwrap-thing-at-point nil 0 2)
(markdown-wrap-or-insert "<kbd>" "</kbd>" 'word nil nil))))