Keyboard switch plate and case generator for 3D printing
A switch plate for your keyboard or macropad
A switch plate is the thin plate that holds the switches of a keyboard. It keeps every switch in the right place and defines how the keys are arranged. With this generator you print one yourself, for a macropad, a numpad or half of a split keyboard. If you want the case too, it comes from the same layout: a one-piece case with the plate built in, or a top case and a bottom case for a three-part keyboard.
You pick a built-in layout or paste your own from keyboard-layout-editor.com, choose the switch type (MX, Choc V1 or Redragon) and adjust hole size, plate thickness, margin and corner radius. Cut-outs for stabilizers on keys of 2u and more are added automatically. Ready-made designs are in the example gallery, for instance the numpad case or the 4 × 4 macropad plate.
How the generator works
Everything runs in your browser. Nothing is uploaded, and the model updates as you move a slider. “Share” copies a link that reopens exactly these settings.
From layout to file:
- Under “Layout” choose a built-in layout or “Custom (KLE raw data)”.
- Under “Part” choose what you want to print, and under “Switch type” the switches you build with.
- Set “Switch hole” and “Plate thickness”, and for cases the margin, height and corners.
- Download the model as STL or 3MF and print it.
The geometry comes from keyboard_lib, an OpenSCAD library by Alex Ives (MIT license). Cut-out dimensions, layout notation and the four parts come from there.
Choosing the layout
Built-in layouts
Ten layouts are built in, covering the most common projects:
| Layout | Keys | Notes |
|---|---|---|
| Numpad (17 keys) | 17 | stabilizers for 0, plus and Enter; two keys stand upright |
| Macropad 3 × 3 | 9 | the smallest macropad |
| Macropad 4 × 4 | 16 | the standard macropad grid |
| Navigation cluster with arrows | 10 | arrow keys in an inverted T |
| Directional pad | 9 | offset keys from keyboard_lib |
| Spacebar test pad (stabilizers) | 6 | 6.25u spacebar and a 2.25u key for testing |
| Gaming keypad (left hand) | 27 | keys up to 2.75u |
| Split keyboard half 4 × 6 | 24 | plain grid, no stagger |
| Split keyboard half, column stagger | 21 | staggered columns with thumb keys |
Examples open a layout with fitting settings, such as the test plate with a 6.25u spacebar, the gaming keypad or the column-stagger split half.
Your own layout from keyboard-layout-editor.com
On keyboard-layout-editor.com you build a layout by clicking: drag keys, set widths, rotate groups. Switch to its “Raw data” tab, copy the text and paste it into the generator. For that, choose “Custom (KLE raw data)” under “Layout”; the “Custom layout” field appears. When you switch to it, it starts with the layout you had before, so you can modify that one.
The generator reads key sizes, offsets and rotated clusters; legends and decorative keys are ignored. A key that is taller than wide is turned so its stabilizers sit along the long side. Keys under 0.5u are skipped, and more than 150 keys are not accepted: a notice tells you that only the first ones are used. The macro strip with a 2u key is a small example, with the layout ["F13","F14","F15",{w:2},"Enter"].
You can also write the layout in the keyboard_lib notation: each key is a field in square brackets, [] is a 1u key, [2] a 2u key, and [[],[],[2]] is a row of three keys, the last one twice as wide. Further entries per key are an offset in x and y and a rotation angle with its pivot. If the text cannot be read, the generator shows a 3 × 3 pad and says so.
Part and switch type
“Part” has four options:
- Switch plate: the plate alone. It holds the switches and sits in your own case or on a board. “Inner margin” sets how much border stays around the outer keys.
- One-piece case: plate and case in one print. This is the easiest choice for a macropad because you print only one part. It leaves room for the PCB and the keycaps.
- Top case: the upper frame of a three-part keyboard. The plate is a separate part that sits inside it; an “Inner margin” of 2–4 mm leaves a lip that holds the plate.
- Bottom case: the lower ring. “Bottom case for” sets whether it sits under a separate “Plate” or under the “One-piece case”.
The three parts of the three-part build are examples too: top case, plate and bottom case for a 4 × 4 macropad. They share the same margin, height and radius, so they fit together.
“Switch type” sets the distance from plate top to PCB top: MX 5.3 mm, Redragon 3.75 mm, Choc V1 2.2 mm. It decides how tall the case is down to the PCB and limits the plate thickness. For low-profile switches the 3 × 3 case for Choc V1 is a good start; for the directional pad with Redragon switches, see the Redragon example.
Setting the dimensions
All sliders at a glance, with range and default:
| Slider | Range | Default | Effect |
|---|---|---|---|
| Switch hole | 13.6–14.6 mm | 14 mm | square cut-out per switch |
| Plate thickness | 1.2–2.8 mm | 1.5 mm | thickness of the plate |
| Case margin | 2–20 mm | 5 mm | border of the case around the keys |
| Inner margin | 0–15 mm | 0 mm | how far the case opening reaches past the keys |
| Case height below the plate | 0–25 mm | 5 mm | room for PCB and wiring |
| Rim above the plate | 0–12 mm | 0 mm | how far the case rises above the plate |
| Corner radius | 0–20 mm | 3 mm | rounding of the outer corners |
| Clearance | 0–1.5 mm | 0.5 mm | gap between plate and case opening |
Which sliders you see depends on the part: the plain plate has no “Case margin” and no “Case height below the plate”.
Switch hole and plate thickness
14 mm is the standard size of the mounting hole. Holes usually print a little smaller than drawn. If you have to force the switches in, raise the hole to 14.05–14.1 mm, as in the 4 × 4 plate with 14.05 mm holes. Print a small test piece first.
A plate up to 1.5 mm thick gets cut-outs that go all the way through; MX and Choc switches clip in with their tabs there. A thicker plate gets a 15 mm pocket for the clips under its top 1.5 mm. The plate is never thicker than the switch type allows: up to 2.8 mm for MX and Redragon, 2.2 mm for Choc V1. A notice shows when the value was reduced.
Case: margin, height and corners
“Case margin” is the wall around the keys. “Case height below the plate” is the room under the plate for the PCB and wiring; for the bottom case it is the height of the ring. With “Rim above the plate” the case rises above the plate top and frames the keys like a tray.
“Inner margin” decides how far the case opening reaches past the keys. If it would make the walls thinner than 2 mm, the generator reduces it and tells you. “Corner radius” rounds only the outer corners; inner corners stay small so no switch hole is ever cut into. “Clearance” is the gap between a separate plate or the bottom ring and the case opening.
Stabilizers
Wide keys such as the spacebar, or the tall plus and Enter keys of a numpad, need a stabilizer to keep them level. For every key of 2u and more the generator cuts the openings for plate-mount stabilizers (the kind that clip into the plate from above), plus the relief for their clips. The two housings sit about 24 mm apart on keys from 2u up to just under 6u, and about 100 mm apart from 6u, so 2u, 2.25u and 2.75u keys work as well as a 6.25u spacebar.
On the test plate you get both sizes on a 118 × 37 mm plate that prints in 13 minutes. Try your stabilizers there before you print a large case. The cut-outs follow the common clip-in type; screw-in stabilizers have different dimensions and are not covered.
Printing
Orientation and supports
The generator puts every part in print position on the bed, so the STL needs no rotation:
- Plain plate up to 1.5 mm: top face up. All cut-outs go through, so there are no overhangs.
- Thicker plate, one-piece case, top case: top face down, because the pocket and the PCB room open from below.
- Bottom case: floor down.
Where a pocket reaches into a wall, the wall above it slopes back at 60° instead of a flat ledge. That is why everything prints without supports. The one exception is the one-piece case with a “Rim above the plate”: in print position the plate floats above the bed and needs supports under it. A notice points this out; set the rim to 0 or print a top case and a plate separately.
Settings
PLA is enough for plates and cases, and 0.2 mm layers work well. If your slicer leaves gaps in the thin plate, set the infill to 100 %. Check that the sliced plate is about 1.5 mm thick, and watch for elephant foot: it narrows the lowest layer of the holes and makes switches sit too tight.
Time and filament
The numbers come from a PrusaSlicer slice for a Prusa MINI, profile 0.20 mm SPEED, Prusament PLA, without auto-generated supports:
| Example | Size | Filament | Time |
|---|---|---|---|
| Numpad plate | 75 × 94 × 1.5 mm | 5.5 g | 20 min |
| Numpad case | 86 × 105 × 10 mm | 21.9 g | 58 min |
| 4 × 4 plate | 82 × 82 × 1.5 mm | 6.3 g | 21 min |
| 3 × 3 case (Choc) | 65 × 65 × 6 mm | 8.9 g | 26 min |
| Top case 4 × 4 | 88 × 88 × 14 mm | 15.5 g | 34 min |
| Bottom case 4 × 4 | 88 × 88 × 12 mm | 25.9 g | 45 min |
| Split half, column stagger | 136 × 85 × 1.5 mm | 12.9 g | 35 min |
Assembly
The plate, top case and bottom case have no screw bosses and no opening for a USB cable. Hold the parts together with glue, double-sided tape or holes you drill yourself, and cut the cable opening afterwards, for example with a file. The generator has no cut-outs for controllers or sockets.
Limits
- A part larger than 180 mm is still built, but with a warning. A full-size keyboard has to be split into halves.
- The PCB itself, its traces and the milling drawings of the original library are not part of the generator.
To go with it, the Keycap generator makes your own MX-compatible keycaps with legends, and the desk organizer gives the finished macropad a place.
Origin and license
This generator is a port of the OpenSCAD library keyboard_lib by Alex Ives (MIT license, © 2021). It supplies the build of the plate, case, top case and bottom case, the dimensions of the switch and stabilizer cut-outs and the layout notation. For the stabilizer dimensions the library itself points to an issue in the swill/kad project; only measurements were taken from there.
We rewrote the parts in TypeScript and adapted them for printing: clearance for the plate and the bottom ring, 60° slopes instead of overhangs, and a plate thickness that depends on the switch type. Not ported are the PCB milling drawings, the cut-outs for controllers, sockets and rotary encoders, and custom outlines. The port is checked against the OpenSCAD original with 10 test cases covering plates, cases, top cases and bottom cases, with at most 0.07 % difference in volume. The license text of keyboard_lib and the licenses of all other generators are on the licenses page.
MX, Choc and Redragon are named only to describe which switches fit; the generator is not affiliated with their makers.
Open the generator or browse the examples.
All parameters
The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.
| Parameter | Default | Range | Meaning |
|---|---|---|---|
| Layout and part | |||
| Switches | |||
| Switch hole | 14 mm | 13.6 – 14.6 mm | Square cut-out for each switch (14 mm is the standard). Printed holes often come out a little small: try 14.05–14.1 mm if switches are hard to push in. |
| Plate thickness | 1.5 mm | 1.2 – 2.8 mm | Thickness of the switch plate. MX and Choc switches clip into 1.5 mm; a thicker plate gets the 15 mm clip pocket under its top 1.5 mm. At most 2.8 mm (Choc V1: 2.2 mm). |
| Case | |||
| Case margin | 5 mm | 2 – 20 mm | Border of the case around the keys (one-piece case, top case, bottom case). |
| Inner margin | 0 mm | 0 – 15 mm | How far the case opening reaches past the keys. For a top case with a separate plate, 2–4 mm leave a lip that holds the plate; the plate and the bottom ring use the same value. |
| Case height below the plate | 5 mm | 0 – 25 mm | Room for the PCB and wiring under the plate; also the height of the bottom ring. |
| Rim above the plate | 0 mm | 0 – 12 mm | How far the case rises above the plate top. On the one-piece case a rim needs supports under the plate; the top case prints without. |
| Corner radius | 3 mm | 0 – 20 mm | Rounding of the outer corners. Inner corners are kept small enough that no switch hole is cut. |
| Clearance | 0.5 mm | 0 – 1.5 mm | Gap between the separate plate (or the bottom ring) and the case opening. |
Frequently asked questions
Do I need supports?
No. The generator puts every part in print position on the bed and replaces overhangs with 60° slopes. The one exception is the one-piece case with a rim above the plate, which needs supports under the plate; the generator warns you. To print without supports, make a top case and a plate separately.
Which switches fit the plate?
Switches with a square 14 mm mounting hole, so MX-compatible types, plus Choc V1 (low profile) and Redragon. “Switch type” sets how high the case sits above the PCB. With Choc V1 the plate can be at most 2.2 mm thick.
How do I get my own key layout into the generator?
Design it on keyboard-layout-editor.com, copy the text from the “Raw data” tab and paste it into the “Custom layout” field after choosing “Custom (KLE raw data)” under “Layout”. Key widths, offsets and rotated clusters carry over; the legends do not.
The switches are too tight or fall out. What should I change?
Printed holes often come out slightly small, so raise “Switch hole” to 14.05–14.1 mm if you have to force the switches in. If they fall out, check the plate thickness first: MX switches clip into 1.5 mm.
Will a full-size keyboard fit on my bed?
No, a full layout is far wider than 180 mm. The generator warns when a part is larger than a 180 mm bed. Print the keyboard as two halves instead, for example with the “Split keyboard half, column stagger” layout.
Is my layout uploaded anywhere?
No. The model is built entirely in your browser and nothing is uploaded. Your design lives in the link you copy with “Share”.
Origin & license
- keyboard_lib by Alex Ives · MIT · code ported – Ported: switch plate, case with plate, top case and bottom case with the switch and stabilizer cut-outs and the layout format; adapted: plate and bottom ring clearance, 60° slopes instead of overhangs.