***Hold that thought***! You don’t need a new keyboard or trackpad!
Your issue is more likely a bad trackpad cable. This series has a daisy chain setup where the keyboard connects to the trackpad and the trackpad cable carries the signals to the logic board.
Here’s the needed part [product|IF188-088]
Review this guide Step 7 [guide|135948]
Now let’s figure out why the cable failed install this gem of an App [https://www.coconut-flavour.com/coconutbattery/|CoconutBattery] post a snapshot here so we can see it. I’m suspecting the battery has swollen up pressing on the cable. Basically you might need a new battery.