Câu trả lời:
Đây là những gì tôi sử dụng cho blog của mình .
(define-key org-mode-map "\C-ck" #'endless/insert-key)
(defun endless/insert-key (key)
"Ask for a key then insert its description.
Will work on both org-mode and any mode that accepts plain html."
(interactive "kType key sequence: ")
(let* ((is-org-mode (derived-mode-p 'org-mode))
(tag (if is-org-mode
"@@html:<kbd>%s</kbd>@@"
"<kbd>%s</kbd>")))
(if (null (equal key "\r"))
(insert
(format tag (help-key-description key nil)))
(insert (format tag ""))
(forward-char (if is-org-mode -8 -6)))))
Gọi nó bằng cách gọi C-c k.
C-h ksẽ làm.<kbd>các thẻ thoát .RET, nó sẽ chèn các thẻ và để lại điểm bên trong (thay vì chèn bất kỳ phím nào), vì vậy bạn có thể nhập các phím phức tạp hơn.org-mode!(define-key org-mode-map (kbd "C-c k") #'endless/insert-key)và là (define-key org-mode-map (kbd "C-c k") 'endless/insert-key)gì?
(help-key-description key nil)thành(mapconcat 'identity (split-string (help-key-description key nil)) "</kbd><kbd>")