I want to make device what is similar to KVM switch.

I have mouse + keyboard connected to my table PC and I want to use it for my notebook as well.

I decided to make USB HUB with 2 USB input (for mouse and keyboard) and 2x 1 USB for output. Those two outputs will be switchable by switch.

My question is: Can I just connect two input USB in parallel to make HUB? Or it will not work and mouse+keyboard will not be recognized? If it will not work what do I need to make it work?[![enter image description here](https://i.stack.imgur.com/rJ2FW.png)](https://i.stack.imgur.com/rJ2FW.png)