Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was able to remap CTRL and CAPS LOCK keys with each other using registry editor in Windows. It is pretty convenient now in emacs but quite awkward for the normal applications.

I'd like to remap CTRL <-> CAPS only for emacs but for everything else, the keys should remain the same. Is it possible?

share|improve this question

Yes, it's possible with an AutoHotkey script like the following:

SetTitleMatchMode, 2

#IfWinActive, Emacs

See SetTitleMatchMode, #IfWinActive / #IfWinExist, Remapping Keys and Buttons and other AHK docs if you need to tweak the script (especially to match the Emacs window title or ahk_class properly).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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