https://github.com/alonswartz/trackpoint Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} alonswartz / trackpoint Public * Notifications * Fork 20 * Star 335 How to integrate a trackpoint in a mechanical keyboard 335 stars 20 forks Star Notifications * Code * Issues 5 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights alonswartz/trackpoint This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/a] Use Git or checkout with SVN using the web URL. [gh repo clone alonsw] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @alonswartz alonswartz readme: added link in summary to tmk code tweaks ... 47da580 Apr 25, 2017 readme: added link in summary to tmk code tweaks 47da580 Git stats * 21 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time bin bin: helper script to parse markdown and generator table-of-contents Apr 25, 2017 datasheets datasheets: added teensy 2.0 pinout Apr 25, 2017 images images: added a few extra pics Apr 25, 2017 pinouts pinouts: initial import Apr 25, 2017 README.md readme: added link in summary to tmk code tweaks Apr 25, 2017 View code [ ] How to integrate a trackpoint in a mechanical keyboard Table of contents Target audience FAQ Q: What should I use for the trackpoint stem/stick? Q: How do I identify the trackpoint pinout? Q: Should I use busywait, interrupt or usart in TMK? What you need Steps 1. Solder leads to trackpoint 2. Create the reset circuit (RC) 3. Solder leads to reset circuit (RC) 4. Testing on a breadboard 5. Make trackpoint stem hole in case 6. Make space for trackpoint in keyboard 7. Test trackpoint clearance and stem length, glue stem 8. Solder reset circuit (RC) to teensy 9. Finish up 10. Update tmk_keyboard firmware and flash TMK firmware changes and tweaks README.md 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: * How do I identify the pinout of my trackpoint? * What should I use for the trackpoint stem? * Will I need to ruin my keycaps to make space for the stem? * Can I use the same teensy to power both the keyboard and TP? * Can I use the TP and keyboard mousekeys concurrently? * Should I use busywait, interrupt or usart in TMK? * How do I build the reset circuit? * Will I have enough clearance inside the case? 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 * FAQ + Q: What should I use for the trackpoint stem/stick? + Q: How do I identify the trackpoint pinout? + Q: Should I use busywait, interrupt or usart in TMK? * What you need * Steps + 1. Solder leads to trackpoint + 2. Create the reset circuit (RC) + 3. Solder leads to reset circuit (RC) + 4. Testing on a breadboard + 5. Make trackpoint stem hole in case + 6. Make space for trackpoint in keyboard + 7. Test trackpoint clearance and stem length, glue stem + 8. Solder reset circuit (RC) to teensy + 9. Finish up + 10. Update tmk_keyboard firmware and flash * TMK firmware changes and tweaks 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!) * Relatively cheap. * Super strong (surgical steel, titanium). * Really thin in diameter (16G is perfect for between keycaps). * They come in different lengths (8mm to 26mm). * They have a flat bottom (great for gluing to TP). * They have a screw on top ball, in different sizes. 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: * The largest tracer is most likely GND. * The second largest tracer is most likely VCC. * Using a multimeter and the PTPM754 datasheet, test for connectivity: CLK (INT0) - PTPM754 pin 24 DATA (TXD/1) - PTPM754 pin 2 RST - PTPM754 pin 5 GND - PTPM754 pin 8 VCC - PTPM754 pin 22 * Alternatively, if you have a scope and know what you're doing: 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 * Keyboard with at least 6mm clearance between switch and base plates, depending on the trackpoint module height. * TMK_keyboard firmware source code and development environment. * Teensy 2.0 (pins D2 and D5 available for USART). * Trackpoint module (salvaged from old thinkpad or new tp keyboard). * Veroboard (for reset circuit). * Reset circuit components (4.7k resistors x2, 100k resistor, 2.2uF capacitor). * Stem for trackpoint (labret cheek piercing 16G). * Double sided tape (for testing stem lengths before gluing). * Glue (stem to trackpoint, I used Loctite super glue-3) * Cutting knife (x-acto, nt-cutter, japanese knife, etc.). * Sandpaper (extra friction to stem ball, smooth veroboard cuts). * Thin wire (I used wire wrap 30 gauge). * Wire cutter and stripper. * PCB drill / thin rounded file (to make a 1.2mm hole). * Insulation tape (prevent shorts, protect trackpoint circuitry). * Soldering equipment. * Multi-meter. * Patience. * Bonus: extra teensy and breadboard for testing. Steps 1. Solder leads to trackpoint * What you need: + Thin wire (I used wire wrap 30 guage wire) + Wire cutter and stripper + Soldering equipment + Bonus: helping hand * Cut and strip 5 leads. * Clean and tin the trackpoint pads to be soldered. * Use a helping hand to hold the leads on the tinned pads, and heat the stripped leads so they solder to the pad. 2. Create the reset circuit (RC) * What you need: + 4.7k resistors x2 + 100k resistor + 2.2uF capacitor + Veroboard + Cutting knife (x-acto, nt-cutter, japanese knife, etc.) + Sandpaper + Soldering equipment + Insulation tape * Cut a piece of veroboard (6x5 - the 5 is for rails) + Using the cutting knife, perform 5-10 cuts on both sides. + Using a little pressure, snap the board on the cut. + Use sandpaper to smooth out the cut edges. veroboard * Place the components on the veroboard, and solder + Resistors o Resistors don't have polarity, no need to worry. o Bend component legs, insert into veroboard. o On the back-side, slightly bend legs so components stay in position. o Use insulation tape to hold resistors in position if needed. o Snip legs (leaving about 3-5mm) and solder. o Snip the protruding legs for extra clearance. + Capacitor o Capacitors have polarity, usually marked with a minus (negative). o Positive leg must go in the VCC rail. o Insert capacitor legs partially, so it can be bent off the veroboard for clearance inside the keyboard case. o On the back-side, bend legs slightly so it stays in position. o Use insulation tape to hold capacitor in position. o Snip legs and bend negative over to 100k resistor pad, and solder. o Snip the protruding leg for extra clearance. collage-reset 3. Solder leads to reset circuit (RC) * What you need: + Thin wire (I used wire wrap 30 guage wire). + Wire cutter and stripper. + Soldering equipment. + Bonus: helping hand. * Solder trackpoint leads to reset circuit. * Cut, strip and solder leads to reset circuit that will go to the teensy. reset-underside 4. Testing on a breadboard * Insert teensy in breadboard. * Insert leads from RC into breadboard connected to teensy pins. * Update firmware to enable PS2 mouse and USART (see below). * Flash firmware to teensy, and test. breadboard 5. Make trackpoint stem hole in case * What you need: + PCB drill / thin rounded file (to make a 1.2mm hole). * Decide where you want the trackpoint stem - I prefer using my middle finger and have a row staggered keyboard, so I positioned it on the cross section between U/I/K (QWERTY layout). * Locate position for trackpoint stem, and scratch or mark the space available. * Remove the keycaps, make the hole (slowly and carefully), replace keycaps. * Test stem diameter in hole. Should be rigid with a slight amount of slack. collage-hole 6. Make space for trackpoint in keyboard * What you need: + Insulation tape. + Wire cutter. * Add insulation tape to trackpoint to prevent shorts. * Rewire diodes / column wires if needed for trackpoint clearance. * Trim switch legs if needed for trackpoint clearance. * Relocate D2 and D5 pins if they are already being used. collage-rewiring 7. Test trackpoint clearance and stem length, glue stem * What you need: + Stem for trackpoint (labret cheek piercing 16G, different lengths). + Double sided tape. + Glue (loctite super glue-3). + Sandpaper. * Remove red cap. * Stick a stem to trackpoint pointer base with double side tape. * Insert trackpoint with stem into hole. * Close case, flip keyboard, screw on stem ball, test. * Rinse and repeat for other stems until satisfied with length. * Remove double sided tape, glue stem. * Use sandpaper to roughen up the stem ball for added friction. 8. Solder reset circuit (RC) to teensy * Solder leads to teensy: VCC -> teensy VCC GND -> teensy GND CLK -> teensy D5 DATA -> teensy D2 inside-side-view 9. Finish up * Verify trackpoint is positioned squarely, and close case. * Screw on stem ball. top-side-view 10. Update tmk_keyboard firmware and flash * What you need: + TMK keyboard firmware and development environment. * Update firmware with PS2 mouse and USART support (see below). * Plug in keyboard, flash and test. TMK firmware changes and tweaks * Configure PS2 mouse and USART support: diff * Configure mousekeys: keycodes, keymap * Enable concurrent trackpoint movement and mousekeys: diff * Trackpoint polling interval delay for dropped key strokes: diff1, diff2 * Todo: auto-enable mouse-layer on tp movement. About How to integrate a trackpoint in a mechanical keyboard Resources Readme Stars 335 stars Watchers 17 watching Forks 20 forks Releases No releases published Packages 0 No packages published Languages * Shell 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.