Keyboard Builders' Digest / Tips & Tricks
How to integrate a trackpoint into your keyboard
Based on his trackpoint builds, heyisjambo shares his experiences on how to integrate a trackpoint into your keyboard (ZMK).
Published August 12, 2024
TL;DR
- It is not that hard to integrate a trackpoint – if you think it sounds cool, just try it, even if you've never soldered anything before!
- You can easily retrofit a trackpoint onto lots of existing boards
- Stick to a trackpoint with a known pinout for the smoothest experience
- ZMK firmware for trackpoints is easy to use and superbly documented
Backstory
Adding a trackpoint to my keyboard had always seemed like an unattainable goal to me. Even though I'd always considered it a key component for my endgameTM board, I had no electronics knowledge, no soldering skills, no maker skills, and not enough firmware skills to make it seem even worth pursuing.
But over the years, people have consistently tempted me with their awesome builds: starting with Manna Harbour's (yes, of miryoku fame) corne trackpoints, then the amazing Santoku keyboard a year later, then the TPS42 which started to make DIY seem more possible for your average tinkerer, and finally Kim's ZMK trackpoint driver which really solved the last piece of the puzzle for me with wireless support.
I finally just decided to commit and make it happen – enough of the path had been paved that I felt like it was feasible for me to follow it.
What were the main takeways? Primarily, that it was a lot easier than I expected, and I regretted waiting so long to do it, but also that a trackpoint absolutely delivers on the integrated pointing device experience I'd been hoping for.
Anyway, backstory aside, here is a bit of an infodump that should help you make your very own trackpoint (TP) build too:
PCB compatibility
First off, you don't need to design your own keyboard to add TP compatibility. In fact, you may be able to just tack it on to what you already have on your desk! All you really need are:
- two or three pins that are unused or that you're willing to repurpose on your MCU
- a tactically placed mounting hole
First on the pins: Kim's trackpoint driver strictly only needs 2 pins, data (SDA) and clock (SCL), with an optional third pin for the trackpoint's reset. This means that you can easily repurpose pins used for an encoder, oled, nice!view, or even good old split communication and LEDs if you're using a board that was originally designed for wired halves. Pretty much any keyboard that isn't direct pin (like a sweep) will probably have something you can repurpose for this.
On the mounting hole: imo a huge selling point of the trackpoint is that you barely have to leave homerow to use it, so while you could mount it over the MCU, that's sort of negating a huge benefit of the trackpoint.
Instead, you should look for keyboards that have a mounting hole in the semi-standard spot between the QWERTY YUHJ keys like on the corne, lily, etc. This mounting hole can easily be repurposed to thread a trackpoint extension through and expose the trackpoint right there on your homerow.
Trackpoint hardware
So if the keyboard hardware is easy, then what about the trackpoint hardware side?
Good news is that this can also be easy!
If you stick to a trackpoint with a known pinout, then it is just a matter of soldering a few wires. In the pins of the ZMK discord's pointing-devices channel, there are detailed instructions for how you can acquire the 2-piece trackpoints which are tried and true.
I've personally had good luck with the soldering, but I've heard numerous reports that it can be tricky – the pads are small and liable to lift, and even if you think you nailed it, you could run into issues of poor connection or bridging later.
I've found it beneficial to solder dupont connectors instead of bare wires – this gives me the flexibility to detach and reattach my trackpoint as I see fit, using it for testing, and sharing it across builds, at the cost of a little extra bulk.
There are also options to directly use the FFC cable that comes pre-attached to the trackpoints, like the vik trackpoint module, but I have not used them in my own builds.
Mounting the trackpoint
The last piece is mounting the trackpoint, and this can be as simple or as complicated as you want it to be.
All it really takes is adding two additional (m2 screw) holes in your bottom plate aligned around the mounting hole you're hijacking: the trackpoint sensor can screw into these, and that's that! (note that the screw holes on the TP sensor aren't exactly m2, but it is close enough that it can be inserted with a little force) Even I, of zero CAD experience, was able to add these holes in fusion360 without much suffering. Sadek Baroudi's case design guide is a great place to start if you do not have a 3d model of a bottom plate to modify.
For the stem extension, using a labret piercing stem is common and works well. A little bit of hot glue has been sufficient to secure it for me. I've also used an m2 screw - standoff - screw combo which is nice for dialing in the desired length, but the labret feels a bit better and fits through a wider variety of mounting hole types.
Firmware
I can only speak to the ZMK side of things, where really my only advice is read Kim's driver's README and test with the accompanying example zmk-config with the pre-built firmware. Those docs are beyond awesome, and there's really nothing for me to add there.
What's doubly amazing here is that the trackpoint driver is written as a module, so it isn't like you need to maintain your own ZMK fork with the driver code, just use one of the (many well maintained) forks with pointing device support.
On the QMK side, PS/2 devices are supported, and I know of people who have gotten the RP2040 PIO driver to work, but I've not used it personally.
My builds
At this point, the details of my build are essentially just a footnote, but:
- the first is a vulpes minora where I had plenty of spare pins to choose from, so after adding 5 bodge wires, it was good to go. I did use a battpack to help with the wireless conversion (no longer needed on the latest revision) of the keyboard, and Kim's trackpoint keycaps library to properly generate keycaps with a TP cutout
- the second is a swweeep, and the main thing I wanted to prove out was the convenience of repurposing a nice!view footprint for the trackpoint. They both require 3 GPIO, ground and power, so it was a natural fit. With this, I don't need additional bodge wires on the PCB side, just a way to plug into the available footprint. I did it by installing the regular nice!view sockets, then using angled pin headers so the trackpoint's dupont connectors lay flat nicely over the mcu.
Resources
- Kim's ZMK trackpoint driver if you are only going to click on one link, this is the one. Their collection of resources is comprehensive, even if you aren't planning on using ZMK.
- deskthority reference for trackpoint pinouts
- joric's trackpoint wiki
- TPS42 as an example of a PCB design that integrates a trackpoint if you want to go that route
Random supporting things:
- battpack to nicely convert a wired board to wireless
- Kim's trackpoint caps and tp extension libraries for 3d printing
- trackpoint vik module which you can use as a breakout board if you don't want to solder directly to the trackpoint
- wolfwood's trackpoint caps and tp extension libraries for 3d printing
There's so much more that I could dump here, but realistically you can probably get to all of it by reading Kim's README and joric's wiki.
If you made it all the way down here, then thanks for reading (or even just scrolling), and hopefully I've convinced at least one person to try out adding a trackpoint to their next build.
Published on Mon 12th Aug 2024. Featured in KBD #172 (source).