Best KVM switch for composers?

I got myself a Mac Mini recently and I really want to be able to switch between it and my PC easily, so that I can go back to using my beloved Logic Pro X for projects. I bought a KVM switch for myself but… it doesn’t work at all 😭 Oh well, I need an upgrade anyways because I got a 2nd monitor.

Does anybody have any KVM switches they use and recommend? Ideally I want it to be able to switch my MIDI keyboard and my audio interface between my PC and the Mac (with keyboard/mouse switching as well, hopefully ). Having it be rack-mounted would be an extra bonus but not necessary.