diff options
-rw-r--r-- | .config/emacs/modules/mm-keybindings.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/emacs/modules/mm-keybindings.el b/.config/emacs/modules/mm-keybindings.el index e3df839..dc49261 100644 --- a/.config/emacs/modules/mm-keybindings.el +++ b/.config/emacs/modules/mm-keybindings.el @@ -43,6 +43,19 @@ the first command is remapped to the second command." #',to)))) +;;; Support QMK Hyper + +(defun mm-qmk-hyper-as-hyper (args) + (let ((chord (cadr args))) + (when (string-prefix-p "H-" chord) + (setf (cadr args) (concat "C-M-s" (substring chord 1))))) + args) + +;; Both ‘keymap-global-set’ and ‘keymap-local-set’ call ‘keymap-set’ +;; internally, so this advice covers all cases +(advice-add #'keymap-set :filter-args #'mm-qmk-hyper-as-hyper) + + ;;; Disable ESC as Meta (keymap-global-set "<escape>" #'ignore) |