Help with CD74HC4067 on matrix keyboard

Bypass the amateur hacky stuff. Download some service manuals of synth keyboards. Check out this recent thread
https://forum.arduino.cc/t/keyboard-matrix-74hc138/1018597