Hi,
I would say it's a hardware problem but here are some troubleshooting steps that may help.
- Start by uninstalling/reinstalling the keyboard driver.
- Go to Device Manager and uninstall the Keyboard driver.
- Once done reboot your laptop and it should reinstall the driver automatically.
- After the reboot do test it again if the same problem will persist or not.
- Next is to try an external USB keyboard and see if the same problem will persist or not.
- If it's working normal using an external keyboard that means it's the keyboard that's faulty.