I'm on Ubuntu 20.04 (GNU Emacs 26.3), and I would like to swap the Hyper and Ctrl keys. Basically, I have a keyboard map set up (with xkb) that suits my needs, except that in emacs (and only in emacs), I would like the Hyper and Ctrl keys to be swapped.
Based on this How to have Emacs treat left Ctrl as Hyper? I've tried adding this
(setq x-ctrl-keysym 'hyper) (setq x-hyper-keysym 'ctrl)
.emacs. However, it doesn't have the desired effect. (Incidentally, the variable
ns-control-modifier doesn't seem to be defined.)
Ideally, I would like to only swap these keys in the Emacs GUI, but not in the Gnome Terminal (when invoked with
What am I doing wrong?