keyd
keyd copied to clipboard
Use both control keys to swap layout
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)