So you have got two different computers and just one pair of mouse and keyboard? No?
Maybe you just can not keep two keyboards and two mice on your desk as it is just super confusing. Well, this was my situation at least when I got a Macbook. I had most of my stuff stored on my PC and then I had installed Node, Android Studio, XCode, etc on my Macbook. First I just opened up my Macbook and used it's touchpad and keyboard while the Keyboard and The Mouse to use my PC. Usually, I had to type on Mac's keyboard but ended up typing on PC one. And then when I got my thunderbolt adapter (To connect Macbook to an external monitor as its own display is just too small for me), I would have to connect another keyboard and mouse. But I had watched a LTT video whos sponsor was synergy. So I tried finding alternatives to synergy. In which I succeeded.
Introducing ShareMouse
I ended up installing ShareMouse. It has a free version and a paid version. But the free version works fine for me and do you know the best part?
You can try all the premium stuff for free. However, you will need to restart the program after 30 minutes for that. But I am sure you will not even need most of the premium features.
Anyways. So you can go to the download page of ShareMouse and download the Mac or Windows version on both of your devices. I recommend you to not install the portable version. Sorry Linux users this is not available for Linux. You can scroll down for Linux alternatives.
Then install the software on both machines (or as many machines as you want to use). Now you can explore the settings yourself or follow my settings:
Please note that ShareMouse will not launch like your normal applications. On mac find the cursor icon on the left Bluetooth/wifi icons and click it to find the settings. On Windows click the ^ in right of your taskbar and find the white cursor icon. Right-click the icon to bring settings option.
Open ShareMouse settings. Leave everything off on the "Switching" tab. These are all pro features (You will need to restart your sharemosue every 30 minutes).
Then go to "Sharing" ("Exchange" on Windows) tab and enable "Remote clipboard transfer". This will allow you to copy some text on one machine and paste on another.
Lastly, in Misc confirm if the Panic key is enabled and double-press is checked. On Windows leave everything else as is. On Mac I would recommend you to check the "Launch at login" (and also "Launch at Login screen" if it is enabled for you).
Leave everything else as it is. Now, if both of your machines are connected to the same network they should likely be automatically connected. If not please confirm that you are not using a password. And if you need to use a password (for example on a public network - I don't even know why would you be using a public network in your home) so confirm that password set in both clients is the same. If the password is off or the same in settings but your machines are still not working so try to restart ShareMouse (You will find the exit/quit button in the same popup where you found settings).
Linux Alternative:
So if you are using Linux so you would realize there is no ShareMouse download for Linux. If you will be using Linux as a server then I think the best option is to use SSH or VNC.
But if you are using it as the main computer so you can install the software below. The barrier is free and Opensource. But I am going to use my Ubuntu as a Minecraft server (and I just installed it today) and use TeamViewer so simply I have not used it.
Barrier (Opensource)
I just found out that Barrier is the only free ShareMouse alternative for Linux. If you do not like a barrier for some reason so you will have to either buy Synergy, buy a USB switcher, or just use two keyboards and two mice.