First, try disconnecting and reconnecting the trackpad flex cable from the logic board and the trackpad, to make sure that its pins are making solid contact. If that doesn't change anything, then it sounds like there might be deeper damage to the top case assembly than just debris under the key caps. If the actual circuitry of the top case was damaged you may need to replace the top case to fix the issue. How did the interior of the machine look? Did the liquid get inside the computer? Is there any sign of corrosion on any of the internal components? My best recommendation would be to purchase a cheap refurbished top case and replace the whole top case assembly. Good luck!