This question already has an answer here:
Yesterday my laptop's built-in keyboard started typing random keys, i.e. when I press Down Arrow, it would type 3, when I press it again, it would delete a character, pressing the Right Arrow would get me several lines down, then suddenly it would start working normally. Some keys worked properly, but a lot didn't.
I have Linux and Windows, dual boot, happened on both of them. Tried turning off the laptop and removing the battery, but the problem was still there afterwards.
When I plugged in an external USB keyboard and typed through it, it was working just fine, while at the same time, the builtin keyboard was having this weird behavior.
What could be causing this?
I haven't poured any liquids on the keyboard, but I had the laptop opened a month or so ago, to clean the dust from the fan, and to replace the CPU thermal paste, because it had started heating a lot even when idle.