It can be debrits under the keys, or a worn out keyboard that's telling you that it need to be replacded.
First step is to make sure that there are no debrits.
Hold the keyboard side way and gently tap it's side.
If debrits fall and it works beter, this was the cause.
If there are no debrits falling, then, it's probably getting to old.
Don't eat over or near the keyboard.
Electro
January 2016