Most keys on most keyboards are labelled in some way. Usually, these labels (“legends”) are just printed on top of the keycap, the bit of the key you actually touch. But because you’re actually touching it, the legend wears off over time. As you move into fancier keyboards, there are various ways to remedy this. The most indestructible are double-shot keycaps, where the legend is actually a separate piece of plastic that goes through the main keycap like the letters in a stick of Blackpool rock. This can let your tasteful RGB lighting shine through, but more importantly means the legend will never wear out.
Producing intricately-enmeshed plastic shapes is an area where 3D printing in general, and multi-material 3D printing in particular, stand out, so since getting my printer I’ve been itching to try and make some keycaps of my own. It also offered a perfect opportunity to try out my new 0.2mm hotend (the default is 0.4mm).
Rather than trying a full set straight off the bat, I decided to go for something more modest. I occasionally use my first mini-keyboard as a macropad, but recently realised that the otherwise-unused outer rows of my Corne would do just as well. Updating the firmware was straightforward, so I just needed half a dozen keycaps with custom symbols.
OpenSCAD coupled with colorscad seemed like the tools for the job, and the comprehensive KeyV2 project on GitHub provided a flexible way to create keycaps in a wide variety of profiles. Importantly, this includes the DSA profile that I was already using, so I started with that.
It was easy enough to add an embedded shape in a contrasting colour, but when I printed it I ran into an in-retrospect-obvious issue; the dish at the top of the key produces some very obvious layer artefacts when sliced:
These kind of artefacts are unavoidable in FDM printing when making a surface at a shallow angle to the plane of the layers. You can sometimes minimise the impact by positioning your model at an angle, but that often introduces other problems — for example, here the sides of the keys aren’t flat, so I’d need to add support. A more general approach is post-processing the print. I had a go at sanding my test prints down, but while this produced a decent feeling keycap, I couldn’t get a visual finish I was happy with. At this point I could have moved on to more advanced finishing techniques like vapour smoothing, but I decided to think laterally.
I decided to forgo the dish, and make the top of the key flat. The keycaps could then be printed face down, which not only solves the layer artefacts, but picks up a nice texture from the build plate. Moreover, as the legend only needs to go through the top surface rather than the entire height of the key, only the first few layers contain multiple colours. This significantly reduces both time and waste.
With this approach in mind, I started putting together the symbols. Looking at my first double-shot design, a thought occurred to me: why stop at two? Putting together three or more different colours would be tricky using conventional production techniques, but not for 3D printing. With nothing stopping me, I went ahead with a red-and-white colour scheme on black keys, and I’m pretty pleased with the result:

The keycaps look great straight from the printer, and have a nice feel thanks to the texture. The lack of a dish might make them less comfortable for regular typing (or perhaps not — most modern, mass produced keyboards have flat keys and get away with it), but these are function keys and so it’s not an issue.
The OpenSCAD source file is here: CorneExtras.scad. I’ll not hold it out as an example of good style; in particular, there’s more boilerplate and repetition than I’d like. I’m not sure if this is due to my own lack of experience with the language, or its limitations. Regardless, it should hopefully serve as a useful starting point if you want to have a go at making something similar yourself.
