This is really weird and seems to follow no perceptible pattern.
I am playing Three Kingdoms on extreme settings with absolutely no issues at all, not even lagging. In fact, I recently played a full battle with three armies per side maxed to 18 x 240 man-size units each and had no issues whatsoever.
But every now and then for no obvious reason, I will be in a battle (it seems to happen during battles, though not normally large ones, the latest was during the taking a small village with a tiny garrison) I get the 'Device Disconnected' chime and both my mouse and keyboard die on me.
I have a backlit keyboard so I can tell it's dead because the lights just go off and the mouse pointer simply disappears.
I have no idea what's causing it.
The game doesn't crash. In fact, the game carries on playing and I actually won a battle against a rebellion after the mouse and keyboard died. But the only way I have found to get out of the situation is to hold in the power button and crash the PC.
After that, it's fine until it happens again.
I've not had it happen when I'm doing anything else on my PC, so it seems to be related to Three Kingdoms but beyond that, I haven't got a clue.