When you encounter such issues, make sure the problems are not caused by an application installed on your computer. Carefully check the installation list from Control panel > Add / Remove Programs. You could also start the computer in Safe Mode and then observe its behavior. If it still does the same thing, you might need to visit a laptop service repair shop because the problem could be caused by a faulty keyboard that needs to be replaced.