Thinkpad keyboard mod (super early stages)!

@nrp I hope something similar will be posted for the Framework 16? I think Harley has a Framework 13, but I’m holding out for a 16 :slight_smile:

Those hinge drawings for the 13 look pretty reasonable, though. I don’t have a 13 in hand so I don’t have the full context needed, but assuming that the hinge “main part with spring” is in the base, and the “L part” is in the screen, it looks like all that would be necessary to gain another millimeter in clearance is to drill out the two rivets attaching the “L part” and attach a new “L part” with a short leg which is another 1mm longer.

To get a rough ballpark I extracted the existing “L” from the STEP file for the 13 using freecad and submitted it to JLCPCB for quotes both CNC machined from aluminum as well as 3d printed in stainless steel. They want only $8 (+$1.50 s/h) to print the right side L from 316 stainless; or $10.80 (+$1.50 s/h) to CNC machine it from Aluminum. So say ~$20 to print or machine both sides. That seems reasonable!

Probably the hardest part for the home hacker is going to be attaching the new L to the existing hinge piece. I’ve got a couple of ideas here: (1) printing the new “L” with protruding “rivet” pins already integral, and then using a ball peen hammer to deform them in place and then grinding flush with a dremel; (2) brazing or soldering; (3) using soft copper rivets and a hammer.

This is a little more involved than simply swapping a keyboard out, but still seems within reach of anyone with a drill and a hammer.

3 Likes

Putting a few links here that might be useful to others following in these steps:

  1. There are some tools to help make reverse engineering an existing keyboard’s matrix easier. Simple tool for reverse engineering key matrices | Evan's Techie-Blog is the basic idea (just an automated continuity tester between one pin held low and all other pins configured as pull-up inputs), and GitHub - Fordi/Keyboard: Teensy LC / Teensy 3.2 keyboard decoder sketch and GitHub - thedalles77/USB_Laptop_Keyboard_Controller: Details for building a USB keyboard and touchpad controller from an old laptop. provide more details instructions and code. These assume you’re using a Teensy, but I’ll probably port some of these tools to the RP2040.

  2. https://www.reddit.com/r/thinkpad/comments/xrhkgv/pinout_of_modern_thinkpad_keyboard/ has a link to a portion of a thinkpad E14 Gen 1 schematic. That’s not going to line up directly with any other keyboard, but I’d expect the basics to stay the same: dedicated lines for touchpad buttons, and leds, with about 18 “drive” lines and about 8 “sense” lines. My X1 Carbon Gen 10 keyboard has 45 pins at 0.3mm pitch, which ought to mate with this connector (also available for assembly on JLCPCB), and the back of the keyboard helpfully labels a few pins on an internal flex cable as GND, BL_DET, PWM, BL_5V, T1, T2…, T10, and VCC33. BL_DET is “backlight detect”, I suspect, “PWM” is probably to allow dimming the backlight, and “BL_5V” is (I’m guessing) a 5v supply for white backlight LEDs, in what otherwise is a 3.3v setup. There are 10 traces on the flex cable coming from the trackpoint, so I strongly suspect that T1 - T10 are trackpoint related. That matches up with the 10 signals listed as coming from the trackpoint module on Sprintek’s datasheet.

  3. A few more related projects: GitHub - hamishcoleman/thinkpad-usbkb: Experimental hardware to convert thinkpad keyboards to usb has some more thinkpad keyboard pinouts; GitHub - moduloindustries/thinkeys: Split ortholinear custom replacement keyboard with TrackPoint for ThinkPad laptops. is a retrofit keyboard for thinkpads. Both are primarily useful mainly for getting ideas about how other thinkpad keyboards work, in case we get stuck when reverse-engineering part of the keyboard pinout.

5 Likes

teriffic link-collection, looking forward to find time to dive into and experiment.

i would like to add another link: GitHub - Captain-Pumpkinhead/Framework-13-Vanilla-Reconstruction: The intention is to reconstruct every physical part of the Framework laptop, so that this repo can be used as a resource to begin mods from. It forks from Framework's Mainboard and ExpansionCards repos.
Someone remodeled the Framework 13 and took a lot of pictures. nice reference for people who dont have a machine on hand yet.

and, i got a drill and a hammer keyboards and rp2040, so i’m almost ready! :wink:

4 Likes

I’ve sent my own dev board off to JLCPCB to be fabbed:

So now @Harley_Godfrey has his T480s dev board and I’ve got an X1 Carbon Gen 10 dev board going. :slight_smile:

6 Likes

Thanks C_Scott_Ananian for the links. I’m starting to do some work with the T410 keyboard (initially starting off with just making a USB keyboard/Trackpoint controller running Vial-QMK on an RP2040, and later designing the custom CNC lower chassis for the Framework 13 that would be required to fit the T410 keyboard).

I’m leaning towards using the T410 keyboard (well, the T400s/T410/T410s/T420/T420s/T510/T520/W510/W520/X220/X220T keyboard) as it’s 7-row and non-chiclet, but not as hard to obtain as the T25 keyboard. If I’m going to go through all this trouble I might as well go for the best Thinkpad keyboard ever made. The main downside is no backlight, and it being relatively thick.

I can verify that that while not the official connector (JAE AA01B-S040VA1-R3000, which is out of production and difficult to source), Molex SlimStack 0543630489 does seem to fit my particular T410 keyboard, and it appears it can be used as a substitute. Unfortunately JLCPCB doesn’t have it, but I can hand solder it. The later keyboards (T440 and later) appear to use a FFC/FPC connector which should be a lot easier to source.

For CNC services I would consider emailing a formal machine shop like SuNPe or Lucent Mfg. My friend had pretty bad experiences with CNC services from PCBway. I’m nowhere near there yet though, as designing a chassis is going to be a lot of work and a ways away.

2 Likes

Actually, for the Thinkpad T410/etc. keyboard the RP2040 is cutting it very close for GPIO (24 matrix pins, 1 pin for the Fn button, 3 for Trackpoint, and 1 for the Caps Lock LED, for 29/30 GPIO pins). The power button and power light can presumably be done directly to the Framework motherboard, and I can’t light up the volume or mic LEDs easily through QMK.

I’m also considering doing the STM32F072 instead (which offers 37 GPIO pins on the 48-pin variant), as I’ve designed keyboards with that one before, though the Trackpoint support on the STM32F072 might not be as good in QMK (the RP2040 has a PIO driver available in QMK)

1 Like

This just anecdotal, but I’ve had no problems with jlcpcb CNC services: they’ve done a number of projects of mine. If I remember correctly, pcbway did This Smart Watch Keeps An Eye On Ambient CO2 Levels | Hackaday for me, and I did have an issue with a “floating” quote (ie, the actual price doubled once a real machinist saw my files), but jlcpcb’s quotes have been solid. I’ve also had good experiences with oshcut.com for sheet metal cutting/bending.

I have thought about pin count on the rp2040 (29 gpios) versus the size of the keyboard connector I’m looking at (45 pins). That’s the reason I went with headers on my dev board, so I can jumper things around to access every pin for reverse engineering even if I can’t drive them all at once. For the “real thing” I expect I’ll probably need more gpios, and in the qmk community that seems to be most often done in a “split” setup with two rp2040s. That seems reasonable, rp2040s are pretty cheap. Part of the reason I laid out my own dev board is to get some experience fabbing an rp2040 board from scratch – the better to clone that into two for the “real thing”.

The other things worrying me are some 2mm brass “mounting” studs on the bottom of the X1 Carbon keyboard that I’m going to have to get rid of somehow, and the fact that the button assembly overlaps with the lower input module mounting rail in the framework 16, and I’m having a hard time visualizing whether the overlap is going to be problematic. A STEP file of the input module area of the framework 16 laptop would help a lot in terms of test fitting components.

I had an x220 and fondly remember that keyboard. In fact, it’s probably sitting in a closet somewhere. If we’re resigned to hinge mods for thickness, then maybe I should take another look at using one of the thicker ThinkPad Keyboards. Wouldn’t hurt to dig out my x220 and take a look. Subjectively, the trackpoint quality on newer lenovos seems to have declined, and my t460p has never felt quite “right”. In fact, a replacement keyboard i ordered enumerated the trackpoint as “Generic PS/2 Mouse” (instead of “TPPS/2 Trackpoint”) and I had to do some surgery to transplant the trackpoint from my older keyboard to make it behave. It would be orthogonally interesting to me to resurrect some of those older keyboards over USB just to be able to do a head to head trackpoint comparison.)

2 Likes

Guess I’m joining the dev board party.

7 Likes

Oh wow, I’m definitely going to be following this thread! I’ve got a FW16 coming (batch 12), so it’ll be a bit before I can even contemplate this, but very, VERY cool. And very happy to alpha/beta test things on the FW16, although I think it might be more challenging since it those pogo pin connector things.

2 Likes

I admire the effort put into this project, but from following various keyboard customisation efforts which have all failed due to the depth constraint have concluded that input customisation is not something that Framework design really lends itself to. I cannot help but think the forthcoming MNT Reform Next would be a better candidate for such projects. Whilst less bulky than the traditional design, the depth of the keyboard is sufficient for mechanical switches.

It is not shown with a pointing stick but is still in the prototyping stages, so there is a possibility such a feature might be added at this stage if enough people demand it.

The Reform products are already discussed on the forum here and here.

2 Likes

Thanks David, MNT Reform Next looks great!

2 Likes

Yeah, the MNT Reforms are pretty awesome, although for myself I’m willing to make a few compromises for a more streamlined package like Framework offers, rather than something quite so chunky. Although they do have the better part of the 90s sturdy laptop look, rather than the 00s cheap crap consumer look.

2 Likes

Upthread I worked out some of the details needed to shim the hinge to allow more height and I think it’s reasonable. Agreed that the depth constraints are very challenging but I think there’s a reasonable way around that.

1 Like

Board arrived and RP2040 works (after a little bit of resoldering the USB-C connector, which wasn’t assembled quite flush). I’ve got the basic matrix mapped out with the help of a little circuit python script running on the rp2040. The next step is to figure out the LEDs and the trackpoint.

8 Likes

Making decent progress on the pinout:

For some reason I can’t figure out how the FnLn, Mute, MicMute, and CapsLock LEDs are driven. The diode checker on my multimeter doesn’t show any obvious suspects, and driving the unassigned pins high or low doesn’t do anything. :frowning:

2 Likes

If you can find the schematic for the laptop it goes into things like this get a lot easier

Edit: I did find a jaguar 2 schematic floathing around on the internet but the keyboard connector on that thing is like 45 pins not just 20 so not sure I got that right.

1 Like

So referencing back this, I’d REALLY appreciate it if you’d also evaluate if a standard pop-rivet size can be used as well. Some of us have the tool, not that it’s very expensive, and could use those as well. Or possibly make the interior threaded, and use some wide headed small screws? Ideally with some threadlocker of course.

This was good advice and I did find the schematic online after some digging. It turns out they are active low, but there’s a necessary 3.3V power connection I hadn’t previously identified. Anyway, I understand the purpose of all the pins now, it’s just a matter of building an appropriate QMK against my prototype – and then probably doing a rev 2 of my board with everything neat and tidy (and an MCP23017 I/O expander to handle the 16 DRV lines). Maybe I’ll try to include the appropriate pogo pin connector for the Framework 16 Input Module, although without better docs on the exact mechanical specs, I can’t pretend that it would drop in and Just Work. As mentioned above, with the built-in mouse buttons, the X1 Carbon Gen 10 keyboard exceeds the height of the keyboard module by 21mm, so this would be a “double height” replacement that would replace the touchpad module as well – and the touchpad module specs haven’t been published yet. But with a pogo pin connector maybe I’ll qualify for the Input Module developer program. :slight_smile:

(What would actually be most helpful is a STEP file of the entire chassis top, minus the modules. I don’t need assemblies or details, just the location of any protrusions, etc, so I can slot in my own design in CAD and check for intersections, or print out a mock up and test fit things.)

3 Likes

This entire thread excites me, I’ll be keeping an eye on it

1 Like

I have very long ago outsourced storing my knowledge to the Internet :slight_smile: so I put trackpoint protocol “chx_” into Kagi and yeah I did post the protocol a few years ago: it’s PS/2.

https://reddit.com/r/thinkpad/comments/p4i52h/til_to_this_day_trackpoint_is_a_ps2_mouse/ links to IBM TPPS/2 TrackPoint which has a short list of ThinkPads using ps/2:ibm-000a-tpps-2-trackpoint.

1 Like