Have you tried connecting an external usb keyboard to your laptop and seeing if it works??
use that external one to login and then check with my computer----> device manager----> keyboard and pointing devices and see if you can see a keyboard with a warning yellow sign on it.
if it has a yellow warning sign on it, then it probably has an issue which u can see if u double click on it., if not you will have to take it to a service centre and its probably a hardware problem.