Macbook Pro buttons are pushed on their own I play a game, for example Kerbal Space Program, and sometimes (pretty often) buttons are pressed on their own. No mods. It can be spacebar (stage separation) or "m" for Map. And it could be a problem in the game, but it's not because some similar stuff going on in Terraria, suddenly your character  starts to go in one direction. It's like some button is stuck, but actually it's not, keyboard is ok. What is it can be?
MBPr 2014 El Captain 10.11.1
There is a very good chance that your battery must be replaced. Check it in Applications → Utilities → System Information → "Power": check the "battery condition": when it says "replace" or "service" replace it asap. Do not buy non-apple crap, they die faster than they are bought. In OWC there is a possibility that they have a replacement oem battery which is good. Only there.
Note: a bad battery swells (and can go leaking also) and presses the keyboard on the underside.