What is Keyboard Ghosting & Matrix Jamming?
Circuit Analysis & Matrix ScanningKeyboards organize their internal electronics into a grid of intersecting horizontal rows and vertical columns called a switch matrix. When you press a key, the switch bridges an intersection, closing the circuit.
The 3-Key Ghosting Triangle
On cheaper membrane keyboards without individual diodes, pressing three keys that share two rows and two columns causes electrical current to backfeed across the matrix. The microcontroller cannot tell which keys are actually down and may either register a phantom fourth key (Ghosting) or lock up and refuse to register any further keys (Jamming / Blocking).
Modern mechanical keyboards eliminate this flaw entirely by soldering a dedicated isolation diode (1N4148) onto each switch, ensuring unidirectional current flow.