PS/2 to USB converters are complex things with interesting faults

August 24, 2015

My favorite keyboard and mice are PS/2 ones, and of course fewer and fewer PCs come with PS/2 ports (especially two of them). The obvious solution is PS/2 to USB converters, so I recently got one at work; half as an experiment, half as stockpiling against future needs. Unfortunately it turned out to have a flaw, but it's an interesting flaw.

The flaw was that if I held down CapsLock (which I remap to Control) and then hit some letter keys, the converter injected a nonexistent CapsLock key-up event into the event stream. The effect was that I got a sequence like '^Cccc'. This didn't happen with the real Control keys on my keyboard, only with CapsLock, and it doesn't happen with CapsLock when the keyboard is directly connected to my machine as a PS/2 keyboard. Unfortunately this is behavior that I reflexively count on working, so this PS/2 to USB converter is unsuitable for me.

(Someone else tested the same brand of converter on another PS/2 keyboard and saw the same thing, so this is not specific to my particular make of keyboards. For the curious, this converter was a ByteCC BT-2000.)

What this really says to me is two things. The first is that PS/2 to USB converters are actually complex items, no matter how small and innocuous they seem. Going from PS/2 to USB requires protocol conversion and when you do protocol conversion you can have bugs and issues. Clearly PS/2 to USB converters are not generic items; I'm probably going to have to search for one that not just 'works' according to most reports but that actually behaves correctly, and such a thing may not be easy to find.

(I suspect that such converters are actually little CPUs with firmware, rather than completely fixed ASICs. Little CPUs are everywhere these days.)

The second is the depressing idea that there are probably PS/2 keyboards out there that actively require this handling of CapsLock. Since it doesn't happen with the Control keys, it's not a generic bug with handling held modifier keys; instead it's specific behavior for CapsLock. People generally don't put in special oddball behavior for something unless they think they need to, and usually they've got reasons to believe this.

(For obvious reasons, if you have a PS/2 to USB converter that works and doesn't do this, I'd love to hear about it. I suspect that the ByteCC will not be the only one that behaves this way.)

Comments on this page:

By Jon at 2015-08-24 15:14:15:

I tried several PS/2 to USB converters 10 years ago when I first got a machine without any PS/2 connectors. All of them had problems.

Some reset periodically, dropping and re-adding the USB device, which lost my Xmodmap configuration, which made the keyboard unusable.

Others seemed unable to keep up with my typing speed, surprisingly. I'm a fast typist, but not that fast. They dropped characters.

I never had the problem you describe, even though I use Caps Lock as an additional control key.

I gave up and got a USB keyboard.

By Pete at 2015-08-25 16:15:33:

If you really want to despair, you might want to have a look at the HID specification. Instead of events with scan codes that PS/2 keyboard sends, a HID deivce delivers something called "report", which references a "field". There's an infinite field for things going poorly.

If I were in your shoes, I would start looking for open implementations. I'm sure amateurs have done that. Going with one of those at least lets you know what's inside and potentially fix the firmware.

How strange to come here reading about Go and find a post on PS/2 keyboards.

I too found commercial PS/2->USB adaptors wanting. I made my own, using a USB-capable Atmel part on a commercial development card, running my own firmware, which can be found at

which you may find useful.

-Nicolas Dade

By cks at 2015-10-24 01:03:52:

Very belatedly but because I want to keep track of it: I wound up trying another PS/2 to USB converter which had a different bug. When I pressed and held down CapsLock, the converter would send a CapsLock down event, then a synthetic CapsLock up followed by a CapsLock down. If I typed a control key fast enough my keypress could sneak in between the last two events, resulting in a non-control key.

(You can sort of see what the converter was up to here, but again, it was clearly flawed.)

Written on 24 August 2015.
« I think you should get your TLS configuration advice from Mozilla
One view on practical blockers for IPv6 adoption »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Aug 24 01:22:59 2015
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.