...if water was spilt on the keys?
Many liquid spills never resolve. Like Frodo getting stabbed with a Morgul blade, the computer never fully heals.
My concern is that the water likely penetrated farther than the keyboard. Liquid damage is progressive, and some damage cannot be reached for remediation even by the best professionals.
You can spend a bucket of money to fix today's glitch de jour and still have something else fail weeks or months later.
I believe in keeping old Macs in service as long as possible but I am doubtful about ever successfully fixing problems caused by a liquid spill. I like Grant's suggestion to continue using the computer with an external keyboard until it succumbs to its wound or no longer does what you need.