Modern keyboards are really smart. I don’t know what was in the keyboards of yesteryear, but todays keyboards are arguably computers in-and-of-themselves. As such, they need software to run. And the open-source community has run.
Modern custom keyboards have a lot of choice when it comes to the code that makes the key presses send the right data to the host computer. The target microcontroller in my setup is an RP2040. I need to accommodate 8 rows and 10 columns for the matrix, as well as 7 special keys that are not part of the matrix.
QMK
QMK is probably the most popular firmware for modern keyboards. It’s written in C, and compiled for a variety of controllers. In fact, it’s the firmware that Raspberry Pi used in the RP500. It’s well-tested, and there’s lots of info online about how to use it and plenty of examples. There are a couple of challenging stumbling blocks related to it though.
The reality though is that it took a lot to setup, and it’s challenging to configure for a one-off keyboard. The Fancy GUI configurator only works with keyboards in the repo. So I started looking around elsewhere.
KMK
KMK is a keyboard firmware that is written on top of CircuitPython. CircuitPython is itself a branch of MicroPython, which I have a little bit of experience with. The Pi Pico that I have wired up to the keyboard is already running CircuitPython. KMK doesn’t have quite the adoption that QMK has, but it seems like it is developed enough that it can do everything I want it to: The keyboard matrix, the special keys, some LEDs, and I think it’ll handle the trackpad too.
I successfully typed an ‘a’ character with my down arrow, and giggled maniacally to myself. After that I it was a bit rough because (as previously mentioned) this keyboard has both a matrix as well as dedicated IO keys (and two LEDs.) I downloaded and tried Pog, a GUI keyboard configurator. It got me a working keyboard, but couldn’t handle the meta keys and per the Author it doesn’t support multiple scanners.
It did help me understand the correlation between coord_mapping and the Keymap. So I was back to hand-crafted keyboard config.
AI Missteps
A quick aside to say that part of my development process was querying ChatGPT with questions about KMK and how to accomplish some things. While I’ve had some really good success with AI chat with a variety of topics, this one caused me some grief. It specifically told me that if I wanted the special keys, they could not go in the coord_mapping. This turns out to be wrong. You can put special IO in a second scanner, and put the special keys in your coord_mapping. It all works fine.
Working keyboard!
It may be a little hard to believe, but this sentence right here is written on this very keyboard! Easier to believe though is how much correction I had to do when I was typing because the mess of loose wiring is not a stable circuit.

Next up is replacing some (or all..?) of the GPIOs for the matrix with shift-registers or an IO-expander to free up some pins on the RP2040.