rvaiya / keyd

A key remapping daemon for linux.
MIT License
2.85k stars 169 forks source link

Keyd config for layout #852

Open Azer0s opened 1 week ago

Azer0s commented 1 week ago

I want my keyd config to apply only in US layout (I simply want to switch y and z) but don't want them switched when I switch to DE layout. Is that possible in keyd?

nsbgn commented 1 week ago

keyd does not know anything about which layout you are using (assuming that you mean by 'layout' the interpretation of keys by your wm/tty).

So, no, but you can probably hack something together: perhaps make a script that listens to changes in current layout to disable/enable keyd, or use something like: y = command(<test layout command> && keyd do y || keyd do z)

However, such hacks seem overkill (and super fragile) for this use case. I've heard from other users with a DE layout (@herrsimon) that they prefer just handling their layout from within keyd, using the layout mechanism.

But to br honest, if it's really only for switching y and z, I'd skip keyd entirely and make a custom XKB layout.