6
votes

i have heard a lot of excellent features of emacs and would like to use it as my regular text editor.
the only hindrance to it is the problem of Ctrl key position link.
all the solutions i found are the hard way ie remapping keys at os level, or making capslock as Ctrlkey

my objections to the above solutions are: remapping keys: would make my life hard outside of emacs, say using firefox and emacs together.
capslock as Ctrl key: would always toggle the keyboard led for caps lock which is quite annoying.

so is there a way within emacs to invert the role of Ctrl and Alt key which will have effect in emacs alone.
the only way i can think of is to tinker with the emacs code.... but that would be like going after a fly with a bazooka.

3
Most OS level remappings of capslock to ctrl don't make the keyboard capslock LED blink. - McPherrinM
Remap capslock and put a sticker of the led? - Thomas
^^lol.. i think instead of this i'll prefer to try emacs the way it is.. and after some experience.. go after the fly with a tank :) - Archit

3 Answers

4
votes

You didn't say what your OS is. If you are on Windows then you can have them swapped only in emacs.

But I recommend checking out sticky keys instead. With this you don't need to swap caps and ctrl, and you will have the health benefits in other apps too, not just in emacs.

1
votes

i think the best solution for me is to use ergoemacs keybindings
ergoemacs keybindings

1
votes

On OS X and NextStep there variables ns-command-modifier, ns-alternate-modifier, etc. that are primarily used to swap the meanings of option and command but could be used to do what you want (inside Emacs). I don't think there are similar things for other platforms (but I may have missed them).

Although I have never used it, kkbswitch claims to allow per application keyboard layouts.