keyd icon indicating copy to clipboard operation
keyd copied to clipboard

Use both control keys to swap layout

Open ddffnn opened this issue 6 months ago • 0 comments

I'm trying to implement behavior just like grp:ctrls_toggle in xkb. I've tried the below config, but can only enter the dvorak layout, that is, I can't get back to the main layout. It looks like composite layers don't work with a layout. Is there any other way to know that dvorak is active so setlayout(main) can be bound instead? Or should togglelayout() exist?

include layouts/dvorak

[ids]
*

[main]
# see https://github.com/rvaiya/keyd/issues/209#issuecomment-1121386837
rightcontrol = rightcontrol

[control]
rightcontrol = setlayout(dvorak)
leftcontrol = setlayout(dvorak)

[control+dvorak]
rightcontrol = setlayout(main)
leftcontrol = setlayout(main)

ddffnn avatar Aug 21 '24 06:08 ddffnn