What are my options for making my Caps Lock key a Control key? Can this be done within Emacs?
3 Answers
Windows has a built-in feature that lets you flexibly remap keys by adding registry keys corresponding one keycode to another.
This isn't very user-friendly to do manually, so you can get a program called SharpKeys that's a nice GUI to this.
- Just install the program (it's small); start it up.
- Press Add below the empty list box.
- You can then choose Caps Lock from the left list and Left Control or Right Control from the right list, or do it the easy way and just click "Type Key" on the left and press your caps lock key and then okay.
- Then do the same thing on the right with either Left Control or Right Control.
- Then just hit OK, then hit Write to Registry in the main window.
- Once this is done you'll need to log off and then back on so that Windows will reload the keyboard settings.
Most of the time, AutoHotKey should do the trick. I've red this post, and this other post. Never tried this myself, so I hope it will help.
-
It would be useful if you could expand this, though now that I think about it, this question has multiple answers. AutoHotKey and modifying the windows registry are two that I can think of offhand. This might make it a candidate for community wiki.– nixeagleCommented Oct 6, 2014 at 19:32
-
@nixeagle Expand? Sorry but I can show you the trick only using xmodmap under Debian. Under Windows, I can't as I'm not a Windows user. Commented Oct 6, 2014 at 19:42
-
1@nixeagle Answering questions you already know the answers. So the next time I'll see a question from nixeagle, I'm better stay away :) Commented Oct 6, 2014 at 19:55
-
1@nixeagle I think, questions should be asked only when the answer is needed or not known IMHO, maybe I'm wrong :\ please, do as you feel Commented Oct 6, 2014 at 20:07
-
1@Nsukami_ 1. It is okay to ask questions you know the answer to. It is even ok to answer your own questions (there's a button for it when you ask). On the other hand, flooding the site with simple questions is not ok (not that I'm implying anything). 2. This is type of meta discussion is not suited for comments. Use the chat or ask a question on meta.emacs. Commented Oct 6, 2014 at 20:35
Apologies for being slightly OT, but it's been a long time since I used Windows. I was kept sane back then by XKeyEmacs, a somewhat obscure but wonderfull program that makes Emacs keybindings work throughout Windows. Even multi-key bindings like C-x C-s work in MS Word etc.
IIRC it can also map tab to control, but perhaps that was something else.
evil-mode
)