Your thinking is somewhat imprecise then The fact that it is a laptop type keyboard is imporant because the driver is failing to detect this. If connecting it direct to the computer always works (including getting the keystrokes as letters part right) then it's likely the KVM that's shielding this detection, making it seem that the keyboard is standard type, so the programatic num lock off selection enables the arrow keys.I do not think that this is related to the keyboard. The different key handling is caused by the 'Setenv NUMLOCKOFF 1' environment variable. if you do not set the NUMLOCKOFF variable, then there are only 2 states: Either the numlock is on or off
Does the type of your keyboard show up in the USB Inspector? How does a KVM show here? Does it display in it's own right or does it display as a keyboard (and then does it display as the right keyboard?).
What alternate machine are you switching between? Does it have any issues with the keyboard detection?