|
|
| KVM Switch Hacking. |
|
James Stanley
Member #7,275
May 2006
|
Hi, I've been playing around with the set_leds() function today, and I've found that I can make my KVM switch go to my other machine with the following program, I was wondering if anybody could test it. Compile it, linked with allegro, open a terminal window, run it for 10 seconds or so, then close it with Ctrl-C, then close the terminal window. See what happens. For reference, I have a Belkin USB 2-Port KVM Switch. Underneath it says '2-port KVM Switch with Built-in Cabling'. Here's the code: #include <allegro.h> int main() { allegro_init(); install_keyboard(); while(1) { set_leds(KB_SCROLOCK_FLAG); set_leds(-1); } return(0); } Do not run it without opening a terminal, else you'll have a harder time closing it. Also note that it didn't break my KVM switch at all, and I was able to switch back by pressing the button. I'd like it if people tried it with different makes and models, and if anybody knew the reason. EDIT: |
|
BAF
Member #2,981
December 2002
|
Im guessing flashing the scroll lock key is a code to tell the kvm to switch. What if you rapidly hit the scroll lock button? |
|
James Stanley
Member #7,275
May 2006
|
No, that doesn't do anything, also the code only turns the light on, it doesn't press the key, and when I press the key the light doesn't come on, I don't know why. And the terminal has to be closed before the screen changes, it doesn't work if you just close the program. This is what I don't understand. EDIT: |
|
BAF
Member #2,981
December 2002
|
I still think it has something to do with some code. The fact that scroll lock doesn't turn on a light tells me something right there. Perhaps there's a computer driver that can switch your stuff by flashing scroll lock? |
|
James Stanley
Member #7,275
May 2006
|
The only driver was for Windows, so I can't tell. You're probably right about it being something in the switch. |
|
|