|How old is your laptop? Maybe it's starting to die.|
The keyboard to motherboard connector beneath the keyboard may be loose, if that is the case then reconnecting it could resolve your problem.
If you connect a USB keyboard to the laptop, do you experience the same problem? If this is the case, then the problem is software related and not a physical problem with the keyboard.