I had the same problem with my MacBook Pro 13.3" A1278 year 2010 and after replacing the keyboard it's still doing the same thing. Replacing the keyboard will not fix this issue 100% as once my logic board was repaired then it's all working fine.
P.S. I also had issues with running applications as it would highlight 20-30 programs when just choosing one to run, that also has been resolved after the logic board repair because of an ounce of water spillage.