Roland D50 Inverted Action from Keybed

Hello,
If MIDI is working correctly, the problem is probably specific to the keyboard and therefore to IC1 or IC2.
If you’re lucky, it could be IC2 (RAM), otherwise it could be IC1, and then you’ll have to cannibalize another keyboard.
Do some research ; several Roland keyboards use this circuit.

Good luck!