There are many possible reasons why your keyboard or mouse might not be working. Here are some things you can check:
Make sure that the keyboard and mouse are plugged in properly. Check the connections at both the keyboard and mouse, and at the computer.
Try using a different USB port. Sometimes a USB port can be faulty and not work properly.
If you are using a wireless keyboard or mouse, make sure that the batteries are not low. You can also try replacing the batteries.
Restart your computer. This may fix the problem if it is caused by a temporary glitch.
Update the drivers for your keyboard and mouse. Outdated drivers can sometimes cause problems.
Run the Windows troubleshooter for keyboard and mouse problems. This can help to identify and fix the problem.
Here are some additional things you can try if your keyboard is not working:
Enable Mouse Keys. Mouse Keys is a feature in Windows that allows you to control the mouse pointer using the keyboard. To enable Mouse Keys, go to Start > Settings > Ease of Access > Keyboard and turn on the Use Mouse Keys switch.
Use a virtual keyboard. There are many virtual keyboards available that you can use if your physical keyboard is not working. A virtual keyboard is a software keyboard that is displayed on your screen. You can use the mouse to type on the virtual keyboard.
Here are some additional things you can try if your mouse is not working:
Check the mouse settings. Make sure that the mouse settings are correct. To check the mouse settings, go to Start > Settings > Devices > Mouse.
Reset the mouse. You can reset the mouse by unplugging it from the computer and then plugging it back in.
Use a different mouse. If you have another mouse, try using it to see if it works.