@ieure @a wait, have I not been sufficiently insufferable about this on my account recently?
https://git.sr.ht/%7Etechnomancy/menelaus/tree/main/item/menelaus.scm
here it is; the most thoroughly-documented code I've ever written in my life, clocking in at 140 lines total
I use it for my daily drivers, but I don't use any features beyond basic layering (momentary and toggle)
it contains a rudimentary implementation of dual-role keys (tap vs hold) but there are a few timing bugs still to work out with that where I couldn't be bothered because I realized I didn't actually want to use that feature myself
but like; 140 lines, you could add your own implementation from scratch without much trouble
layouts look like this: https://git.sr.ht/~technomancy/menelaus/tree/main/item/keyboardio-dvorak.scm