Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Better than disabling capslock is to remap it to left control. In Windows, you can use SharpKeys [0] to update the registry to reconfigure behavior, or just use autohotkey (SharpKeys can't flip meanings, only overwrite one), although AHK won't work while you're logging into your user account on startup so SharpKeys is nicer. Not sure about Linux but I'm sure it's possible.

Never having to reach all the way to the actual Left Ctrl button is actually a godsend, it's a much much nicer UX.

[0] http://www.randyrants.com/category/sharpkeys/



Sharpkeys can swap keys, the readme says as much:

> Things that SharpKeys will do:

> ...

> Allow you to swap two keys with each other - e.g. you can swap Left Windows with Left Control and vice versa

I do have a vague recollection of Sharpkeys previously saying that it couldn’t, but that I tried and it worked. Long time since I last used Windows though.

https://github.com/randyrants/sharpkeys#things-that-sharpkey...


Oh huh, I didn't even bother looking at the README when I wrote that, because I remembered so well that it was unable to do this. In fact, that's why I went for the CapsLock rebind in the first place - I originally just wanted a solution for my Lenovo laptop having Fn in the Ctrl spot, prior to Lenovo allowing you to customize this in BIOS.

I found SharpKeys, but it wouldn't let me swap fn/ctrl. But while I was searching for how to do this, I came across some people who suggested remapping CapsLock to Ctrl, and I figured that was good enough, since it would still accomplish my original purpose, which was not to have to deal with 2 different muscle memories when using PC vs laptop.

This was back in 2009 so many versions of Windows ago, that's cool that you can do it now. Although I'm quite glad I chose to remap CapsLock as Ctrl, so I'm glad it wasn't possible back then!


You don't even need sharpkeys, it can be done with powertoys or with a simple native registry value.

That said, powertoy's remapping doesn't honor the remap in task manager, I'm not sure if this is a big deal or not.


I prefer dual-key-remap[0], it maps caps to escape when tapped and control when pressed with other keys.

[0] https://github.com/ililim/dual-key-remap


Oh that sounds pretty neat! In particular would make Ctrl+Shift+Esc easier to press to open the task manager, using the actual left-ctrl button for its intended purpose. I have pretty small hands so even pressing shift+capslock+esc is a bit of a reach. Thanks for linking this!


> Not sure about Linux but I'm sure it's possible.

Lots of ways to do it, and I've probably used most of them over the years. Right now on Linux Mint, it's an option in the keyboard layout.


One of the incantations I've committed to memory:

setxkbmap -option ctrl:swapcaps

This used to be universal, but as that I type that, it occurs to me it won't work under Wayland. I really should try out Wayland so I can learn the new way.


I map capslock to Command on macOS and Control on everything else. For many shortcuts (think copy-paste) muscle memory works across OSes.


Even better make it mod on hold and something else on tap (like showing you an app launcher).


macOS can do this right in keyboard settings under modifier keys.

It can be nice just to get rid of craps lock.


PowerToys also can do this, which I use to map Capslock to Esc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: