This is really well documented with lovely schematics, and the link in the github to the proper "korg style" toggle switches [1] on AliExpress is worth the read.
The code [2] is very nice as well, showing how clean a bare metal Pi Pico project can be.