RSS Feed
Jan 26

The keyboard and the KVM

Posted on Monday, January 26, 2015 in Uncategorized

While using my work computer for the last year, I’ve had to use a KVM with it in the interests of conserving space on my desk. Working on a client’s computer while being able to use my main mouse and keyboard is a treat, with one caveat: having to press the physical button on the KVM to switch between my computer and the clients computer.

“But wait”, you might ask, “most KVMs have a keyboard toggle. Why not use that?” A fair question, and one I already failed at tackling. My work computer is running Kubuntu. Everything works great on it…except Scroll Lock on the keyboard. And guess what my lil’ Trendnet TK-207 KVM needs to switch inputs?

Scroll Lock.

So after putting up with physically pushing the button, a recent desk cleanup and re-org has left me moving my KVM slightly out of reach. 2 hours of having to lift my ass out of my chair made me realize I was stupid and should finally address the issue of my KVM not have a soft toggle.

To Google!

Researching the issue, I found a lot of other Ubuntu users who can’t use their Scroll Lock key on their keyboard. Lame. One of the fixes I found allowed the LED to toggle once upon when the key was pressed. Nifty, but useless for me as it doesn’t engage the KVM. The commands were

“xmodmap -pm” to show if mod3 is already blank and then

“xmodmap -e ‘add mod3 = Scroll_Lock’” to assign Scroll Lock to the empty mod slot

This worked to allow the LED to flash on and off…and not much else. Ugh. Next fix was a script to run that was possible to assign to a hotkey.

xset led named “Scroll Lock” && sleep 0.2 && xset -led named “Scroll Lock”

It actually worked zomg!!11one1. But this doesn’t actually fix anything, just a nifty workaround to double press the Scroll Lock function. I want all the keys I purchased on my keyboard to work, dammit. The thread I was reading about this issue (https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/912044) then had one final command that might work. Crossing my fingers, I copied and pasted it into my terminal….

Success.

The joyous command: “sudo kbd_mode -u”

My Google-Fu reveals that kbd_mode “reports or sets the keyboard mode”. The “-u” switch sets the mode to UTF-8 mode (UNICODE). Neat.

So now I can switch effortlessly between computers. This will literally save me minutes per year. And people say laziness is a bad thing…