Table of Contents

Keyway Machining Guide: Types, CNC Processes, Design Rules, and Common Problems

A keyway is a narrow machined recess that helps connect a rotating shaft with a hub, gear, pulley, coupling, or similar component. Although the geometry appears simple, its width, depth, alignment, corner condition, and fit directly influence torque transfer, assembly, backlash, and service life. A keyway may be produced on the outside of a shaft or inside a bore, and the selected machining method changes substantially with part geometry, production quantity, material, and whether the feature is open-ended or blind. This guide explains keyway types, CNC keyway machining processes, design requirements, common manufacturing problems, inspection methods, and the differences between keyways and other shaft-hub connection features.

What Is a Keyway?

Before considering cutters or tolerances, it is necessary to understand how the slot functions as part of a complete shaft-hub connection.

keyway machining

What the Feature Looks Like

A keyway is defined by its relationship with a separate key and the mating component, so the feature should not be evaluated as an isolated slot.

A keyway is a straight or curved recess machined into a shaft, bore, or both. A separate key occupies the mating recesses and prevents relative rotation. The shaft recess is often called a keyseat, while the hub recess is called a keyway, although many drawings use keyway for both. The two recesses must create the intended side fit without forcing the hub off-center or leaving excessive rotational clearance.

How a Key, Keyseat, and Hub Work Together

The complete connection includes three interacting elements rather than one machined groove.

The shaft carries the external keyseat, the hub contains the internal keyway, and the key bridges them. Torque is mainly transmitted through the key’s side faces. A parallel key normally needs top clearance so the hub can seat concentrically. Width, depth, shaft diameter, bore size, and key height must therefore be considered together; a slot can meet width tolerance and still fail because its depth, position, or mating fit is wrong.

Why Are Keyways Used?

The value of a keyway comes from the mechanical behavior it creates, not from the presence of a slot alone.

Torque Transmission

The main purpose of a keyway is to create a positive mechanical connection between a shaft and a mounted component.

A friction-only joint may slip when torque, vibration, repeated starts, or shock loading exceeds the available clamping force. Adding a key creates defined load-bearing faces that resist relative rotation. This makes keyed connections common in couplings, drive components, industrial rollers, pumps, conveyors, machine tools, and motion-control assemblies. The feature is especially useful when the mounted component must be removed during maintenance rather than permanently joined to the shaft.

Positioning and Serviceability

Keyways can also control orientation and simplify replacement, although they should not automatically be treated as the only locating feature.

A key can establish the angular relationship between a shaft and hub, which is useful when timing, indexing, or repeated assembly matters. Standard keys are widely available, and replacing a damaged key may be easier than replacing an entire shaft or hub. In some designs, the key is intentionally the more replaceable element. Nevertheless, a keyway reduces the shaft’s local cross-section and introduces stress concentration at the slot edges. Designers therefore need to balance serviceability against fatigue strength, torque demand, and the consequences of backlash.

What Types of Keyways Are Common?

Keyways can be classified by key shape, feature location, access direction, and whether axial movement is required.

Keyway Types by Key Geometry

Keyway geometry usually follows the key style and the functional behavior required by the shaft-hub connection.

Parallel keyways are the most familiar type. They use a rectangular key with parallel side faces and are suitable for many general torque-transmission applications. Woodruff keyways are semicircular pockets cut into a shaft with a dedicated cutter. Their curved seat helps the key adjust during assembly, making them useful on smaller or tapered shafts, although the deeper curved pocket removes more shaft material. Tapered keyways accept keys with a slight taper and can create a wedging action. Sliding or feather-key arrangements permit controlled axial movement while preventing rotation, so their side fit and surface condition become especially important.

Keyway Types by Location and Access

The same nominal key size can require a completely different process depending on whether the slot is external, internal, through, or blind.

An external keyway lies on a shaft surface and is usually accessible to a milling cutter. An internal keyway lies inside a bore and often requires broaching, keyseating, slotting, or wire electrical discharge machining. A through keyway has an open path for the tool and chips. A blind keyway stops before the end of the feature, which creates tool-entry, chip-evacuation, and runout challenges. End relief, cross holes, or undercuts may be needed when the cutting tool cannot naturally exit beyond the finished slot.

Keyway Type Typical Geometry Common Advantage Main Design Concern
Parallel Straight rectangular slot Standardized and economical Side fit and local shaft weakening
Woodruff Curved shaft pocket Self-adjusting during assembly Deeper material removal
Tapered Slot for a tapered key Secure wedging action Assembly force and axial position
Sliding / feather Straight slot supporting axial travel Transfers torque during movement Wear, finish, and controlled clearance

 

Is a Keyway a CNC Machining Feature?

Modern CNC equipment frequently produces keyways, but the machine and cutting strategy depend on where the feature is located.

Where Keyways Appear in CNC Parts

Keyways are established mechanical features and are regularly included in CNC-machined shafts, hubs, gears, pulleys, and couplings.

CNC machining is especially useful when the keyway must maintain a controlled relationship with bearing journals, bores, bolt patterns, shoulders, or other functional geometry. An external shaft keyway can often be milled in the same setup as flats, cross holes, and end features. An internal keyway may be produced in a CNC lathe or machining center with dedicated broaching tooling, or transferred to a separate process when the machine is not suited to repeated linear cutting loads.

Information Required on the Drawing

A CNC program cannot reliably infer the intended fit from a simple slot width alone.

The drawing should define the applicable key standard or provide the keyway width, depth, length, end shape, location, and tolerance. It should also state whether depth is measured from the shaft surface, bore surface, opposite diameter, or another datum. Angular orientation must be specified when the keyway aligns with holes, flats, timing marks, or other features. For an internal blind keyway, the drawing should show permissible relief and the required bottom condition. Missing depth definitions are a frequent source of disagreement because several inspection methods can produce different numerical results for the same physical slot.

Which CNC Processes Machine Keyways?

No single machining process is ideal for every keyway, so process selection should begin with accessibility and production needs.

CNC Milling for External Keyways

Milling is normally the first choice for accessible shaft keyways because it is flexible and easy to combine with other machined features.

A standard end mill produces many straight external keyways, while a side-and-face cutter can improve width consistency. Woodruff keyways use a disk-shaped cutter that enters radially and forms the curved seat. The shaft needs rigid support to control vibration and orientation. Mill-turn live tooling can machine the slot in the turning setup, preserving alignment with finished diameters.

Broaching and Keyseating for Internal Keyways

Internal keyways usually need a tool that cuts linearly along the bore rather than rotating within the finished slot.

Push broaching uses a guided broach and bushing to remove material progressively through an open bore. It is productive for standard sizes when quantity justifies the tooling. CNC broaching uses controlled strokes on a lathe or machining center. Keyseating and slotting use repeated linear cuts for larger or nonstandard profiles. All require controlled machine load, accurate guidance, chip removal, and exit clearance.

Wire EDM for Difficult Geometry

Wire EDM becomes valuable when cutting force, hardness, corner definition, or internal geometry makes conventional cutting less suitable.

Wire EDM creates accurate through keyways in hardened conductive materials with little cutting force. It supports precise position and small internal corner radii, but needs a through path, runs more slowly, and usually costs more than milling or production broaching. Blind features may instead require sinker EDM or specialized slotting, depending on tolerance and quantity.

What Should Be Controlled During Keyway Machining?

A keyway must satisfy dimensional, positional, and surface requirements that influence both assembly and long-term performance.

Width, Depth, and Position

A functional keyway depends on the relationship between several dimensions, not merely on whether the key can be inserted.

Width controls side fit and strongly affects backlash. A slot that is too narrow may prevent assembly or damage the key during installation, while excessive width allows impact loading on the key faces. Depth affects top clearance, shaft strength, and hub seating. The slot must also be parallel to the shaft axis or bore axis unless the design intentionally specifies another relationship. Angular location matters when the keyway indexes the component to another feature. Length should provide the intended engagement without allowing the cutter overtravel to damage an adjacent shoulder.

Edge Condition and Surface Quality

Small edge defects can become assembly problems or fatigue initiation points in a loaded shaft.

Burrs on the keyway edge may prevent the hub from sliding into position, distort measurement results, or scrape the mating bore. A controlled edge break is usually helpful, but an excessive chamfer reduces the effective side-contact area. The root radius must suit both the cutter and the key corner. Surface finish is particularly important for sliding keys and repeatedly assembled components. Tool marks, tearing, recast layers from electrical discharge processes, or compressed chips at the bottom should be evaluated against the actual load and life requirements.

What Makes Keyway Machining Difficult?

Machining difficulty increases when access is restricted, the slot is deep, the material resists cutting, or the machine is poorly suited to linear loading.

Restricted Tool Access

Internal and blind keyways are more difficult because the cutting tool cannot approach, cut, and exit as freely as it can on an external shaft.

A through bore allows a broach or keyseater tool to pass completely through the part. A blind bore does not, so the tool needs a defined stopping region and sufficient space for chip accumulation or extraction. Without relief, the tool may leave an incomplete end, pack chips into the bottom, or collide with the part. Small bores further limit tool cross-section and rigidity. Deep internal slots magnify alignment errors and make direct visual inspection difficult.

Cutting Load and Machine Rigidity

Keyway cutting can place unusual directional loads on tooling and machine components.

Broaching on a CNC lathe or mill applies repeated linear force rather than the continuous rotary load for which many machines are primarily designed. An aggressive depth per stroke can overload the tool, mark the guide surface, or affect machine accuracy. Long external shafts may deflect during milling, producing tapered width or an uneven bottom. Tough stainless steels, hardened alloys, and gummy nonferrous materials can create built-up edge, chip welding, or rapid tool wear. Interrupted cutting at the slot entrance can also generate chatter and edge chipping.

How Can Keyway Machining Problems Be Solved?

Most quality problems can be reduced by selecting a suitable process and controlling setup rigidity, cutting load, chip flow, and measurement.

Match the Process to the Geometry

The most reliable solution is usually to select the process from the slot’s access, quantity, material, and tolerance instead of forcing every keyway onto one machine.

Accessible external slots are generally economical to mill. Standard internal through keyways suit guided broaching, while large or nonstandard profiles may suit keyseating. Hardened through features with demanding position tolerances can justify wire EDM. Blind internal keyways need realistic entry and relief geometry or specialized slotting tooling. Removing most material before a light finishing pass can reduce force when rigidity is limited.

Improve Setup, Tooling, and Inspection

Process stability depends on supporting the part, guiding the tool, and measuring the feature with a method that matches the drawing definition.

Long shafts need support close to the cut, and cutters should use the shortest practical overhang. Internal broaching tools require accurate orientation and rigid holders. Conservative strokes, suitable lubrication, and chip clearing reduce edge damage. Width can be checked with keyway gauges, gauge blocks, pins, or a coordinate measuring machine. Depth may require a depth micrometer, dedicated gauge, or measurement over the opposite diameter, matching the drawing method.

How Does a Keyway Compare with Other Shaft Connections?

Designers often compare keyed joints with splines, set screws, and friction clamps because each option changes strength, backlash, cost, and serviceability.

Keyway Compared with Splines

Keyways and splines both prevent relative rotation, but they distribute load and affect manufacturing cost differently.

A single keyway concentrates load on limited faces and weakens one shaft region. Splines distribute load through multiple teeth, supporting higher torque and repeated axial sliding, but require more complex tooling and inspection. Keyways remain attractive for moderate loads, standard components, repairability, and lower cost. Under reversing loads, clearance can cause impact, wear, and increasing backlash.

Keyway Compared with Set-Screw and Clamping Connections

A set screw or friction clamp may appear easier to machine, but it does not provide the same positive torque path in every application.

Set screws are inexpensive for light loads or adjustment, but they can loosen, mark the shaft, and transmit limited torque. Clamp hubs avoid cutting a slot and distribute pressure more evenly, yet depend on friction, fastener preload, and surface condition. A keyed joint gives more predictable resistance to slip. Selection should consider torque direction, backlash, shaft strength, assembly frequency, and cost.

How Should Designers Specify a Machined Keyway?

Clear drawings prevent the manufacturer from guessing at fit, depth, orientation, corner condition, or tool runout.

Use a Recognized Standard When Possible

Standard key and keyway proportions reduce ambiguity and allow manufacturers to use established cutters, broaches, gauges, and inspection practices.

The selected standard should match the unit system, key type, shaft diameter, and application. A standard reference does not eliminate the need to identify keyway length, end condition, orientation, and any deviations. Designers should avoid assigning unnecessarily tight tolerances to every dimension. Width and location may need close control, while an open end or nonfunctional bottom surface may tolerate more variation. Tolerance should follow function rather than appearance.

Design for Tool Entry and Exit

A machinable keyway drawing shows how the tool reaches the feature and where it can safely stop.

For external milling, provide clearance from shoulders for the cutter body and holder. For internal broaching, provide a through path whenever the design permits it. A blind internal slot should include an approved relief groove, cross hole, undercut, or runout region sized for the selected tool. Avoid specifying perfectly sharp internal corners unless the function truly requires them. When several keyways or indexed features are present, define a common datum system so the manufacturer can establish angular position without interpreting an informal sketch.

Conclusion

Keyways remain a practical method for transmitting torque, controlling orientation, and supporting removable shaft-hub assemblies. Their apparent simplicity can hide important decisions involving key type, slot access, fit, stress concentration, backlash, and inspection. External keyways are commonly milled, while internal keyways may require broaching, keyseating, slotting, or wire EDM. Reliable results begin with a clear drawing, a process matched to the geometry, rigid workholding, controlled cutting loads, and an inspection method that reflects how the depth and fit were specified.

FAQ

Can a keyway be added to an existing shaft?

Yes. The shaft must be held without damaging functional surfaces, and the remaining cross-section must still support the load. Provide the material, hardness, key size, angular location, and existing heat treatment or coating.

Can a blind internal keyway be CNC machined?

Yes, but it normally needs specialized slotting or broaching tooling plus a defined relief area. A relief groove, cross hole, sinker EDM, or another dedicated process may be required because ordinary push broaching favors through bores.

Why does a keyway become loose over time?

Causes include excessive clearance, reversing impact, poor hub fit, short engagement, misalignment, soft key material, and fretting. Inspect the slot, key, shaft, and hub together before deciding whether replacing only the key is sufficient.

Categories
Latest Articles
CNC Quote Services
Custome parts
made easier, faster
Get a quotation
Please attach your 2D CAD drawings and 3D CAD models in any format including STEP, IGES, DWG, PDF, STL, etc. If you have multiple files, compress them into a ZIP or RAR. Alternatively, send your RFQ by email to andylu@tuofa-machining.com.

Privacy*

As with all our customers, confidentiality remains vital in demonstrating our commitment to customer service. You can feel reassured that we will gladly complete disclosure forms for your applications and your applications will solely be used for quotation purposes.