Replace chip (PCB) in usb midi keyboard with arduino

The project I was referring to is: GitHub - oxesoft/keyboardscanner: Turn your broken (or unused) keyboard into a MIDI controller (with pedal and veloticy)

It is not very detailed is it? Without a schematic it is hard to know what is going on.

I would forget that code for the moment and concentrate on testing if you can get the key switches to be read. So forget about the MIDI and the scanning of all the keys and just concentrate on one key. Write a bit of simple code to do that and use Serial.print at a standard speed to send stuff out to the console so that you know you are detecting stuff.