Emacs - change ctrl and alt keys in emacs

I have heard many great emacs features and would like to use it as a regular text editor.
the only obstacle for him is the problem of the key position Ctrl link .
all solutions found are the hard way, i.e. reassigning keys at the os level or creating caplock as Ctrl key

my objections to the above solutions: reassigning keys: would make my life difficult outside of emacs, say, using firefox and emacs together.
caplock as a Ctrl key: it will always switch to the keyboard, leading to the button lock, which is very annoying.

so there is a path inside emacs to invert the role of the Ctrl and Alt keys, which will only work in emacs.
the only way I can think of is to mess with emacs code .... but it will be like after a fly with a bazooka.

+4
source share
3 answers

You did not say what your OS is. If you are on Windows, you can only swap them in emacs .

But I recommend checking for sticky keys . In this case, you do not need to change caps and ctrl, and you will also have health benefits in other applications, and not just in emacs.

+3
source

I believe the best solution for me is to use ergoemacs keyboard keys
ergoemacs key bindings

+1
source

In OS X and NextStep, there are variables ns-command-modifier , ns-alternate-modifier , etc., which are mainly used to exchange option and command values, but can be used to accomplish 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 application keyboard layouts.

0
source

Source: https://habr.com/ru/post/1394789/


All Articles