Suggestions:
Make sure your keyboard is securely plugged into the USB port. Try a different USB port to rule out a faulty port.
If using a wireless keyboard, ensure batteries are fresh or it's fully charged. Check if a wireless receiver needs reseating.
Update the driver.
If possible, try a different keyboard.