Even though most keyboards today use a matrix which connects the keys ... just put an entire microcontroller with a look-up table into every keyboard, more inventive approaches were required ...
This was however not always the case, and from the days of 8-bit home computers onwards making a custom keyboard often meant taking a surplus one from elsewhere and adapting its matrix to suit ...