Close

A few very busy weeks

A project log for PolyKybd (Displays In Your Keycaps)

Freedom at your fingertip.

thpollthpoll 05/15/2026 at 13:160 Comments

Three repos, and a lot of commits. This one covers firmware, the polyhost software, and the font converter tool — all moving at the same time. Buckle up.

Firmware: RGB Matrix Keys That Actually Feel Good

This was just an annoying little detail I never had time to address: Holding the brightness or hue key now does what you'd expect: it repeats. There's a short initial delay before the repeat kicks in, and then it goes at a comfortable rate. The other change: adjustments no longer write to EEPROM on every single step. The save happens when you release the key. If you're holding it down, you're still deciding — no point wearing out the EEPROM mid-adjustment. With that, I introduced a wider EEPROM read/write cleanup. Only update what is needed, when it is needed :)

Firmware: Suspension Fix

This was the other little annoying detail: When suspending, the RGB matrix sometimes stayed on for the slave side (and also the status displays under some circumstances). I thought the logic was clear; however, I could only figure it out until I made a video of it. There, I could see that it did turn off, but just for the fraction of a second, and then turned on again. After realizing that the synchronization reset the flag again, the fix was also clear.

Adafruit-GFX-Library: Added HarfBuzz

As most readers of my posts know, I do use a modified version of the Adafruit-GFX-Library. The included fontconvert is the tool that converts TTF/OTF fonts into the C header format the GFX library uses for the keycap displays. Until now, each Unicode codepoint was rendered independently. That works fine for most Latin and CJK characters, but it falls apart for Arabic ligatures, Indic conjuncts, emoji sequences, and anything else where multiple codepoints combine into a single rendered glyph. 

HarfBuzz fixes this. You can now pass a sequence of codepoints, and the shaper figures out what glyphs they produce, handles combining and reordering, and feeds the results to FreeType for rendering. The output ends up correctly in the GFX bitmap format. This opens the door to a lot of new features. For example, I can now render country flags like Unicode country flags we know - in black and white, of course ;) Granted, it is difficult for some flags and impossible to distinguish all, but it is a nice touch. I still have to integrate that on the firmware side, but my excitement over this feature is really big. To make these flags visually appealing, there is now also an outline rendering, and all kinds of correction possibilities: Gamma, brightness, unsharp masking, ... all these new features were added with the help of AI coding. Here is the result:


PolyHost: Breaking Free From VIA

I already hinted that in the last post. Since QMK already split from VIA some time ago, I decided to support the dynamic layer setup with my host program. So, you can now change key assignments on the fly without VIA or VIAL (and, with that, I can update to future QMK versions more easily - no hop via the VIAL repository or adding some custom VIA stuff). I already showed it last time, but here is the basic working version: There is still work left for all the actions, like layer change etc. But I have a good feeling about it.


PolyHost: Unit Tests

Again, thanks to AI, I could create a big batch of new tests: device settings, key handling, overlay data, the keymap model, the KLE parser, and the Unicode cache all now have coverage. 

PolyHost: Caching Overlays and organizing in an MRU

This is also a feature I wanted to introduce for more than a year. Instead of transferring all overlay images again and again, I just store them once and later send a mapping telling the keyboard where to read the overlay from. So the host has to remember the same mappings and has to decide when to override overlays since the storage is limited, and that is why I use an MRU to make that decision. This feature needed quite some debugging — overlays kept showing up in the wrong places, but I have it now in good shape. It might still need a few fixes, but that is fine. The reason why I do this is that for the mappings, I only need to send 1 or 2 HID messages instead of 10+, avoiding a glitch in the keyboard input (which is the most important).

This time, the update was very technical on the software side. I hope you still enjoyed!

Thomas

Discussions