I never use the left control key, so I'd like to rebind it as Hyper, but ONLY inside Emacs. Is there a way to do this?
EDIT: I'm running Emacs on a linux system.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI never use the left control key, so I'd like to rebind it as Hyper, but ONLY inside Emacs. Is there a way to do this?
EDIT: I'm running Emacs on a linux system.
You'll be able to change what the control modifier is mapped to in the upcoming major Emacs release. While this isn't as fine-grained as it could be to remap only one of both control modifiers, it allows remapping them to hyper in Emacs only:
(setq x-ctrl-keysym 'hyper)
Feel free to open a bug report for individual modifier remappings.
If you are on a Mac you can try adding the following to your init.el
(setq mac-control-modifier 'hyper)
I believe (setq ns-control-modifier 'hyper)
would be the general solution for other OSes, I wouldn't know it, though.
To change the right control key you'd similarly use (setq mac-right-control-modifier 'hyper)
. To control the behaviour of other "meta" keys change control
for either option
, command
or function
, e.g., mac-command-modifier
.
ns
is the prefix used by the official Emacs for macOS. mac
is used by another macOS Emacs port. However, in this case, the official macOS Emacs also understands the mac
prefix, probably because the feature originated on the other Emacs port.
Mar 8, 2017 at 5:11
control-modifier
.
ns-popup-font-panel
and ns-auto-hide-menu-bar
.
Apr 19, 2019 at 18:31