Often when I hear this the one or more battery cells have blistered and press on the keyboard & Trackpad and/or their cables.
I would first check the battery, install this gem of an app! CoconutBattery take a snapshot of the apps main window and post it here for us to see Agregar imágenes a una pregunta existente
Next I would open the system and inspect the battery cells look flat like in these images? Reemplazo de la batería de MacBook Pro 13" con Pantalla de Retina Principios de 2015 Also check the ribbon cable that runs down the center this cable is the Trackpad cable the Keyboard cable is to its right on the logic board.
OK I see the two problems!
The image is not quite clean enough to tell but suspect the keyboard connectors latch popped off when you lifted it up to release the cable.
Note the latch is folded down here
Carefully lift it
Its now in the up position
You’ll need to look for it on your desk or order a new connector to gain it Keyboard FPC Connector carefully pop it off and put it on your logic boards connector.
But you have a second issue! The trackpad latch is still in the up position on the trackpad!
So both will cause you issues!