In some situations, a keyboard may not work in Windows because of a software issue or accessibility feature such as ToggleKeys. To help verify this is not the cause of the issue, reboot the computer and see if the keyboard Num Lock, Caps Lock, or Scroll Lock can be turned on and off.
When these keys are pressed LED indicators should turn on to indicate the key is enabled or disabled. Another option is to try entering CMOS setup.
If the keyboard is working as the computer is booting up, something in Windows is preventing the keyboard from working. Try booting the computer into Safe Mode and see if it works. If your keyboard works in Safe Mode, try uninstalling or reinstalling any recently added software.
If the Num Lock and Caps Lock do not work, and you are unable to enter CMOS setup, something is physically wrong with the keyboard or the computer motherboard needs to be replaced.