This was happening consistently with one user in our office with a wireless keyboard/mouse combo. I could consistently recreate the issue. If the mouse was not moved for 10-15 seconds, there would be a half second delay after moving it. The keyboard was even worse - if no typing for 10-15 seconds, when letters were typed (for instance "this"), it would wait half a second and then capture "t" "h" and then the "i" would keep repeating until another key was pressed.
After trying all the methods in the first answer above without positive results, I finally found a setting called "USB selective suspend setting" under Power & Sleep that fixed the issue once disabled.
Here are the steps on Windows 10:
- In the start menu, search for "edit power plan"
- Click "Change advanced power settings"
- Expand "USB Settings" and "USB selective suspend setting"
- Change "Setting:" to disabled
The keyboard and mouse immediately started working properly again.