Could be malware. Low level format the hard drive and install Windows after.
How can a malware affect my setup if I already formated the C?
It's common for malware to be able to continue doing it malwareness (lol) after a format. Some are specifically designed to withstand a normal format.
damnit! do you think buying another HDD would fix it then? im asking because you said a malware can withstand a format, from what little I have read this means that it would be a BIOS malware. Any thoughts on this?
It is all up to you. I personally would go the long way, reformat and reinstall. Then get the latest drivers for the mouse and the keyboard. I would not install much software yet until I got clear about the keyboard and the mouse, working or not.
I am a little confused how come it works fine in Linux but fails in Windows? Unless it's designed for Linux or something ...
If there is malware designed for Windows like almost all the malware, then of course it would not affect Ubuntu.
That's a possible and very likely reason why it keeps happening only to Windows installs.
Still highly recommend to low level format all drives in the system, or leave only one drive and low level format that one.
Then proceed to clean install Windows. This should be made more difficult than it is. It's quite simple to solve, if in fact, it is malware.
And in the slight chance it's not, at least it will be ruled out.