Skip to content
Be Useful.

A keyboard that plays Wagner, built from a stack of PCBs

A mechanical keyboard that bleeps a chiptune "Ride of the Valkyries" whenever you power it on. Let's go!

You can buy a perfectly adequate keyboard for twenty quid or less. Prefabricated. Functional. Solid.

I'm typing this post on a mechanical keyboard I assembled from a flatpack of PCBs and acrylic, put together with a Torx key and a soldering iron over the course of an afternoon. It plays a few bars of Wagner every time I switch it on.

The board is called 0xCB New Horizons, a DIY keyboard kit from KeebSupply, a small outfit in Germany who offer a dazzling variety of keyboards, macro-pads and assorted paraphernalia.

This isn't my first mechanical keyboard. It's not even my fifth. But this particular project is worth documenting for the unconventional design. That, plus the AI-assisted troubleshooting that helped me realise a small but critical feature.

Mechanical keyboards, briefly

A mechanical keyboard, if you haven't used one, is a board where every key sits on its own sprung switch, a small discrete mechanism that clicks or bumps or glides as you press it. Typing on one is light years more responsive than the single sheet of flimsy rubber that sits under the keys of a cheap office board.

The appeal of building a keyboard by hand is you can tailor every aspect of the board to your specific preference. You like it loud and clacky with an RGB light-show every time you slap the space bar? No problem. Or maybe you want it sleek and silent for long gaming sessions? All is possible.

What's unusual about New Horizons is that it's naked. A normal keyboard hides its componentry inside a case of aluminium or moulded plastic, the way a laptop hides its insides. This one has no case. The base, the switch plate and the circuit board itself are all cut from the same sheet of fibreglass that every PCB is made from (a material the trade calls FR4). The three are stacked atop each other like a sandwich.

It's unusual, most obviously because the lack of a case affects the sound signature as you type. But there's also an infinite amount of customisation on offer in terms of the layout.

We'll get into all of that shortly, but first let's take a moment to admire the underside of the middle PCB: a beautiful silkscreen print of a satellite looping around a planet. New Horizons, indeed.

A lovely silkscreen print hidden away on the underside of the New Horizons PCB; once you've assembled the kit you'll never see it again.

The parts that aren't in the box

A kit like this is deliberately unfinished. You get the boards, the screws, some chips of acrylic for the typing angle, and that's it. For everything else, you need to bring your own parts and make a series of decisions.

The layout is what the hobby calls 65 percent. That means a compact board with no number pad and no row of function keys along the top, though the arrow keys stay. I built it in the ANSI arrangement, the American one with a long straight Enter key, rather than the taller L-shaped Enter of the British and European ISO layout.

Three essential components, selected according to taste:

  1. The switches are the sprung mechanisms under each key. Mine are a tactile variety which give a firm bump halfway down, so your finger knows the letter has landed before the key hits the bottom.

  2. The keycaps are double-shot PBT, which is a hard-wearing plastic that stays matte instead of going shiny, with each letter moulded in as a second piece of plastic rather than printed on top, so it never wears off. They're Cherry profile, too, which is a popular ergonomic shape given to keycaps in each row.

  3. The stabilisers sit under the long keys like the space bar and shift, and stop them see-sawing when you catch them off-centre. I used Cherry clip-on stabs just because I had a spare set kicking around.

I also bought a bunch of other bits and pieces because this seemed like a good opportunity to experiment. I wanted to add a rotary encoder knob to the board, since that seems like a fashionable accessory nowadays, and also a piezo speaker to the underside of the PCB. More on that below.

Flashing and soldering the board

Next, the electronics. The brain is a small controller carrying a chip called an RP2040, the same one inside a Raspberry Pi Pico, the cheap little board that turns up in classrooms and hobby projects. It reads which keys go down and tells the computer.

Ah, but we're getting ahead of ourselves. None of those keys will do anything until you program them to. That job falls to a piece of open-source software called QMK, the firmware that runs on the controller and decides which letter each key sends.

You lay out your keymap, compile it into a single file, and flash it onto the board, all of which is far less daunting than it sounds. You hold a button while plugging in the USB. The keyboard appears on your computer as an ordinary drive, you drag the file across, and it reboots ready. The chip is virtually unbrickable too, so a bad flash is a 30-second fix rather than a dead keyboard.

I had the option of soldering the microcontroller flat to the board for good, but instead I sat it on MillMax pins, tiny machined sockets, so it can be pulled and swapped later without an iron. Down the line, for example, I could drop in a microcontroller that's Bluetooth enabled and has a mini-battery pack, so there's scope to use the keeb wirelessly.

Then there are the switches. Every switch has two legs to solder, and with 60-plus keys that amounts to well over a hundred joints, done one at a time with a warm iron and a podcast playing in the background. These got MillMax pins as well, in case I ever get bored of tactile switches (I won't) and want to change things up with linear or clicky switches.

The PCB comes presoldered with eight small LEDs on the underside that throw coloured light onto the desk; these can be deployed either for decoration or for notification, e.g. when caps lock is activated. Finally, I fitted the rotary knob for volume control. Is it pointless? Yes. Would I do it again? Also yes.

Behold, the New Horizons DIY keyboard, fully assembled by yours truly.

Teaching it to sing

Now the fun part. Near one corner of the PCB sits a blank space for a piezo speaker, a square of plastic the width of a coat button. Inside is a wafer of ceramic that flexes when you put a voltage across it. I soldered one on because it occurred to me that a keyboard that can make a sound can also be taught a tune. This was also the first real problem I ever worked out with an AI assistant at my elbow, back when that was novel.

It didn't go smoothly. I asked it to play a jingle from an old video game and got only silence, because that tune had been deleted from the keyboard's software on purpose. The people who maintain it had pulled the recognisable melodies out of the code, the ones still under copyright, and left blank gaps where they sat rather than shoulder the risk.

Another problem was that the ordinary way of making a sound refused to compile at all, because the software was written for a different family of chips and the Raspberry Pi in my board wasn't on the list. The fix was buried in another maker's published settings, one line that holds the sound back until the board has finished waking up, and it made the whole difference between miserable frustration and dulcet melodies.

With the well-known tunes gone from the code, I reached for something that nobody could complain about, and entered a few bars of Ride of the Valkyries. Wagner wrote it in the 1850s and this epic work is very much in the public domain. Now the board announces itself with a full-throated slice of German opera every time it wakes.

Sheet music written out for a teeny tiny piezo speaker. Ride of the Valkyries has never sounded more glorious or majestic.

New Horizons, complete

So now, reflecting on the completed project, I'm left with a question. Why bother? Because it's fun to craft an object that you can customise the whole way down, from every switch and click to the glow underneath and the daft tune it plays. All this and a rotary knob, too.

If any of that appeals, you can start much simpler than a bare slab of fibreglass. There are loads of kits out there that skip the soldering part, where you bring your own switches and keycaps, and you can have a keyboard that is definitively you in 30 minutes or less.

And of course, a mechanical keyboard doesn't need to play Wagner. But it truly sounds glorious when it does.

The Valkyries
gouache illustration, an ordinary office desk in calm daylight with a mechanical keyboard large and prominent in the foreground, everything on the desk still and undisturbed, and behind it the back wall bursting apart as three valkyries come crashing through the brickwork riding their pegasi, armoured warrior women in classic winged helmets with spears raised, each distinct in armour and fair braided hair, flying bricks dust and splintered plaster, shafts of crimson and gold storm light pouring through the breach, wide composition, heroic and cinematic, dramatic contrast between the quiet desk and the violent eruption

Read next

Not on the list: Turned away at the door for using AI

It shouldn't have come as a surprise. There's corners of the internet where AI-assisted work isn't welcome; it's important to respect their wishes.

How to boot straight into PICO-8 on a Raspberry Pi

A single-purpose fantasy console, built from a headless Pi and about 30 minutes of patience. Power on, get PICO-8. No RetroPie, no desktop, no menu.