A friend of mine gave me her laptop to replace the keyboard as a drink had been spilt on it, but the rest of the laptop functioned properly.
The old laptop keyboard still had a few working keys, "e" and "r" notably. When I installed the new keyboard, it didn't function properly either, although this time "e" and "r" did not work, but other keys did such as "l" and "k"!
I have no idea why this would happen, could is be just bad luck at getting a defective keyboard or is the circuity inside the laptop damaged? A USB keyboard works fine, and it doesn't seem like a Windows issue as the keys also do not function when booted into bios.
Maybe the liquid went into the connector of the keyboard, try to clean the connector with isopropyl alcohol. But before, remove the battery and power supply. You could look if the liquid didn't go on the motherboard itself.
I went ahead and ordered another replacement keyboard and this one seemed to work fine. Once I'd put the laptop back together I realised that some of the keys are messed up e.g. esc is F1, F2 is F3, 9 is = and = is 9.