5

This is a beautifully clear explanation of how a keyboard circuit can be designed.