I did buy some off the shelf ones, but they seem to fail after a few months and or screwing up the USB ports.
I opened the switch box up and noticed that the two power lines were always connected to both the output and the input lines. The only switching that's done is at the two data lines, which I thought was odd. (It might be the reason why it keeps failing as both computers sending 5.2 V down their power lines, and if one is even slightly less than the other, the power goes to the other one, destroying the port.)
It is not really a true switcher, since to truly switch, it has to disconnect all 4 (or 5 if you include the shield) lines as if you unplugged it and replugged it in physically. Below is my wiring diagram:
Now this design is starting to fail too after a few months of use despite the switch still works, so this design of mine also destroys the USB ports too? Maybe I should add an inline diode somewhere on the two power lines all going to input, but can't travel back up? But I shouldn't really need a diode if my switch completely isolates the two outputs (just like unplugging and replugging), it either is output A OR output B unless the switch is faulty....or starting to show signs of failure which is why after a few months it makes the computer says USB device not recognized when it switches to the output?
I am not really keen on spending over $300 KVM switch just to switch between two computers if I can do it for cheaper. What does a KVM switch have that my homemade USB switch doesn't have....besides video switching feed? Hmmmm....
And I made another one for the keyboard, but that one doesn't even work....never worked for the keyboard for some reason....only the mouse one worked and that only worked up til now and starting to show the same funkiness the off the shelf one I bought did...