4

On my work PC, with no admin and a desire of not installing 3rd party stuff:

How can i remap the Caps Lock key to function as CTRL?

I'm aware of system wide registry hacks with this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

But this fails to write the key, I assume, due to access issues.

And a per user approach:

HKEY_CURRENT_USER\Keyboard Layout

Which can be writen, but to no effect. I assume this is due to the key only being used in pre-vista versions of windows, as comments around the Internet suggests.

Any suggestion on how this can be achieved?

kidmose
  • 362

1 Answers1

2

I took this from the emacs wiki (which I can't link to as I don't have enough rep on superuser). Use Autohotkey. You can install a portable version that needs no admin rights.

However, I just used ahktoexe and the script listed on the emacs site to make an exe that I run (without needing admin rights). The script is specific for emacs but you could just remove the if statement and make it permanent.

Make a file called script.ahk add this to it:

Capslock::Control

Run it through ahktoexe, and there you go. Put the exe in startup on Start Menu and it'll run every time you turn on the PC.

alexjj
  • 23
  • Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question. The OP specifically stated "not installing 3rd party stuff". – DavidPostill Sep 23 '15 at 20:30
  • @DavidPostill I understand but I believe my answer is still useful as it requires no admin rights which OP has no choice over. I found this question when searching for the exact same thing. Not installing 3rd party things (that require no admin rights) is a "desire", which someone had already said there is no solution. ahktoexe can be deleted after use and the final file is all that remains. It is up to OP if remapping is more or less important than running an executable. – alexjj Sep 24 '15 at 21:48
  • I tried this in win10 and it works very well. I believe this does answer the question since you are not installing third party software, you are using a portable version of the software to create an .exe which you run to get what you want. Thank you for the solution. I was able to use this to work with emacs. – scientific_explorer May 12 '21 at 09:56