Function: kkp--create-modifiers-string

kkp--create-modifiers-string is a natively compiled function defined in kkp.el.

Signature

(kkp--create-modifiers-string MODIFIER-NUM)

Documentation

Create a string of Emacs key modifiers according to MODIFIER-NUM.

Source Code

;; Defined in /nix/store/0igl9q4k4n87vg4h2gnnrlha21kx9biv-emacs-packages-deps/share/emacs/site-lisp/elpa/kkp-20260706.858/kkp.el
(defun kkp--create-modifiers-string (modifier-num)
  "Create a string of Emacs key modifiers according to MODIFIER-NUM."

  ;; add modifiers as defined in key-valid-p
  ;; Modifiers have to be specified in this order:
  ;;    A-C-H-M-S-s which is
  ;;    Alt-Control-Hyper-Meta-Shift-super

  (let ((key-str ""))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'alt))
      (setq key-str (concat key-str "A-")))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'control))
      (setq key-str (concat key-str "C-")))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'hyper))
      (setq key-str (concat key-str "H-")))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'meta))
      (setq key-str (concat key-str "M-")))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'shift))
      (setq key-str (concat key-str "S-")))
    (when (kkp--bit-set-p modifier-num (kkp--mod-bits 'super))
      (setq key-str (concat key-str "s-")))
    key-str))