Hi,
It seems like that the problem is the keyboard itself but please do try these troubleshooting steps that may help.
- First is to do a hard reboot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds try test the keyboard again.
- If it will still not work, uninstall/reinstall the keyboard driver from Device Manager.
- Since as you mentioned that the external keyboard does worked fine that means it's the built in keyboard itself that is the problem.
- If you can open the laptop and reseat the ribbon cable that connects the keyboard and motherboard that would be great as well.
- Here's a video guide on how disassemble the laptop:
https
/www.youtube.com/watch?v=ijpVerkfdPc
- If all these will not work last option would be to replace the keyboard itself.