Key and keyhole states

Draw a key and keyhole in VectorPaint: separate and inserted icon states

Make a fictional editable key icon pair and check direction, overlaps and small-size legibility.

English translation of the Chinese original, translated on . Original publication dates, attribution, code and version notes are retained.

Make a fictional editable key icon pair and check direction, overlaps and small-size legibility.

Limit what the icons express

Draw two fictional icon panels: a key outside a keyhole and the key partly inserted. They show object position only, not an unlocked lock or a turned cylinder. Yale’s historical page describes flat keys and cylindrical locks, but actual key and keyhole shapes vary. Do not copy the cut pattern of a real key or present this as a key duplication or lock-mechanism diagram.

Create a two-panel document

Create a landscape canvas in VectorPaint with two equal square regions and save an editable original. Keep reference frames, lock faces, keys and labels in separate layers or groups using the controls visible in the installed version. Leave space between panels so readers do not mistake them for one key in two places at once. Canvas dimensions serve output, not real lock dimensions.

Draw the shared lock face

Use the ellipse tool for a light circular lock face and a smaller dark shape for the central keyhole. Use a simple illustrative keyhole rather than claiming a manufacturer’s design; keep both shapes editable. Duplicate the face into the second panel at the same size and height. Check center alignment and similar margins to the panel edges so the apparent state change does not come from scaling.

Draw an independent key

In the first panel, use a ring for the key head and a narrow rectangle with a few geometric notches for a fictional shaft. Distinguish the head hole from its outline. If using overlapping shapes, check that the hole remains readable when the background changes; a background-colored shape is not necessarily a real transparent hole. Inspect in one color before optionally making a genuine cutout with a Boolean operation, keeping an unmerged copy.

Orient the separate state

Place the first key to one side of the lock face with its tip toward the keyhole and a visible gap between them. Roughly align the shaft axis with the hole direction so it does not appear to strike the face sideways. It remains a two-dimensional symbol, not a real insertion angle. A short arrow may show the intended move, but it should not cover the fictional cuts or look like part of the key.

Make the partly inserted state

Duplicate the first key into the second panel with the same proportions, orientation and color, then move its tip into the keyhole position. Use stacking order or split visible shaft segments to show the portion hidden by the lock face. Do not draw the hidden part through the face. The panels do not show real depth; caption the second “partly inserted illustration,” not “unlocked.”

Check overlap and continuity

Zoom in on the shaft-keyhole junction in the second panel. The visible shaft should end plausibly at the face or hole edge, with head and shaft still connected. If a background-colored object hides a part, change the background to expose false masking; use a mask or object order if needed. Hide and restore the lock face to compare the whole key with the visible result without implying internal cylinder structure.

Distinguish states without relying on color

Label the panels “separate” and “partly inserted.” Position rather than red and green can carry the distinction. Make a monochrome copy and check that the keyhole, head hole, shaft and gap remain readable. If a hole vanishes at small size, enlarge it for the icon and note that proportions are illustrative. Compare both panels at the same scale rather than enlarging only one.

Adjust optical balance and labels

Preview both panels at the same small output size, checking stroke weight and visual centers. A round key head and round lock face can have different perceived weight even when their areas match. If the second panel feels heavier, adjust label placement or surrounding space while preserving the lock face’s geometric size. Each label and arrow must point to its own state and must not cover the hole or shaft.

Troubleshoot, save and export

If the inserted key appears to pass through the entire face, inspect hidden segments and object order. If lock faces differ in size, revisit the duplicated dimensions. Save the editable original, hide frames in a copy, and export a separate SVG, PDF or PNG using an available control. Reopen it to check holes, arrows, type and crop. A correct PNG appearance does not mean objects remain editable. Record the source and unperformed print or use checks.

Check for overinterpretation

Temporarily hide labels and inspect whether the outside and partly inserted positions remain distinguishable. This is a self-check, not a claim that another person tested the icons. Restore labels and verify that none says “unlocked” or implies an internal mechanism. For web use, add alternative text describing both positions. Save a shareable copy without a real key photograph or cut pattern so the practice diagram is not confused with identification material. If the head hole and keyhole look alike in the thumbnail, separate them or adjust outline weight, then check that they remain distinct without color. Record the change beside the copy name so it can be compared with the sketch without redrawing the whole set.

Monochrome icon; Optical icon sizes.

Checked 24 November 2026: Apple public lookup; Yale: flat key and cylinder. No physical-device or private-server test is claimed.