jonathan warykowskijwarykowski

Building keybars Pro: where it's at

· 4 min read · series: keyboard · #keybars #moonlander #go #wails #svelte

keybars turns a keyboard’s backlight into a music equaliser, once you’ve installed cava, switched on Keymapp’s API and, on a Mac, routed the sound through BlackHole. keybars Pro is the same idea as a desktop app with nothing to set up. It’s launching soon and it’s at v0.6.0 for testers, so this is a snapshot of where it’s at.

What works

The app records what the computer plays itself (the PipeWire or PulseAudio monitor on Linux, a Core Audio process tap on macOS), drives ZSA boards over USB with the raw HID protocol Keymapp speaks, and reaches most other per-key RGB keyboards through OpenRGB. Open it and the bars play.

Music turned out to be the start. The keyboard is in front of me all day, so the app grew modes that layer over each other:

There’s a marketplace for looks, rule packs and maps, and a keybars-pro command for everything the window does. That’s how my herdr plugin turns a key amber when the agent in that workspace is blocked:

keybars-pro play ambient
keybars-pro timer 25m deep work
keybars-pro alert build failed

Harder than it looked

LED numbering, again. The free version learnt the hard way that Keymapp numbers keys differently from the firmware. Pro talks to the firmware directly, so it needed the firmware’s numbering after all, and every map got redone. This week the window’s preview started drawing each board’s real shape from QMK’s own definitions, and a test checks that every key of every built-in map sits where QMK says its LED is.

USB that comes and goes. My Moonlander drops off USB now and then (a cable or power saving, I haven’t worked out which). If the app quit in that gap, the keyboard was left frozen on the last frame of the bars. Now quitting reconnects for up to three seconds to hand the keyboard back to its layout.

A webview isn’t free. I profiled the app with perf on a busy machine. The Go side (audio capture, an FFT and painting the keys) costs about 6% of a core. The window’s preview, redrawn 30 times a second, costs nearly three times that in WebKit. So a window closed to the tray now gets no preview at all, the preview halves its rate when the computer is busy, and the app runs at low priority so a build always comes first.

Signing as one person. The Mac app is signed and notarised as an individual developer; the pipeline is ready and waiting on Apple’s certificate. Signing for Windows costs more than I want to spend before anyone has bought a copy, so the Windows download is unsigned for now and SmartScreen will warn about it.

What’s left before launch

After launch

Action keys. Right now a lit key only tells you something. Next, the app edits the keyboard’s layout and builds its firmware, so pressing the lit key does something: go to the waiting agent, open the failed run, snooze the alert. The build service is running and the layout editor is in progress, starting with ZSA boards.

If you’d like the founder price, the waitlist is on keybars.app/pro. The app is free with the essentials, and a licence is US$29 once.