I recently started to encounter a very frustrating issue where my mouse (a very old Logitech G5), and, occasionally with it, my keyboard (Anne Pro II), seem to disconnect.
This generally happens when I'm playing an FPS with lots of mouse movement, and it happens a number of ways, the most common being the mouse will "stutter", where there will be no mouse input, but then the game I'm playing will seemingly get all the input at once, causing my character to turn very sharply—none of this is accompanied by the game's performance stuttering at all. This will occasionally be accompanied by the Windows 10 "device disconnected" sound, which is occasionally followed by the device reconnected sound, and sometimes my keyboard will briefly disconnect and reconnect (although this is pretty rare).
I was also planning to do some hardware upgrades, so I did a clean install of Windows 10 and installed new RAM and a new SSD which went well. I also began using a different mouse pad.
I did this all two days ago, and yesterday while gaming for a while (probably four hours) I didn't notice it once, but just now encountered the disconnect sound followed by my mouse and keyboard disconnecting and reconnecting. I had been using all the same hardware in much the same way for about a year and just began encountering this last week, so I'm really at a loss as to what it could be.
I don't have another USB mouse to isolate that element with (which I really should, because this mouse is pretty old), but I checked the outside of the cable and haven't seen any sever damage (no wire exposed), and I don't see how a faulty mouse would also effect my keyboard. I was also able to recreate the problem by vigorously moving the mouse, which made me think it could be some electrical interference, but after all the software and hardware changes I made I haven't been able to do that again. Also, I never noticed this in the winter, when we did have extreme static problems in my apartment, which I would think would've illuminated a problem like that.