Controlling USB KVM Switch using Arduino


I would like to control my USB KVM Switch (IOGear GCS1104) using Arduino.

I got an Arduino board with ATmega32U4 (Sparkfun Pro Micro 5V) and I'm using code like that:;

to send keys.

when I connect it to my computer USB port , the code works great.
but when I connect it to my KVM Keyboard Port it does not work. (not even sending a simple keys)

what could be the problem?