Hi,
- Were there any changes made on the computer prior to the issue?
- What is the make and model of the computer?
Method 1:
Run the **hardware and devices troubleshooter** and check if it helps.
Method 2:
I would suggest you to refer the article and check if it helps:
Mouse, touchpad, and keyboard problems in Windows
Let us know if it helps.