2

Is it possible to rebind the Capslock key to something else?

For example, suppose we want to invoke the Control-x commands by using CapsLock; so instead of pressing Control-xo, one can type Capslocko.

  • You could try combing this emacswiki.org/emacs/CapsKey#toc5 with what you have already tried. – elethan Jan 5 '16 at 4:54
  • 4
    Capslock is a special key, and you will need to remap it at the operating system level before you can use it for this task in Emacs. Many Vim (and Evil) users rebind it to escape, and many standard Emacs users rebind it to Control. You can probably adapt those efforts for your purposes. Each operating system will do it differently, however, so look for yours (and probably edit your post to tell us which one you're using). – Dan Jan 5 '16 at 13:13
0

User Dan mentions: "Capslock is a special key, and you will need to remap it at the operating system level before you can use it for this task in Emacs." (Source)

Capslock was first re-mapped to Nabla (∇). This was done at the Operating System level; Example configuration.

Now, the desired task can be achieved by re-mapping Nabla from within Emacs. For example, to map Nabla to Control-X-prefix, the following command can be used:

(global-set-key '[8711] 'Control-X-prefix)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.