I run a laptop and a desktop computer simultaneously and need to switch between them often. Here are some software solutions I’m aware of that will share a Keyboard and Mouse between multiple systems:
These require you to be on the same network. However, occasionally my computers are not on the same network (i.e. VPN). It that case I’ve found an inexpensive USB cable that will do the trick. I’ve been using the j5create JUC100 wormhole (~$20 USD) for about 2 weeks and and it is great! There are a few minor quirks, but the cable and small utility to drive it are many times better than two keyboards and two mice.