Arduino Leonardo as USB KEYBOARD incompatibility with KVM device

Almost all KVM switched have some sort of hot-key command mode (or pass though setting) which may interfere with what you are trying to do (check the manual). Also, you may want to enable/disable USB legacy mode in the BIOS of the computer which does not comply because that may also be the culprit.

And as #1 said, if the Leonardo is not registred as a keyboard, the KVM switch may simply ignore it as a bogus device.