Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

SetTitleMatchMode, 2

#IfWinActive, Emacs
Capslock::Ctrl
Ctrl::Capslock
#IfWinActive

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

 
discard

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.