To use my desktop PC and my laptop with the same keyboard/mouse, i use the “Logitech Flow” mechanism (KVM by ethernet) But I had a big problem because of the host name of the laptop (Logitech Flow Loss of connection for 30s every 5s) :
But generally speaking, you understand that this situation is abnormal: Having two or more IPs for the same host in local DNS