When you press the button on the USB switch to go to another PC, the software detects this and sends data commands over the monitor connection (using DDC standard) to trigger the monitors to switch inputs. You can use this same data communications standard to do things like adjust the brightness of your display. For example, I have these setup on my Mac to adjust the brightness of my two attached displays (complexity increased with multiple displays and desire for each to change at same time, simpler commands with a single display):
alias day="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 80' sh" alias evening="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 32' sh" alias night="seq 3 | xargs -n 1 -P 3 sh -c 'ddcctl -d \$1 -b 10' sh"
Does that make sense? As mentioned earlier, you're limited by the minimum number of inputs on the monitor(s) and/or the minimum number of computers the USB switch can be connected to. The simplicity of this system is that the display connections do not go through any switching layer and are instead directly connected to the computers (which avoids a number of compatibility issues).
I should be clear that I haven't used this yet but I'm going to try it. The Acer monitors I'm using have two HDMI ports and 1 DisplayPort so I can in practice attach 3 computers assuming I buy a USB switch which can connect to 3 or more computers.
If you only want a single monitor, there are switches that also switch between different video inputs. These are commonly referred to as "KVM switches" (KVM being Keyboard, Video, Mouse.) But KVM switches cost more money...
My understanding is this project allows you to use a plain USB switch and the multiple video inputs on your monitor to simulate a full blown KVM switch.
Now I got it, thanks!
I dunno man, this worked pretty ok for me:
> This utility watches for USB device connect/disconnect events and switches monitor inputs via DDC/CI.
And then a couple lines latter, a sample config that makes it pretty obvious how simple this goes:
> usb_device = "1050:0407" \ on_usb_connect = "Hdmi1" \ on_usb_disconnect = "Hdmi2"
Plug in a device & switches to hdmi1. Unplug & it switches to hdmi2. A USB switch is optional, one could just move where they plug their mouse into by hand, for example. But you don't seem to be interested in helping fill yourself in on anything here, on learning, on using search engines to find anything out. Honestly filling in the neophyte knowledge like that is not what project descriptions are for, in my book.
Generally, dude: relax, chill out. Most everything on this planet could use better description. But this seemed pretty clear & simple to me, at least. I think it'll work for a lot a lot of people as is. No need to be aggressively rude. Have you ever dealt with any kind of soft-kvm like technology before? Perhaps people would more self-select into this kind of project, versus rando's walking in on the street. I think that's ok.
A "USB switch" reads like a switch with a USB cable on it, that the computer it is plugged into can see when it changes. Which is fine, except the fact that a keyboard and mouse are also presumed to be plugged in is not said or hinted.
"DDC/CI" is similarly undefined. A program switching video inputs makes no sense: a computer produces video output, not input. You would need to know the program is sending commands to the monitor to tell that to switch to a different input.
Both of these facts could easily have been in the first sentence. Without, the whole article is noise.
This is the USB switch I use with it: https://www.iogear.com/product/GUS402/
The USB switch button will send a connect/disconnect event to both computers and they will then react accordingly.
I wrote a similar program, you just listen for something connected to the hub disappearing
if mouse no longer connected:
tell monitor to switch output via DDC
else if mouse now connected:
tell monitor to switch back via DDCIt needs to run on each computer in the setup since it watches for the USB devices to connect.
This device switches your keyboards and mice and so on between two computers. The software in OP reacts to these events and switches monitor inputs using some equivalent of HDMI CEC called DDC/CI.
[0]: https://smile.amazon.com/Switcher-Selector-Computers-Keyboar...
Without this phrase, your comment would be far friendlier and also not break the HN guidelines.
A project about cooperatively switching display inputs to get rid of a video switcher should say so in the title.