Keyhole hook and slot: insert and slide to lock

11 min readUpdated Jun 2026

A keyhole lock is the fastener that clamps nothing: you hang the part, let it settle a few millimeters, and it stays put under its own weight. You've seen it on the back of any picture frame or on an electrical panel hung from a wall: a wide round mouth opening onto a straight narrow channel. You push the head of the stud through the mouth, slide the part down so the neck enters the channel, and that's it. There's no screw to tighten and no click to hear; all that closes the joint is geometry and gravity. And precisely because nothing is clamping, everything comes down to two dimensions that are rarely sized right. One is how much the lips of the channel overlap the neck of the stud; the other is how much clearance you leave in that channel.

Kinematics: two motions, not one

What sets a keyhole apart from a plain hole is that the assembly has two phases in different directions, and the lock lives exactly at the change of direction. First comes an axial insertion: the head of the stud, wider than its neck, passes through the wide zone of the keyhole, sized to swallow it with clearance. At that instant the part isn't held by anything; it could fall straight forward. The second phase is a lateral slide, usually downward: you push the part so the neck of the stud leaves the wide mouth and enters the narrow channel. That channel is narrower than the head, so its two lips end up trapped between the head of the stud and the wall. The head can no longer come out the way it went in: to do so it would have to climb back up to the mouth, and the weight of the part pushes it the other way, toward the bottom of the channel.

Here is the key physical fact: the lock stores no elastic energy. It isn't a snap-fit (a joint where something flexes to engage and spring back); here nothing flexes or springs back. It's a geometric interlock held by a permanent external force: gravity on the hanging mass. As long as the weight keeps pulling down, the neck stays seated at the bottom of the channel and the head stays trapped behind the lips. Remove the weight—lift the part by hand—and the lock simply releases. That's why it hangs and unhooks without a tool: it's a demountable joint that stays closed not because it resists, but because nobody is opening it.

How lip overlap sets the holding load

The question that decides whether the part holds or falls is: how much of the stud's neck stays trapped between the lips of the channel and the head? That overlap is the tab of material that any force trying to pull the part off the wall in the axial direction has to overcome. Too little overlap and the head slips over the lips at the slightest perpendicular load or vibration; too much and the mouth has to be enormous for the head to pass, or the channel so narrow the neck won't enter.

Compute the overlap on radii, not on diameters. With the channel centered on the axis of the stud, the lip on each side overlaps the neck by an amount equal to (head radius − half the channel width), and both lips work at once. That difference of radii is exactly the same quantity the table below calls the "tab": when you read ≥ 1–1.5 mm of overlap, that's the value of (head radius − channel width / 2) per side. The head has to be clearly larger than the channel width for that tab to exist; a head barely larger than the channel leaves only a sliver of lip that gives under the slightest load.

There's a second geometric detail that's easy to forget: the step at the mouth, the transition between the wide zone and the narrow channel. That step is what stops the stud from climbing up and escaping without you sliding it first. If the transition is a gentle ramp instead of a defined shoulder, axial load combined with any upward nudge sends the stud back to the mouth and the part unhooks. You want a crisp shoulder, not a slope.

Clearances: two conflicting fits in one slot

A keyhole needs two contradictory fits in the same slot, and it pays to treat them separately. The wide mouth wants generous clearance: its only job is to let the head pass easily, so oversize it without hesitation. The easier the head goes in, the faster you hang the part, and here extra clearance costs you no retention. The narrow channel is the opposite: it wants the minimum clearance over the neck of the stud that still lets it slide without the part rattling once hung. Too tight and the neck won't enter, or scrapes hard as it slides; too loose and the part wobbles on the stud.

As with any printed fit, remember that the slot comes out narrower than you draw it: the bead width fattens the walls into the gap, and the squish of the first layer closes the mouth of the slot even more. A keyhole with tight nominal dimensions won't slide; size the channel gap to the dimension the part actually prints at, not to the number on screen. The starting number and the calibration to reach it are in Tolerances for moving parts: the channel asks for a "slides without play" clearance, the mouth for a "turns or slides freely" one.

The two clearances of a keyhole (PLA/PETG, starting values, per side)
Zone Clearance/side Why
Wide mouth (head passage) 0.3–0.5 mm only has to swallow the head; margin is free
Narrow channel (neck) 0.15–0.2 mm slides without rattle; drop to 0.10–0.15 only if the channel roof isn't an overhang
Lip↔head overlap ≥ 1–1.5 mm per side material that holds the axial load; keep it generous, not token

Here's the FDM trap, and to reason about it properly you first have to fix the load direction. When the part hangs from the wall, its weight pulls the neck of the stud toward the bottom of the channel—a load in the plane of the plate, which the lips resist in shear—but there's a second, more dangerous load: the part tends to pull away from the wall because its weight hangs in front of the plane of the plate, not in it. That tipping moment pulls the stud out of the wall, in the axial direction, and it's that force that tries to tear the head out from behind the lips. It doesn't load the lips in shear: it loads them in bending and peel, bending each lip like a short cantilever and prying it open layer by layer. In FDM, peel between layers is even weaker than interlaminar shear, so this is the mode that really decides orientation.

The rule, then, is to orient the layers so the axial peel load doesn't fall perpendicular to the layer lines in the lip zone. If you print the plate lying flat on the bed, with the plane of the slot parallel to the bed, the lips end up formed of stacked horizontal layers and the force separating the part from the wall pulls in exactly the direction that lifts one layer off the next: the lip delaminates and opens like a clean crack. What you want is for the beads of the lip to run along the direction in which that load works them, so that the continuous material of the bead, and not the weld between layers, is what opposes the peel. The specific orientation depends on how the plate ends up mounted relative to the wall; the full reasoning for why orientation decides strength is in Layer orientation for motion. Which of the two halves you print matters too: if what you print is the hook that enters and drops down the slot, the problem is the same, just mirrored—it's a cantilever working at its root, and you want the layers aligned with the load, not perpendicular to it.

And there's a printability detail that applies only to the flat-lying variant: a slot whose plane ends up horizontal creates an overhang at the roof of the channel. The top face of the channel hangs over the gap and, without support, comes out drooping and rough, right on the surface the stud bears against. If you can't avoid that orientation, a chamfer on the channel roof turns it into a printable slope instead of a flat roof hanging in the air. With the plate oriented so that roof isn't an overhang, the problem disappears and you can tighten the channel clearance to the low end of the table.

Failure modes and how to prevent them

Three failures break a keyhole, and all three are headed off in the design. The first is unintended return slide: the part, instead of staying at the bottom of the channel, rides up toward the mouth and unhooks, whether from a vibration, a shove, or a stud that's too smooth. The lock depends on gravity keeping the neck down, and that fails the moment something pushes upward. The defense is to add a detent at the end of the channel: a small bump that the neck clears with a click as it seats, and that then blocks it from climbing back up unless you force it. It's worth being honest about what this introduces: the base lock is purely geometric and gravitational, but that clicking detent is a local snap—it requires something to flex elastically to clear the bump and spring back. It doesn't contradict the nature of the lock; it adds a small elastic catch on top that makes it hold even when you move it or carry it around.

Before trusting everything to the detent, give the channel enough travel: the neck has to drop far enough to be retained with margin, not just barely past the step. A short channel leaves the neck a hair from the mouth, where any oscillation returns it to the wide zone. Reserve a slide travel that carries the neck well into the channel, with clearance between the seated position and the mouth.

The second is lip failure by overload: you hang more weight than the overlap can support, and the lip gives. Remember that the load that breaks it isn't pure shear but peel from the tipping moment, so you attack it on the two fronts you already have: more overlap (more material tab to overcome) and the correct print orientation (so that tab works along the grain and not through the weld between layers). A thin lip printed so the load peels it between layers invites premature breakage; one with generous overlap printed along the grain holds far more than its size suggests.

The third is rattle: the part hangs, but has play on the stud because the channel left the neck too much clearance. It isn't a catastrophic failure, but it makes the assembly feel cheap and makes the joint generate noise and wear with use. You close it by tightening the channel clearance to the minimum that still slides—back to the table above—and, if the rattle is axial (the part separates from the wall and returns), by adding a slight pinch of the neck against the bottom of the channel or a bump that keeps it seated against the wall. As with every printed fit, that final number doesn't come from the table but from your own printer, and the path to fixing it is the same: print, measure, and note, just as Tolerances for moving parts lays out.