In a mechanical system, a key is a machine element used to connect a rotating machine element to a shaft. The key is inserted into a keyway, a slot or groove machined into both the shaft and the rotating element (such as a gear, pulley, or coupling). This creates a positive mechanical lock, preventing relative rotation between the two components.
The primary purpose of a key is to transmit torque from the shaft to the rotating element, or vice versa. When the shaft rotates, the key presses against the sides of the keyway in both the shaft and the rotating element, transferring the rotational force. This ensures that the two parts rotate together as a single unit.
Keys also serve to maintain the axial position of the rotating element on the shaft, preventing it from sliding along the shaft. There are various types of keys, including square keys, rectangular keys, round keys, and taper keys, each designed for specific applications and torque requirements. The selection of a particular key type depends on factors such as the amount of torque to be transmitted, the precision required, and the ease of assembly and disassembly.