 It has a switch at some or all intersections, much like a multiplexed display.Almost all keyboards have only the switch at each intersection, which causes "ghost keys" and "key jamming" when multiple keys are pressed (rollover).Certain, often more expensive, keyboards have a diode between each intersection, allowing the keyboard microcontroller to accurately sense any number of simultaneous keys being pressed, without generating erroneous ghost keys.