Reverse engineering and fixing a bug in the firmware of a "ThinkPad Compact USB Keyboard with TrackPoint"

submited by
Style Pass
2021-06-19 00:00:14

For years, I owned and liked my USB keyboard, A “Lenovo ThinkPad Compact USB Keyboard with TrackPoint” (KU-1255). It is small and with its trackpoint, you don’t even need to move your hands from the keyboard to move the mouse pointer. Unfortunately, Lenovo went far beyond what’s useful: They implemented middle-mouse button scrolling in hardware, but half-broken.

The keyboard firmware supports different modes, on of them disables or activates the middle mouse button. If it is activated, you can use the middle mouse button. As a bonus, you get a kind-of middle-mouse scrolling: As long as you press the button, vertical trackpoint movements are translated to scroll events. But just vertical and in a really coarse way, so that you can only scroll line-wise, but not close to pixel-wise.

In addition, releasing the middle mouse button after scrolling triggers a middle mouse click event, ruining the scroll feature totally.

Leave a Comment