mugur icon indicating copy to clipboard operation
mugur copied to clipboard

modify the modifiers

Open zzkt opened this issue 3 years ago • 5 comments

Extending the mugur-modifiers to include a few more of the QMK mappings should enable more modifier prefixes.

zzkt avatar May 11 '21 08:05 zzkt

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

mihaiolteanu avatar May 11 '21 09:05 mihaiolteanu

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.

zzkt avatar May 11 '21 09:05 zzkt

As for the naming, I used the existing aliases just to start the discussion without touching too much of the code...

zzkt avatar May 11 '21 09:05 zzkt

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.

zzkt avatar May 11 '21 09:05 zzkt

The QMK names for the modifiers can be found in the Modifier Keys section of the docs.

zzkt avatar Jun 04 '21 10:06 zzkt