Please do try these troubleshooting steps that may help.
- First is to uninstall/reinstall the keyboard driver.
- Go to Device Manager and uninstall the keyboard driver.
- Reboot the laptop once the driver has been uninstalled and it should reinstall the driver automatically.
- Do test it again after the reboot and see if the same problem will persist or not.
- Next is to connect an external USB keyboard and see if it will work normally or not.
- If the USB keyboard will work normally that could only mean that the problem is with the keyboard itself.
- Last step would be to check the ribbon cable that connects the keyboard to the motherboard.
- If it will still not work, I would suggest replacing the keyboard itself.