If you have spill damage to the keyboard or the keyboard and/or cable are faulty, that can be easily replaced (as long as you can find a replacement keyboard).
If the problem is at the keyboard controller on the motherboard, that's much more involved and pricey.
There's not a lot you can do to troubleshoot this. Your best, first step should be replacing the keyboard and hope that's all that ails you, as a replacement motherboard (for the keyboard controller) may or may not be worth the time and cost.