So I use mechanical USB switches.
for keyboard and mouse, I use two of these:
https://www.amazon.com/dp/B01I0Y3GEE/
They have no extra keyboard/mouse latency, and no weird side effects like boot keys that don't work or modifier keys that are in the wrong state.
Issues I've had before with mouse/keyboard:
- hotkey conflicts
- mac boot keys break (hold down <key> for <some boot function>)
- modifiers stick in wrong state
- weird delays
- combinations with mouse+keyboard break