problem with laptop


I have a certain problem with my laptopSince a week now after I switch it on for about 2 mins or so there isn’t any problem but there after the keyboard doesn’t work and none of the keys can be used.When the problem started it would sometimes be like this and sometimes it would be normal. I tried reinstalling windows and for a few days there wasn’t any problem and now again the problem has started.Sometimes even when not using the keyboard the characters are being typed automatically.Even when using the mouse when I click on one icon it gets highlighted and then when clicking on another that also gets highlighted and therefore when double clicking these entire icons open simultaneously.I even tried an antivirus (avast) but it didn’t show any virus.What could possibly be the problem ?william