You may have had a common issue with the 2015 Macbook Pros, literally tens of thousands of people have Googled that problem on Youtube. Apple won’t admit that it’s a problem with hose models but if you take it to an Apple Store they’ll conveniently take $500 to replace the keyboard.
Anyways it’s an introduced bug due to a design flaw in the models released in 2015. They placed the ribbon cable flat on top of the battery on those models, and when the battery heats up and expands, as it does, it damages the ribbon cable. Prior models had the ribbon cable avoiding the battery by going around it. You can fix it yourself by replacing the ribbon cable. The ribbon cable costs $10 online and it’s the first thing you see when you open up the macbook, you don’t have to dig to get to it. No special equipment needed besides the screws to get the Macbook open.