Components / Mechanisms
Proven

Keystone jack slot

A panel slot that standard keystone jacks click into and stay in.

Keystone jacks (USB, HDMI, audio, Ethernet) are a cheap way to put real ports on a printed enclosure. A plain rectangular hole does not hold them: the jack needs a pocket for its spring clip and another for its fixed hook. This slot has both, plus a relief and a lead-in slope so the clip can rock into place.

Proven: Printed and fitted with the real hardware.Printed and fitted with real jacks on a synth enclosure, after a three-width test print: 15.1 mm wide fits, 14.8 and 15.4 did not. Reused unchanged on a laptop side panel and rear plate.
3D model: Keystone jack slotLoading 3D view
panel block

Make it

Choose the sizes and download the part. It is built when you ask, with the same code shown below. Nothing to install.

Use it in code

typescript
import { ready, keystone, geom, output } from "partkit";
await ready();

let panel = geom.box(-45, 45, -12, 18, 0, keystone.DEPTH);
for (const u of [-29, -9.7, 9.7, 29]) panel = panel.cut(keystone.cut(u, 0));

const stl = output.stl(panel);        // for the slicer
const step = output.step(panel);      // for Fusion 360

What you print

  • Nothing extra: the slot is cut into your own panel
  • keystone.coupon(): a one-slot test piece, about 15 minutes

Hardware

  • Standard keystone jacks
  • 60 mm of clear space behind the panel for a jack with a plug in its back

Functions

CallWhat it gives you
keystone.cut(u, v)Cutter for one slot centred at (u, v). Outside face at z = 0, wall 9.8 thick.
keystone.block(n, pitch)A ready block with n slots in a row, to glue behind a window in a thin wall.
keystone.coupon()The smallest block that still has every pocket.

Frame. The outside face of the wall is z = 0 and the wall goes to z = 9.8. The spring clip goes on the +v side. Jacks go in from inside: hook the -v edge, then rock the clip side in.

Sizes

Millimetres. These defaults are the sizes that were printed; other values are untested.

NameDefaultMeaning
W15.1Opening width
H16.41Opening height
DEPTH9.8Wall thickness the slot needs
CLIP7.2How far the clip pocket reaches past the opening
PITCH_MIN19.3Closest printed spacing in a row

Check before you print

  • Print the coupon with a new brand of jack before a panel depends on it
  • Keep at least 8.6 mm of solid above the opening for the clip pocket and 2.8 mm below for the hook pocket

Learned the hard way

  • Plain rectangular holes did not hold keystone jacks. Use a slot that is already proven for clip-in parts.

Open it in Fusion 360

The scene above as a STEP file: real solid bodies, each part its own named component, in position. In Fusion 360 use File, Open, then Open from my computer. It also opens in FreeCAD, SolidWorks and Onshape. It carries the shapes, not the sizes you can change; for different sizes, use Make it above or change them in code.

Source: ts/src/keystone.ts
typescript
/** Keystone jack slot. PROVEN: printed and fitted with real jacks (design after tomasf/Keystone, MIT).
 *  Frame: the outside face of the wall is z = 0 and the wall goes to z = DEPTH. u runs along the row (x), v across (y).
 *  The jack's spring clip goes on the +v side. Jacks go in from inside: hook the -v edge, then rock the clip side in. */
import { box, prismYZ, type Solid } from "./geom";

export const W = 15.1, H = 16.41, DEPTH = 9.8, CLIP = 7.2;
export const PITCH_MIN = 19.3;
export const CLEAR_BEHIND = 60.0;
export const MARGIN_CLIP = CLIP + 1.4, MARGIN_HOOK = 1.8 + 1.0;

/** Cutter for one slot centred at (u, v). */
export function cut(u = 0, v = 0): Solid {
  const top = v + H / 2, bot = v - H / 2, hw = W / 2;
  return box(u - hw, u + hw, bot, top, -1, DEPTH + 1)
    .fuse(box(u - hw, u + hw, top - 1.0, top + CLIP, 5.4, 8.4)) // clip pocket
    .fuse(box(u - hw, u + hw, top - 1.0, top + 3.3, 8.39, DEPTH + 1)) // relief for the clip's arm
    .fuse(box(u - hw, u + hw, bot - 1.8, bot + 1.0, 5.4, 8.4)) // hook pocket
    .fuse(prismYZ([[top, DEPTH + 0.01], [top + 2.0, 6.4], [top + 2.0, 5.4], [top, -0.01]], u - hw, u + hw)); // lead-in slope
}

/** A solid block with n slots in a row. Returns the block and its (width, height). */
export function block(n = 1, pitch = PITCH_MIN, side = 2.5): { solid: Solid; size: [number, number] } {
  if (pitch < PITCH_MIN - 1e-6) throw new Error("slots closer than the printed 19.3 mm pitch are untested");
  const us = Array.from({ length: n }, (_, i) => (i - (n - 1) / 2) * pitch);
  const x0 = us[0] - W / 2 - side, x1 = us[n - 1] + W / 2 + side;
  const y0 = -H / 2 - MARGIN_HOOK, y1 = H / 2 + MARGIN_CLIP;
  let body = box(x0, x1, y0, y1, 0, DEPTH);
  for (const u of us) body = body.cut(cut(u, 0));
  return { solid: body, size: [x1 - x0, y1 - y0] };
}

/** One slot in the smallest block that still has every pocket. */
export const coupon = (): Solid => block(1).solid;

Slot geometry after tomasf/Keystone (MIT).

View this module on GitHub