That is what I do. I have owned like 4 kvm switches. Even when I paid extra to get a “good” one they never lasted more than like a year or two. My USB switch has been going for about 3 years. Occasionally it glitches out and I have to unplug it from everything but it’s only about every 3-5 months
This one: https://www.bhphotovideo.com/c/product/966237-REG/iogear_gus404_4x4_usb_2_0_peripheral.html
I’ve had it about 4.5 years now.