Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
I’ve been an unapologetic fan of the Lenovo “classic” 7 row keyboard in the ThinkPad X220 and have been using the external version of it ever since. This USB laptop keyboard chassis is called the SK-8855 which was manufactured in the late 2000s and early 2010s and is now essentially unobtainium from everywhere. The SK-8855 features a TrackPoint but lacks a trackpad – which is actually a feature for me. It’s rarely available on eBay as new-old stock for several hundred dollars. Over the last 10 years I’ve replaced the keyboard several times due to literally wearing it out, and finding genuine NMB replacement keyboards is getting harder and harder — but not impossible.
For the last 10 years I’ve dealt with a few little quirks. Sometimes the controller board essentially sh*ts itself and crashes, but it could always be coaxed back into life by removing and reinserting the USB-A plug. It’s also guilty of missing a quick left-shift press, so typing fast my sentences never get capitalized. Over the years a few people have commented on my lack of grammar skills and until very recently I had this controller board to blame.
After over 15 years of being blamed for all my typos, the controller board gave up completely. This gave me the “opportunity” to replace it with a modern converter board and bring it into the 2020s. A good analogy is putting a Tesla electric drive-train in a classic Ferrari with a blown engine.
This required removing some plastic supports, which made me feel like the worst computer peripheral conservator in existence. After removing the USB-C connector the new controller could be mounted and wired up to the existing USB wire.
In most part it worked as a keyboard, but was set up with the en_US keymap and didn’t do anything for the # key for instance. I ran the provided non-free win32 tool in Wine but that just showed some really tiny Chinese text. It also crashed a lot and I couldn’t work out the pinmap format that it was writing.
After being inspired by Christian, I asked Claude to analyse the updater binary and tell me what it knew, and after allowing it device access it essentially reverse engineered the hardware. I actually bought two new controller boards and so I was a little more comfortable letting Claude actually drive the keyboard itself — and every now and then it would ask me to press specific keys and tell it if certain LEDs were on or off. After a full day of Claude-ing (never leave a hardware geek alone with minimal chores for a weekend day…) I had two things:
xykbms-gtk is a GTK4 standlone version of the vendor tool that works in Linux using hidraw. Using this I could swap, remap and disable keys and change all the other parameters on the controller board. I’ve not submitted this to Flathub as it’s 80% AI generated and more than niche; if you’re soldering stuff into a SK-8855 then you’re more than qualified to do meson build. It does work remarkably well considering I had no kind of datasheet or firmware source code for the controller at all.
The other thing was a fwupd plugin for this new keyboard controller. I actually manually created the fwupd plugin template with lots of TODOs in the right place to define the structure and then pointed Claude at the protocol documentation it had created for the GTK4 tool and asked it to fix all the TODOs in the plugin. After another couple of hours of questions and verb-ing from Claude we had a fully functional fwupd plugin that could not only update the firmware on the controller but could also write a “pinmap” that could reconfigure the keyboard between en_US and en_GB etc. I think this worked so well because we have so many self tests and linters in fwupd; Claude was forced to do the right thing before it could even run git commit.
The keyboard pinmap wasn’t really a “firmware” per-se, so I then also got Claude to create a WriteBlob method that allows fwupd to write a raw payload on a CFI-type device. This will also be super useful in the future to flash SPI devices with the existing CH341a and CH347 plugins. This is only available for CFI flash devices and for users that authenticate with the admin password – for obvious reasons.
I then wrote the GNOME Firmware code to be able to flash a CFI image from the GUI. It’s not beautiful yet and we probably need a dedicated app, or a dedicated “mode” in gnome-firmware to make flashing CFI devices safe and easy. I’ll add a screenshot when I’m happy with the UX.
I’m using this keyboard right now, and maybe it can last another 15 years of abuse from me.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.