Usually this is because of debris or dust on the connector for the keyboard. My laptop had this problem.
I took the laptop apart until I could get to the keyboard connector. I removed the keyboard and cleaned the connector by taking an eraser and "erasing" all the dust off. The pins were a lot more shiny and the keyboard worked perfectly after that. I hope this helps.
It could also be helpful if you searched "Acer Aspire E1-510 keyboard replacement" so you can see how to properly remove it.
-Jono