Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!
Parametric Cherry MX/Alps Keycap for Mechanical Keyboards
by rsheldiii, published
Tags
License
Use This Project
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.
Print Thing TagMakes
View MoreThing Statistics
Summary
I got halfway through making a parametric novelty keycap base before I realized there are decidedly few basic keycaps on the thingiverse website, so I took a detour to make a good one. This library has slowly grown to where you can generate keycaps in four different layouts in any length or height you desire! They are not quite drop-in replacements into existing keysets yet, but work great as a set, escape key, WASD cluster, top row, or as a base for an artisan.
Heavily modified from Kekstee's original Skull keycap to refactor, remove dxf files, add a dish, parameterize, and add a square keyswitch connector: https://github.com/kekstee/3dprint
Makerbot's customizer is great, but it's hard to zoom in and a little sluggish with spherical dishes, so you might be better served booting up OpenSCAD. Also, using OpenSCAD opens up a whole new level of customization! Due to the complexity of the key profiles things like dish depth, top skew, etc. can only be controlled from inside OpenSCAD. There are a lot of comments as to what things do so don't be afraid to dig around!
Update 9/4/2016, all features to date:
- Many imitation key profiles supported! DCS, SA, DSA, and G20 for now. No OEM until I can find a good data sheet :(
- Square Cherry key connector stem; easier to print, more robust than a circular one. I will make a circular one in the future.
- Stem inset now supported! allows you to print keys that will sit lower on the keyboard than before. you'll need to print with some kind of support
- Multiple dish types that affect the top and bottom, so keytop thickness is uniform throughout. Dishes are correctly created using a bit of trig, so they expand to arbitrary sized keycaps. Inverted dish types for spacebar / funky keyboards supported! inverted dish and extra long keycaps recently fixed!
- Keycaps can be arbitrarily wide or tall! note that for extra large keycaps you might need to turn up rounding on the dishes
- Stabilizer supports! Not currently supported on tall keycaps (numpad enter and plus for instance)
Experimental features:
- Experimental ALPS compatibility!
- Experimental rounded keycaps! Requires SCAD knowledge; replace key() with minkowski_key(). Will take FOREVER for anything with a dish due to polygons. G20 does not have a dish. results are pretty, but if you don't have a really good 3d printer you can safely skip.
- Experimental ISO enter in the works. technically it is there, but it is the wrong size. you need to switch any use of shape_hull() for ISOEnterShapeHull(). I don't own any keyboards with it either so I have no idea if it actually fits or if it needs stabilizer holes (I assume so?) I just have keys I'm comparing it to from a grab bag.
Upcoming additions:
- Stem inset supports; promoting stem inset to all keycap profiles that need it
- Vertical stabilizers.
- full experimental ISO enter
- Keyswitch clearance subtraction (to make sure the keycap won't smack into the switch)
- Circular keystem
- inset and outset text on keys
Instructions
I have tested this at .2 and .1mm layer heights with no support and it seems to print just fine, with a bit of warping on the bottom of the keytop for the first layer of bridging or so. At .1mm I increased infill to 90%, otherwise Slic3r seemed to float layers on top of nothing; at .2mm 20% infill worked great. Sometimes the stem comes undone for me during the print, mostly at low layer resolutions and more often with ABS. Make use of the brim if you find that happening to you as well, which can be customized. Also make use of the brim if you are having a hard time landing the first layer of the keystem.
You might have problems with stem fitment if you overextrude - you can either change your extrusion parameters or look into futzing with horizontal_cross_width, vertical_cross_width, extra_outer_cross_width, and extra_outer_cross_height. It is by far the tightest part of the print, and the one closest to operating tolerances in order to give as much material as possible to the stem.
Also, different slicers handle the stem differently; I found that Slic3r printed the pieces in one contiguous spiral, which minimized retraction problems, but Simplify3d does not. YMMV.
In order to print different versions of the keycaps, change the key_profile variable. If you wish to print Alps-compatible keycaps, make sure the stem_profile is set to 1. I haven't tested all of the Alps ones so make sure the stem is in a good position before you print off 30 of them!
Comments welcome!
File Name
Downloads
Size
All Apps
Upgrade this Thing with Thingiverse Apps
CustomizationEdit, personalize, or revise this Thing
Tools and UtilitiesRepair, slice, or enhance this Thing
Customizer is the easiest way to take great 3D printable designs and make them your own. Make your OpenSCAD designs infinitely more valuable by empowering the community to customize them.
App Info Launch App
Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...
App Info Launch App
Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...
App Info Launch App
With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.
App Info Launch App
Hi, thanks so much for this. I'm using it to get a full set of DSA caps for my ergodox.
I've made a few changes to the script here: https://github.com/kobeyu/keyscad/commits/master
I'll add a remix once I've got my keys printed out and working (19/76 so far)
Do you have any plan to add support for (original) Cherry Profile? It should be rather similar to DCS. Thanks for incredible work.
hey there! it's not 100% on the docket, but in the coming month I should be receiving a very cheap 3d scanner. if that has the fidelity to capture keycaps in enough detail I will chuck up an OEM keyset and I can do cherry right after
Hello, first of all: thanks for that!
But now i have a question: is it possible to create a double height key? Special the EU-Enter key?
see: https://upload.wikimedia.org/wikipedia/commons/a/a5/Enter.png
Greetings
Max
my initial thought with the enter key in the numpad position was that you could just rotate a 2u key, but they do not have the proper angle for the dish. someone submitted some code a while ago to fix this, let me see if I can't do another update soon.
as for the ISO enter key, it's a bit more difficult. the keycaps aren't centered (the origin point is on the bottom left of the model) and are generated from simple convex shapes. I made a test version but it didn't have rounded edges and the top could not be scaled correctly. I know its something a lot of people want so I'll look into it again, but I'm not sure if its going to happen any time soon
Hey I found some problems in your code. Check out my Made page
should both be fixed. I'm not sure how the keytop thickness was working before, but it works now and I parameterized it out so you can change it if need be
thanks for this! sorry about the length one, I really should have caught that by now. I'm gonna look into these and hopefully have some changes up soon
Are there any plans to include the G20 profile in the future? I would assume the the CAD would be highly simplified due to the flat top surface.
hey, I implemented a faux G20 layout in this recent update, with a generated STL. it's pretty close, not sure if it's a drop in replacement though. let me know what you think
Thanks a bunch! I don't have my own g20 keycaps, so this should allow the completion of my custom keyboard.
I can look into the G20. Looks like they don't have a data sheet on it, so I'll have to dig out my grab bag to do some measurements. it'll require a bit of rejiggering to get the rounding effect on the outside of the keycap, since it needs a minkowski somewhere, but that was something I kind of wanted to look into anyways
Hey i was just wondering what the measurements on that little cross in the center is.
the cross in the center is 4.4mm long and 5.5mm tall. The horizontal cross is 1.4mm thick and the vertical cross is 1.3mm thick. the cross is 4mm deep. hope that helps!
This is great! I got an Infinity Ergodox kit in a group buy and it should be arriving in a week or so, but I just realized I'm flat broke and don't have any keycaps to put on it, lol! You saved me. :D
@deltapenguin
I found that if you add valign="center" and halign="center" to the text function, you almost never have to readjust the text between letters once you've got it placed. (Especially if you're trying to place it in the center of the keycap, because you change to a different letter and now it's off again!)
Thanks for the codes. It's a great tool. I printed Colemak keycaps last night using your codes.
module generate_keycap(font_name, font_size, key_row, letter, h, x, y, z, l_a)
{
difference()
{
key(key_profiles[key_row]);
translate([x, y, z]) rotate([l_a, 0, 0])
{
#linear_extrude(height = h, center = true, convexity = 10, twist = 0)
text(letter, size=font_size, font=font_name);
}
}
}
// ']'
translate([0, 0, 0])
generate_keycap("Courier", 8, 4, "]", 3.5, -4.5, 1, 6, -10);
// translate([20*0, 0, 0])
// generate_keycap("Courier", 8, 3, "R", 3, -4.5, 1, 5);
nice work, the text came out looking really nice! I hadn't thought of using an inset, it gives a very clean look. would you be ok with me incorporating this into the library eventually?
Of coure.
Adding few helper functions into your code will make it killer application.
Do you have the scad or the dimensions of all the different rows so that I can use your scad file to customize different rows?
you mean like the width of the keys? you can find those in a few different places, but this website has a bunch of layouts in the 'preset' section: http://www.keyboard-layout-editor.com/#/ If you mean the sculpted profiles themselves they are in order in the scad, but they should follow the naming convention for the keycaps they are emulating. here's a spec sheet for one of those: http://www.keycapsdirect.com/pdfs/DCSFamily.pdf
What changes would I have to make to modify this to fit a Dell sk-8115 rubber dome keyboard?
I don't have one of those boards with me, so this is conjecture, but at a minimum you'll have to make a new keystem, as most rubber domes don't use the iconic Cherry cross. If you're looking to replace longer keys you might also need to design a new stabilizer connection, as that will also be different. I would look into gutting the cherry_stem() function and focusing only on that, until the key fits correctly onto the keyboard. Best of luck!
Thanks for this, it's great! Is there any way to make a keycap with an offset stem? Like for caps-lock?
not in the customizer currently but if you know the offset you can translate the stem in the SCAD file. I'll look into it, I bought a grab bag a while ago so I'm sure I have a caps lock key to compare to, but I won't be able to test it
I made some quick modifications to "cherry_stem()" and "alps_stem()" and added a parameter "stem_offset" for entering the offset in U.
http://hastebin.com/susuqifuyu.coffee
I have only tested making MX-Capslock with it, no testing of alps.
I'm glad you figured it out, looks like it came out great! so is the actual offset .125 units? I notice you divided by 2 in the code you pasted. I'd love to integrate this into the version here if that's cool with you. if we chuck a union around the if statements that choose what stem gets used we can use it for all types, hopefully
That might be correct, I currently don't have the time to look into it. I might do it in a couple of days/weeks. If you want to integrate anything I wrote, feel free to do so :)
The offset should be 0,25 U, which is 4,7625 mm. Source: https://deskthority.net/keyboards-f2/stepped-caps-lock-measurements-t5854.html
:)
EDIT: I have been looking into SCAD and I can probably manage modifying it myself, thanks!
Does anybody know which row-numbering standard is being used for these?
I'm assuming;
Function keys=DCS Row 5
Number row=DCS Row 1
QWERT=DCS Row 2
ASDF= DCS Row 3
ZXCV=DCS Row 4
Ctrl Alt Spacebar= DCS Row 4 also.
Any help would be appreciated.
hey there! the DCS profile keycaps should be quite similar to the actual DCS family made by SP: http://www.keycapsdirect.com/pdfs/DCSFamily.pdf so yes, you got it exactly right. remember to switch the dish type when printing the spacebar. Let me know if you need any more info!
(im new here this is the first thing i ever post/do)
Looks really nice, only thing im missing is if you'd add a iso enter to the thing files folder.
ISO enter is difficult because it's the only key that isn't just a fancy trapezoidal prism. I've been trying to think of a good way to do it for a while now. If you modified the roundedRect function to instead do a hull around the points of an ISO enter key, you could generate one, but it would be purpose-built for just that shape. I don't have an ISO enter handy, I'll see if my old crap bag has one.
any news on that? i could print a whole keycap set then, so pleeeaaaase :)
I'm looking into this. When I printed any with a circular keystem they always broke almost immediately but there's been some interest
Trying to compile the openscad file gives:
Parser error in line 456: syntax error
ERROR: Compilation failed!
Can you point me towards a fix?
Turns out I was running an old version of the file. But changing the key length to 1.5 or 2 completely removes the cross and
adds a rectangular stub. What else do I need to change?
Glad you got it working! Looks like the stem is a bug. I added Alps support recently and left the alps adapter on by default. you can change that by setting stem_profile on line 256 to 0, but I'll reupload with the Cherry stem adapter as default, since the Alps stuff is still experimental
If anyone needs cherry mx black keyswtches (2 wire and 4 wire versions) message me. I'm in USA. Happy building
I don't have an autodesk license so I can't provide any ipt files, but the SCAD file you see in the files section might be what you're looking for. You can also boot up the script in the customizer to change a few small things
Could there be one added to this that had a convex top (these all seem to have concave) and that after a certain width it would put things in that would allow for the stabilizer things so the finished product would be stable for use as a space bar please? I'm designing my own keyboard complete with custom keycaps (billy mays key, etc) and would love to be able to make all the caps from this tool.
Hey, can you make a design without the piece in the middle, and with a lid?
what do you mean by a lid? like the top comes off? I can upload an STL without the stem later today, you just gotta comment out line 371 in the SCAD and recompile whatever key you want
hey rsheldiii, hey, that would be awesome if you could make a lid so i could seal the bottom of key :) and is it possible to make the walls as thin as possible, because i am going to print it 6 cm wide
Alright I'm going to try this out and customize/remix if it works. The + is the most important thing, and I've bought a keycap that was too wide in this aspect...it flew off the keyboard way too easily and I think the cat ended up stashing it somewhere, so I was thinking of shrinking just a tad and perhaps a shallow fillet or other modification at the lip. I noticed the + is open on 2 ends, was that to allow wiggle room?
Overall, I don't expect it to work the first or 5th try, but sounds like a nice project. Thanks for a place to start, let me know any advice. I'll do .1mm and 100% unless you think it's unnecessary.
Hi there! You're right, the cross is definitely the most important part, and the hardest to print. I found that changing the cross to two pieces resulted in a stronger finished part - slic3r drew the pieces continuously instead of laying down an outline and then drawing in four super small squares. Also it allows you to make the cross slightly smaller in that dimension so it squeezes the switch stem and stays on a bit tighter.
I parameterized that value if you want to change it though, look for extra_vertical_cross_length. I also made a thing for adding a brim around the cross only - if you're getting problems with the cross breaking off the bed during the print definitely play around with that.
As far as the settings go, I use .1mm because it looks the nicest; if you're having problems with that definitely step it up to .2mm to dial things in and then go back to .1mm. The keycaps will still work just fine, but they wont be as nice looking on the tops. I would probably leave it at 100% infill if you can, the top would be fine at a smaller infill but the sides need all the material they can get.
Best of luck and let me know how it goes!
Thanks, it's interesting that splitting the stem makes it stronger/more-accurate, I need to watch the movement of the extruder more carefully for the mechanical pieces I'm planning. For the first try I'll leave everything as original with .1 and 100% infill, no reason to be impatient and skimp filament on something so small! My goal is a custom keyset in Morse-code, here's my first design ('A' based off of your .stl): http://i.imgur.com/PFLrMGH.jpg . I've fixed the fact that the Morse-code is positioned vertically since the screenshot (oops!) :).
That looks awesome! definitely post a make if you can, I'd love to see how it comes out
In theory, would it be possible to make a doubleshot keycap on a 3D printer if you have the two layers of the keycap as two different files? It would mean that for a large keyboard it would require essentially two keycap sets in a way, and then glue them together with gorilla glue or something, but I wonder if it would be possible.
it's definitely possible, though it would require a highly tuned machine and the keycap would be a little bulkier. You could definitely do a shell with the label extruded and then a slightly bigger shell with the label excised, but you might also be able to get away with a stem that gives way to a graduated cone that supports the label, that you glue into the bottom of the actual keycap in the same way. It's definitely an interesting idea! I might look into it after I'm happy with this library, but If you feel up for it please use any code you want from mine to help you!
Okay, so would it maybe be easier to just print out the characters and make holes for them in the caps? I'm a huge fan of technical theorizing and have no way to actually do this. I'm just spit-balling here.

Please Login to Comment