2

I use emacs on several machines between work and home, and I'm naturally interested in remapping that Caps_Lock key to save my finger from agony. On some platforms it's a bit more difficult to do than one would like, the interface to the X server is far from being user-friendly.

On the other hand, I managed to set up a simple system to share my emacs configuration across machines. Since the remapping of the key is mainly useful inside emacs, is there a way to remap CapsLock to Control (and vice-versa) inside emacs only?

If it makes any difference, I use emacs 24.1.

  • 1
    It may not be possible, or if possible, trivial, at least according to Moving The Ctrl Key page of the Emacs wiki. – Pedro Romano Oct 31 '12 at 18:19
  • The OS (more precisely X) treats CapsLock and Ctrl specially, so you can't. You need to do it at the level of the X server. (Ok, strictly speaking you can, but it'll play hell with the CapsLock functionality unless you deactivate that on the X server, and I don't think Emacs has any code to do it.) – Gilles Oct 31 '12 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.