
From the question it appears you may not even be aware that there are keyboard macros available so losing that function should not be an issue. I have had success in resolving issues like these by moving devices around on the KVM USB ports at the cost of losing use of keyboard macros for KVM control. Removing power from the KVM to force a reset can resolve the issue temporarily but will come back until the devices are moved around on the KVM ports. If there are only two USB ports available, and are labeled for mouse or keyboard, then maybe swapping the ports can avoid this issue. If there are ports not labeled for keyboard and mouse then try those. To resolve this try using different ports for the keyboard and mouse on the KVM switch. Some computers and operating systems handle this system better than others. These ports are treated differently by the KVM for things like detecting the keyboard macros for switching, and in emulating the keyboard and mouse to the attached computer to avoid annoying disconnect/reconnect delays every time the KVM switches. There's likely a port labeled for the keyboard, and another for the mouse. I discovered that on Startech KVM switches not all USB ports are treated equally.
