do either or both k/b's work ok on another pc?
If yes, the problem sounds internal, maybe a dry joint where the k/b socket joins the mobo in the pc.
Presume the k/b is directly connected with a ps2 connector. If socket cannot be tested/repaired, maybe a usb k/b will have to be used.
If you have no k/b, this may help:-
Please advise back on progress.
Good Luck - Keep us posted.