I upgraded my monitor for a U3818DW, which has a built in KVM. Changing between the inputs is a little annoying using the buttons on the monitor, so I configured a keyboard shortcut on Linux and MacOS to switch back and forth.
On Linux, I went to Keyboard shortcuts and assigned a custom shortcut to:
ddcutil setvcp 60 0x12This will swap my input to the Mac, to go back I used the Shortcuts app to run m1ddc, which I installed from brew.