mugur
mugur copied to clipboard
modify the modifiers
Extending the mugur-modifiers
to include a few more of the QMK mappings should enable more modifier prefixes.
I still haven't figured out how to differentiate between left control and right control in Emacs. At least on linux, https://emacs.stackexchange.com/questions/20436/pressing-both-ctrl-keys-at-the-same-time-is-recognized-as-ctrl-plus-meta That's the reason I don't see the difference and the usefulness of having two different Control (or Meta, or etc..) keys for the same thing.
I understand that not everybody wants to use the keyboard ONLY for Emacs, though.
Regardless, is there a better naming convention for the keys, maybe? C and M are clearly recognized by any Emacs users, but ropt, H and the rest?!
I've found a bug (in my own code), too,
(mugur--keycode 'H-x) --> "KC_X"
(mugur--keycode 'X-x) --> "KC_X"
(mugur--keycode 'xsd-x) --> "KC_X"
...etc
I've been using KC_LALT
as Meta (emacs) and KC_RALT
as ALTGR (system) as prefix key to enter accents.
on mac it's fairly straight forward...
(when *macos*
(setq mac-option-modifier 'meta ;; 'alt' key as 'meta'
mac-command-modifier 'super ;; 'splat' key as 'super'
mac-function-modifier 'hyper ;; hyper functionalty
mac-right-command-modifier 'hyper ;; hyper functionalty (QMK compatible)
mac-right-option-modifier 'none)) ;; unbind right 'alt' key for accented input
I'm not sure there's a similar general setup, but you can modify key-translation-map
to remap or ignore keys in emacs from the system input layer.
As for the naming, I used the existing aliases just to start the discussion without touching too much of the code...
This started from realising that KC_HYPER
in QMK isn't really the same idea of a modifier as the emacs 'hyper
or H
prefix key.
The QMK names for the modifiers can be found in the Modifier Keys section of the docs.