00100000
onto the input register, and I get:
01000000
on the output register, that can only correspond to one key at the time I read the register.
EDIT: I think perhaps you're underestimating how quickly a microcontroller can scan a keyboard. If I press 2 keys simultaneously that are both connected to the same output pin on the output register at different times, the rate at which I scan the input register is so fast that it would be physically impossible for me not to detect that as 2 distinct keys being pressed.
Going back to your original example, if one would press keys 1, 2 and 6 at the same time your microcontroller would falsely detect 7 as being also pressed (because keys 1 and 6 shorts two input wires together). This assuming that your output register drives strong 1 and weak (preferably floating) 0. If it has strong drive for both 0 and 1, then such combination of pressed keys would cause some unpredictable effect, possibly including burning out the pins.
If I put a voltage on pin 2, and key A is pressed, I will get a voltage at pin 1. If I put a voltage on pin 3 and key B is pressed, I will get a voltage at pin 1.
It doesn't matter if both are pressed simultaneously because I am reading them sequentially.
All you have to do is scan the keys quickly enough that someone can't "sneak in" a key press in between scans which turns out is possible with even the lowest powered hardware.
He's basically running sets of 8 keys through a mux, and changing the selector of the mux to scan through the keys rapidly, 8 at a time.
There is one output wire per key, at least until it gets to the mux.