IEC metric screw sized connectors

IEC metric screw sized connectors is a family of electrical connectors defined by IEC that are named according to their ISO metric screw thread, namely M5, M8 and M12.

However, the connectors are further classified by a so-called coding, denoted by one or more letters, which defines things like pin layout, shape of connecting surfaces and electrical properties.

[4] Each "coding" has a different keyway that prevents incorrect connection between incompatibly keyed connectors.

This means two panel-mount connectors will not fit together as they cannot be screwed in, however two cables are able to be joined together.

[1] All variants permit one or more pins to be removed to create differently keyed connectors.

M12 A-coded 5-pin connector: For each connector size, the A-coding is the inspecific pinout variant and the only variant defined in varying numbers of pins.
Ethernet cable with an M12 X-coded connector in one end and a modular connector in the other.
M12 T-coded 2-pin connectors. Left, panel mount female socket. Right, inline male plug. The screw thread on the inline connectors can be freely moved regardless of gender, while the threads on the panel mount connectors are always fixed.