This is a keycap generator capable of generating .stl files for printing keycaps with different colored labels.
Gallery
Usage
Fill in the labels you want for the keycap and hit the big Generate STL
button. You may have to be patient since it would take a while. It is recommended to try generating one single keycap before you proceed with more. Each row represents a keycap with five text input box corresponding to different positions on the keycap.
The color settings on top allow you to set colors for labels based on position. Labels of different color will be generated as separate .stl files. The sliders control text size. Altough I would recommend keeping them as is.
Drag and drop to reorder the rows.
Note: the color you selected here has no effect on the actual color you get when you print. The actual color from printing is solely determined by the color of your filament.
Unicode
The generation tool supports unicode input. E.g. \u2665
for the heart symbol. The unicode symbols you can have is limited by the font though. And in this case the online tool is limited by the Liberation Mono
font. However you can load different fonts with better unicode support if you choose to run the script locally. See Running Locally section below.
Slicing & Printing
Procedure
It is best to generate .gcode files for all parts of the keycap model before you start printing. First you would print all the keycap-label
models, order does not matter. And then you print the keycap-body.stl
on top of the labels directly to get a multi-color keycap.
Once a label finishes printing you want to be quick when changing filament, otherwise the bed can cool down enough for the models to detach from the bed. You can set a slightly higher bed tempreture (75 C works well for me), and then start “Preheating” the printer as soon as it finishes printing a label model.
Alignment (Important)
When you import the stl models into cura, it may shift your models away from the origin. Make sure you set the model position to x = 0, y = 0 and reset the rotation. This will ensure all the models are aligned properlly.
Slicer Settings
Make sure your Initial Layer Height
is set to 0.2mm. You may also want to use a slightly smaller Initial Layer Line Width
(e.g. 0.3mm for a 0.4mm nozzle) to retain more details on the surface.
It is recommended to test print one keycap and try it on your switch, to make sure you have the clearance dialed in. If the keycap is too tight or too loose, you can fine tune the tolerance by adjusting the Horizonal Hole Expansion
setting in your slicer in small increments like 0.1 or 0.05 util you get a good fit.
Running Locally
Alternatively, you can download the .scad script here, and run it locally. This will give you access to more parameters for customization.
First, download OpenSCAD from the official website and install it.
Then, open the .scad file with OpenSCAD, and read the script to find where it says:
labels = [\
["J", "1", "[", "(", ""],\
["K", "2", "]", ")", ""],\
["", "", "", "", "\u2665"],\
];
This is the 2D array that specifies the labels on the keycap. Each line represents one keycap. There are five strings for each keycap and they correspond to top left, top right, bottom left, bottom right and center respectively. Modify these lines or add more based on your need.
You may also experiment with other parameters to get the effects you want. Here is a list of parameters in no particular order that may be of interest:
keycap_height
Height of the keycap in mm.roundness_top
Roundness factor of top surface. Recommend values between 1 and 32.roundness_bot
Roundness factor of bottom.size_top
Size of the top in mm.size_bot
Size of bottom in mm.stem_width
Width(long side) of the stem in mm.stem_thick
Thickness of the stem in mm.label_bound_box
How much labels are away from the center in mm. If you want to squeeze all the labels onto a smaller top surface you will need to decrease this value.
Troubleshooting
Scratchy key press
If the keypress doesn’t feel smooth, it is likely due to the z-seam artifact on the stem, especially on the wide face of the stem. Tune your slicer settings to reduce z-seam. Or scrape off the z-seam with a sharp tool. A small sharp chisel works best. If you are running it locally, you may also try decreasing the stem_thick
parameter.
The label shows up on the stl but not on gcode preview
Make sure the Initial Layer Height
in your slicer setting is no more than .2mm.