All posts
·3 min read

Windows Trackpads

A place for field notes, experiments, and the small lessons that do not fit in a project page.

Recently, having much more important things to do, I decided to work on a side project. I had forgotten my mouse at home the week prior, and trying to use CAD software with a trackpad was a nightmare. So instead of doing actual work, like calculus and physics, or even working on a grant proposal for my ARC robotics team, I decided to make my trackpad less shitty.

Observation

A while ago I opened up blender and use my trackpad as one does when not having a mouse. I noticed that the trackpad was surprisingly responsive with two fingers drags working diagonally mapped to orbit. Pinches were mapped to zoom, and shift + two finger drags were mapped to pan. This was a pleasant surprise, as I had expected the trackpad to be miserable to use. This sat at the back of my mind for a while, until I was on a 13-hour train (Toronto to New York) and I had Evan Yu's flipper with a IMU attachment. We decided to map the IMU to 3DConnexion SpaceMouse inputs. It worked quite well and it was surprisingly easy.

In a later CAD session, I remembered how the fake space mouse felt and was reminded of how the trackpad was surprisingly good in blender, so I decided to investigate the trackpad further. I found that the trackpad was actually quite good hardware and driver wise and through the Windows API we are able to extract the raw touch data from the trackpad in the form of a list of touchpoints. This is a list of all the fingers on the trackpad, and their positions.

Prototype

So I fed this info into codex and it eventually spat out a prototype that let me use my trackpad as a space mouse, moving the orbit controls that I loved from blender over to all CAD software supporting 3DConnexion devices. Over many prompts and iterations, I polished the prototype into a working application that I could use to work on my projects. Improving on blender, I added the ability to rotate the horizon, something we can't to in blender, but is quite useful in CAD software. As a side effect of my implementation, I also added the ability to use orbit/zoom, or pan/zoom at the same time, something that is not possible in normal blender.

I have not used the application much yet, but I am excited to see how it will improve my workflow. Go give it a try! TrackPad CAD is open source and available on my GitHub here