So a friend was getting into making a keyboard (joystick button box actually) down at the hardware level, and was wondering about wiring and how it copes with multiple keypresses at once. That sorta touches on both how a keyswitch scan matrix works and why we shove in diodes.
we use a matrix because the rate of humans typing is a much slower than the rate at which we can scan keys, so no need for dedicated IO pins
dealing with multiple keypresses is a function of both diodes, and the way in which we wire things up to light up rows to scan output columns
For more tech level deets going back to the days of the GH60.. http://blog.komar.be/how-to-make-a-ke...
(if C0/B0/C1/B1 make no sense - just imagine them as wired. Things on an arduino/avr/chip/whatever.. this was a quick vid and straight out of the camera - no editing was performed.. which is why it looks so yellow)