News for hackers. Stuff that matters.
Re:Caps Lock Behaviour Disabled in Gnome by RheingoldRiver on Thursday September 28, 2023 @07:01PM (#37697091)
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/

Re:Caps Lock Behaviour Disabled in Gnome by CraftThatBlock on Thursday September 28, 2023 @07:30PM (#37697340)
PowerToys also can do this, which I use to map Capslock to Esc
Re:Caps Lock Behaviour Disabled in Gnome by bombcar on Thursday September 28, 2023 @07:17PM (#37697227)
macOS can do this right in keyboard settings under modifier keys.

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

Re:Caps Lock Behaviour Disabled in Gnome by nemetroid on Thursday September 28, 2023 @07:43PM (#37697456)
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...

Re:Caps Lock Behaviour Disabled in Gnome by RheingoldRiver on Friday September 29, 2023 @12:02AM (#37699144)
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!

Re:Caps Lock Behaviour Disabled in Gnome by NikkiA on Thursday September 28, 2023 @08:04PM (#37697652)
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.

Re:Caps Lock Behaviour Disabled in Gnome by d11z on Thursday September 28, 2023 @08:16PM (#37697741)
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

Re:Caps Lock Behaviour Disabled in Gnome by RheingoldRiver on Friday September 29, 2023 @01:06AM (#37699487)
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!
Re:Caps Lock Behaviour Disabled in Gnome by stvltvs on Thursday September 28, 2023 @09:43PM (#37698320)
> 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.

Re:Caps Lock Behaviour Disabled in Gnome by rpdillon on Friday September 29, 2023 @10:32AM (#37704876)
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.

Re:Caps Lock Behaviour Disabled in Gnome by andrewf on Friday September 29, 2023 @03:32AM (#37700412)
I map capslock to Command on macOS and Control on everything else. For many shortcuts (think copy-paste) muscle memory works across OSes.
Re:Caps Lock Behaviour Disabled in Gnome by eviks on Friday September 29, 2023 @05:03AM (#37701084)
Even better make it mod on hold and something else on tap (like showing you an app launcher).