Home

Awesome

How to integrate a trackpoint in a mechanical keyboard

This is a summary of what I needed and learned while integrating a trackpoint into my custom built hand-wired split mechanical keyboard. It took quite a lot of research and planning, so I thought it would be helpful to others to create this guide.

final

Before starting this project, the main questions I had were:

There is a lot of useful information scattered around the deskthority and geekhack forums, and TMK issues, so I'm also including all the pinouts I found during my travels, datasheets, and TMK keyboard code tweaks. (Unfortunately I didn't take note of where I found the above mentioned resources, so I can't give credit where it is due, for that I apologize. I'll try retrace my steps, but if you can let me know, I'd be most welcome).

Thanks to hasu for his awesome TMK firmware, and the deskthority and geekhack communities - if you have posted something to do with a trackpoint, I've read it, and it most likely helped :)

Pull requests are welcome, especially new pinouts.

Table of contents

Target audience

It's hard to cover every use-case, keyboard and firmware so I'm limiting this for folks who have a hand-wired mechanical keyboard that uses a teensy (2.0) with TMK_keyboard firmware, and who want to integrate a trackpoint for just mouse movement (and take advantage of the keyboard for mouse keys).

That said, the information here should still be useful for others.

FAQ

Q: What should I use for the trackpoint stem/stick?

A labret cheek piercing! (yes, I know, weird, but it's awesome!)

I ordered a few sets of different lengths and different diameters (I wasn't sure if 16G would be strong enough - it is), as well as different ball sizes from ebay for relatively cheap.

My trackpoint pointer base sits flush under my 3mm switch plate, and with a cherry MX switch having a height 10.2mm above the switch plate, and about 1-2mm PBT cherry keycap on top, the 14mm stem with 3mm ball is kind of perfect.

For extra friction on the ball, I used some sandpaper.

stem

Q: How do I identify the trackpoint pinout?

With some luck, or a multimeter and a steady hand. (A scope would be better, but unfortunately I don't have one).

If you're lucky, someone has already identified the pinout of the trackpoint you have (see pinouts), or at least a similar one.

If not, you'll need to identify the pinout yourself, here are some tips:

CLK (INT0)    - PTPM754 pin 24
DATA (TXD/1)  - PTPM754 pin 2
RST           - PTPM754 pin 5
GND           - PTPM754 pin 8
VCC           - PTPM754 pin 22
CLK  - should have a frequency reading
DATA - should have a 5V reading
RST  - should have a 0V reading

Q: Should I use busywait, interrupt or usart in TMK?

As far as I know, USART is the recommended implementation, as it uses hardware for PS/2 signal receive.

You will need to use D2 (data) and D5 (clock) on the teensy though.

What you need

Steps

1. Solder leads to trackpoint

2. Create the reset circuit (RC)

veroboard

collage-reset

3. Solder leads to reset circuit (RC)

reset-underside

4. Testing on a breadboard

breadboard

5. Make trackpoint stem hole in case

collage-hole

6. Make space for trackpoint in keyboard

collage-rewiring

7. Test trackpoint clearance and stem length, glue stem

8. Solder reset circuit (RC) to teensy

VCC  -> teensy VCC
GND  -> teensy GND
CLK  -> teensy D5
DATA -> teensy D2

inside-side-view

9. Finish up

top-side-view

10. Update tmk_keyboard firmware and flash

TMK firmware changes and tweaks