I personally hate KVM switches, I instead use a mouse and keyboard that both have three bluetooth profiles and can quickly switch them to up to three different devices.
Keyboard: https://www.amazon.com/gp/product/B08MLG38PQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Mouse: https://www.amazon.com/gp/product/B07DHDFW5V/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
I've used both for years, just don't spill water on the keyboard and you shouldn't have issues.