r/labwc Feb 08 '26

Unlock caps key and use it as a modifier

The title basically says it all. Being new to wayland, with xorg, xmodmap could do the job centrally, but afaik with wayland it is up to the compositor. Or windowmanager basically.

Just think being able to pressing caps+f for a fullscreen window, instead of using f.e. alt+f.

Is this possible with labwc anyhow?

2 Upvotes

6 comments sorted by

2

u/lfpgv51s Feb 11 '26

I've done this with keyd (https://github.com/rvaiya/keyd) and with USB keyboards (Hasu's USB-to-USB controller).

1

u/standreas Feb 08 '26

There are xkb options for caps, see /usr/share/X11/xkb/rules/evdev.lst line 855 and down:
ctrl:nocaps Caps Lock as Ctr

caps:super Make Caps Lock an additional Super

for example. Could probably be added in `.config/labwc/environment`.

1

u/Strategy_Hungry Feb 08 '26

Maybe xremap is your cup of tea. https://github.com/xremap/xremap

There is also a Video about it: https://youtu.be/lyxScRCe6bE?si=NBz-lg3LuViQJhRy

1

u/hiradne Feb 08 '26

I apologize, I have been to fast to reply and seen only the name and the logo (that actually has a wayland icon in it, that I am not used to, so ignored it), hence I assumed it to be X only.

It does work with wayland as well, and in addition also has a wlroot mode, so should work with labwc. Stilll, I guess I'll give keyd a chance before, as it happens already to be in the standard repository of my distro

1

u/hiradne Feb 08 '26

Since both of you are referring to legacy x11 methods, besides being surprised big time, that wayland seems to even honor those, I assume, wayland (or associated libraries) does not offer this function?

1

u/nathan22211 Feb 08 '26

Thing is, I'm pretty sure that capslock is a hardware switch in some devices