Skip to main content
  1. My Projects/

PS/2 TrackPoint & Mouse Driver

Ergo Keyboard Design TrackPoint ZMK

This has been my most challenging project yet.

I wanted to add a TrackPoint to my DIY ergonomic keyboard. The “TrackPoint” is a popular mouse device that is frequently found on IBM & Lenovo ThinkPad laptops.

A lot of people, especially developers, love them, because they allow you to control the mouse without taking your fingers of the keyboard.

My self-designed DIY keyboard
My self-designed ergonomic split keyboard with a TrackPoint.

But unfortunately, zmk, the keyboard firmware I am using, did not have a device driver for it.

Even worse, TrackPoints are using PS/2, a hardware communication protocol that is so ancient that no modern microcontrollers have any hardware chips or support for it.

The only way to get it to work was to write my own low-level driver that manually toggles the electricity in the wires on and off at a rate of over 15,000 times per second.

This turned out to be extremely challenging for me, because at that time I was “just a software guy”. I knew almost nothing about how peripherials communicate with a computer or even how a cable works.

I also had no tools to observe the communication on the wires or debug the code.

And yet after a lot of sleepless nights, a lot of perseverance and A LOT of learning, I was able to overcome the countless challenges and I created a working driver.

Today, it’s used not only by me, but also by many other people in the zmk community.

You can find the code and documentation on GitHub:

infused-kim/kb_zmk_ps2_mouse_trackpoint_driver

A PS/2 mouse & trackpoint driver module for keyboards running the zmk firmware

C
53
5

I also wrote a blog post that outlines my experience and the challenges I encounterd:

How (and why) I wrote a driver for ancient PS/2 Mouse Devices...
·2798 words
Ergo Keyboard Design TrackPoint ZMK
Join me in this development journey blog post and experience the “Ups & Downs” of the most difficult hardware + software project I’ve ever embarked on.