Ramblings of an aging IT geek
← Ramblings of an aging IT geek
hardware

soldering 67 switches and flashing my own layout

Building a 65% mechanical keyboard from a kit, the soldering mistakes I made, and writing a QMK layout with layers that I actually use.

A soldering iron at work on a circuit board

I built a keyboard. A proper one, from a kit: a PCB, a stack of switches, a plate, a case, and a bag of diodes and stabilisers that I poured out onto the desk and immediately regretted. Sixty-seven switches, every one of them needing two solder joints, and a firmware I'd write myself so the thing actually does what I want. This is the long version, because the short version is just "it works now and I'm pleased," and that undersells how much swearing got me there.

the kit

It's a 65% board. That means the alphas, a number row, arrow keys squeezed into the bottom right, and not much else. No function row, no nav cluster, no numpad. The bet is that everything you've lost lives one layer down, under a key you hold like a shift. I'd been curious about that bet for ages.

The bill of materials was modest: a hot-swap-less PCB (I wanted to solder, partly for the experience and partly because I'm stubborn), tactile switches, a steel plate, screw-in stabilisers for the longer keys, and a microcontroller already on the board. The diodes were pre-decided by the matrix design, which I was grateful for, because choosing diodes is not a rabbit hole I needed at eleven at night.

soldering, and the mistakes therein

I've soldered before, but never two hundred-odd joints in one sitting. A few things I learned, mostly the hard way:

  • Seat every switch flush against the plate before you solder a single one. I didn't, on the first row, and ended up with two keys sitting proud at a jaunty angle. Desoldering a switch through a plate is miserable. Do it once, learn, move on.
  • The stabilisers go in first. Obvious in hindsight. I had to remove a switch to fit a stab I'd forgotten about under the spacebar.
  • A joint should look like a tiny shiny volcano, not a grey blob. The grey blobs are cold joints, and cold joints are the keys that work today and stop working next Tuesday for no reason you'll be able to find.

A close-up of a populated circuit board

I got into a rhythm eventually: switch in, flip the board, tack one leg, check it's flush, do the other leg, move on. About forty minutes for the lot once I'd stopped fighting it. Then the moment of truth, which for a soldered board is closing your eyes and plugging it in and hoping nothing's shorted.

testing before trusting

Before flashing anything clever, I tested the matrix the lazy way: plug it in, open a key tester in the browser, and short each switch position with tweezers to see if a key registers. Two didn't. Both were cold joints, exactly the grey blobs I'd been warned about. Reflowed them, retested, all sixty-seven responding. This step is worth its weight in gold. Finding a dead joint now is a thirty-second fix. Finding it after you've cased the board up is an evening.

A macro shot of circuit traces

the firmware is the actual point

Here's the part I'd been looking forward to. The board runs QMK, which means the layout isn't fixed in hardware. It's code you compile and flash. You describe the physical matrix once, then define layers, and each layer is just a grid of keycodes.

The base layer is ordinary. The interesting bit is the function layer, reached by holding a key where caps lock used to live. With that held, the number row becomes F1 through F12, and the right hand grows a nav cluster on the home keys:

[_FN] = LAYOUT_65(
    KC_GRV,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,
    KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, KC_DEL,
    _______, _______, KC_UP,   _______, _______, _______, _______, _______,
    _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______,
    _______, _______, _______,          _______, _______, _______, _______
),

The trick that sold me on the whole format is the dual-role key. The key under my left little finger is escape when tapped and the function-layer shift when held. One key, two jobs, decided by how long you press it. After a week of muscle confusion it became completely natural, and now reaching for a separate function row on my work keyboard feels like reaching for a gear stick that isn't there.

Flashing is a single command and a tap on the reset button:

make my_keyboard:default:flash

Change a keycode, rebuild, flash, and the change is live in about ten seconds. That feedback loop is genuinely delightful. The keyboard stopped being a finished object and became a thing I tweak, the way I tweak my shell config.

was it worth it

A decent pre-built board would have been cheaper once you count the failed-joint reworks and the desk lamp I bought purely to see what I was doing. But I'd have learned nothing, and I'd be typing on someone else's idea of where the keys should go. Now the layout is mine, the firmware is mine, and when a switch eventually dies I know exactly how to replace it. The keys feel good under the fingers, the layers fit my hands, and every now and then I remember I soldered the thing myself and grin a bit. That's worth an evening of grey blobs.