Replace chip (PCB) in usb midi keyboard with arduino

Only issue I need to resolve now is how to reverse keyboard matrix, as it only works the wrong way.

I have no idea what this means. Why is it the wrong way?

Even when I put resistors to either pull-down or pull up configuration.

How do you do that? The Arduino has no pull-down configuration.

I keep telling you we need to see a full schematic, you keep not posting one. Why should I bother to help if you will not cooperate?