Input dies after a variable yet short amount of time

Hello, there’s this issue that comes up every once in a while (im talking many months in between each case) while I’m programming in java.

I run my program (which uses input, eg. keyboard and mouse), and everything runs fine but after x amount of time, keyboard input completely dies. The mouse still works, but the keyboard is dead. I didn’t change my code, it’s all identical to the way it was before when it worked, but for some reason, keyboard input just dies.

My physical keyboard isnt the problem because if it was, the mouse would be dead too since the mouse is plugged into the keyboard.

Oh yeah, im using eclispe by the way.

ALSO restarting the computer doesnt fix it