That narrows things down, I think, to a software related problem with respect to the keyboard.
What you look for in Event Viewer is some error, warning, or even an informational entry that precedes the problem. Or some entry that appears when/after you replug in the keyboard. Some entry that does not appear during start up. A process, a service.
The objective is to be able to create the problem at will. For example some process does not start and the keyboard does not work. Start the process, keyboard works. Then determine why that process does not start at boot up.
Truly can take some digging through the layers......