What 4k kvm switch do you use? Do you like it?
I did get hdmi adapters for my pi4's, but haven't actually tried them yet. May need different adapters/cables if you're going to/from mini-dp or another interface. back of the switch looks like USB-B Female (standard USB cable, not 3) and HDMI Female.
I've only been using it for about 4 weeks, but so far working well.
KVM (comes with 2 cable sets): https://www.amazon.com/gp/product/B07F6XFVZ3/
Extra 2 cable sets: https://www.amazon.com/gp/product/B075FRFXNX/
Micro HDMI to HDMI (for pi4): https://www.amazon.com/gp/product/B00JDRHQ58/