i was surprised to see the matrices with diodes. i've built them just using the built-in pull-up resistors. of course they're not designed for multiple buttons be pressed at the same time
perhaps another hindrance is a limited understanding of hardware.
buttons are conventionally connected between a pin and ground and the pin can be configured with an internal pull-up resistor that makes the input HIGH when the button is not pressed and becomes LOW when pressed (connected to ground)
each input pin is connected to a row of buttons where each button is also connected to column pin. each input is configured with a pull-up (INPUT_PULLUP). each output is alternately configured as an input or a LOW output
when scanning, the configuration for each column pin is sequentially configured from a simple input (no pullup, INPUT) to a LOW output. only one output pin is ever configured as a LOW output
as each column is made LOW, the row pins are read to see if any are LOW. while there are several buttons connected to that input pin, if it is LOW it must be the button connected to the column pin being configured as a LOW output
the row and column of the pressed button can be used to read the button ID from a 2 dimensional array
(don't forget to reconfigure the column pin as an input after each scan and after detecting a LOW input)