Chosen Solution
I recently replaced the thermal paste on my Mac. After reassembly the power button wouldn’t work. I plugged it in, when it booted the keyboard wouldn’t receive input. The trackpad is the only working input at the time. USB keyboards still work.
Sounds like you didn’t insert the keyboard cable fully or forget the clamp. Review Step 11 in this guide: MacBook Pro 13" Unibody Mid 2012 Logic Board Replacement
Use a piece of electrical tape to pull the keyboard cable into the slot securely and then lock it down.