Actually, I've never had to purchase a keyboard explicitly for a laptop, so sie has never been an issue. Anything from Logitech or Microsoft are usually high-quality- but opinions differ.
If your laptop is under warranty you can get the keyboard replaced.
As an aside I had a similar issue with my thinkpad, it wasn't allowing me to enter my BIOS password. (this is a OLD laptop, running DOS). It had a lot of issues in the last few weeks, since the battery leaked (no visible fluid but something is definitely amiss). all sorts of strange errors, like Divide overflow and other random stuff.
Suddenly though, the keyboard started working proper again...