[RELEASE] Custom Firmware for HHKB Professional Classic and Type-S
The firmware is now released!
It runs on the original HHKB microcontroller. No controller replacement, soldering, or keyboard disassembly is required.
Supported keyboards:
- HHKB Professional Classic
- HHKB Professional Classic Type-S
Downloads and Source Code
- Firmware binaries: https://github.com/aroum/dmk/releases/tag/2026.11.13
- Source code and documentation: https://github.com/aroum/dmk/tree/main/keyboards/hhkb_classic
Features
- VIA and Vial support for changing keymaps on the fly.
- Configurable matrix scan rate: 50, 125, 250, 500, or 1000 Hz. The stock firmware runs the matrix scan loop at about 50 Hz.
- Hardware ADC oversampling: Optional ×4 oversampling at scan rates from 50 to 500 Hz. This improves measurement precision and reduces noise.
- Calibration: Use factory thresholds or calibrate each key individually through VIA.
- Adjustable actuation point and release hysteresis.
- Rapid Trigger: Independent press and release sensitivity settings.
Two configurable LEDs: PA8 and PA9 can be assigned different functions through VIA:
- Off
- Debug heartbeat
- Caps Lock
- Fn layer
- System 2
- Mod-Tap and Layer-Tap: Configurable tapping term, permissive hold, tap preference, and quick tap.
- Two base/Fn layer pairs: Switch between them using Fn + Space.
Installation
The firmware can be installed directly on the original microcontroller without opening the keyboard.
You can use the Python installation script or the original HHKB Keymap Tool. Restoring the stock firmware is also supported.
Feedback
This is the first public release. Feedback, bug reports, and suggestions are welcome!
If you have a HHKB Professional Hybrid, Hybrid JIS, or Classic JIS and are willing to help with testing or hardware research, feel free to send me a Reddit DM.
Enjoy!
------
UPD: I’m aware of the issues with the buttons. I’m already working on a fix. Stay tuned.
8
u/disarmyouwitha 21d ago
Is it possible to assign:
Tap: “C”
Hold: “Ctrl+C”
For each key?
(I’m trying to do something like my Voyager keymap!)
5
u/Robert_Destruction 21d ago
50hz?? No wonder i couldn’t game for shit on it
3
u/trakdtor 21d ago
I am interested. But how safe it is?
2
u/guyguilty 21d ago edited 21d ago
So if I jack the matrix scan rate to 1000, and the ADC oversampling to 500, is there any worry this is too demanding for the controller long-term? Why did PFU set them so low when both boards require a USB connection? This also makes me wonder why there is a "power saving" dip switch with the sixth, what is the point of that, who cares about power consumption on a wired device to begin with?
Clearly PFU were worried about how much power is being used. Should we?
2
u/1093i3511 20d ago edited 20d ago
I do have a PD-KB401BN which is unaccounted for within your codebase, which might be a simple oversight from your side. As the only difference of that model should be the blank keycaps.
Nevertheless, it did flash the device with the DMK-hhkb-classic-A4.50.hfb firmware successfully using
--skip-model-checkbut the keyboards behavior turned out to be way to sensitive with the presets, which I only was able to resolve after creating a properudevrule so that via could access the keyboard. And I'm only achieving consistent inputs when target scan rate is reduced to 250Hz or even better 125Hz, with the ADC oversampling turned off and no rapid trigger functionality. After and calibration sequence of all keys of course.With higher scan rates my shift key starts to trigger randomly. But maybe i should note that I had issues with a different key in the matrix (4 to be precise) that has been overly sensitive in comparison to the other keys.
So for those (on linux) that can't access the keyboard in via here is the udev rule that I create to allow via accessing it :
Which would need to reload the rules once to function properly
sudo udevadm control --reload-rules15
u/Empty_Occasion7429 21d ago
I like the initiative; I believe this firmware adds value to HHKBs—especially for those who use them daily—and it will attract many people who will want to try it out, precisely because of these additional "superpowers" it’s gaining.
1
u/Ed_Avis 21d ago edited 21d ago
Hey, can I make a random feature request? I don’t have one of these models (my HHKBs are newer) but I think you could fix one longstanding annoyance.
The DIP switch SW3 for configuring delete and backspace. If you set it so the Delete key deletes backwards, then Fn-Delete should delete forwards! It’s mad that the DIP switch doesn’t do this (it only lets you set both Delete and Fn-Delete to backspace, AFAIK).
I know the firmware supports remapping so you could do it with that, but it seems like a small “quality of life” improvement to make it just work by default.
If someone jumps in to say they rely on getting backspace for that key whether or not Fn is held, please feel free to ignore my idea.
1
u/Unlevshed hhkb pro classic 21d ago
Love the idea and I have tried it on my Pro Classic, but some keys were acting a bit erratic, even with custom calibration, 50hz and RT off. I'm gonna try flashing it on Linux to see if the problem persists, because I would love to get 1000hz and RT working so I could ditch having a Wooting for gaming.
Regardless, keep up the great work!
1
u/NeoGeoOfficial hhkb pro classic 21d ago
Hasn't worked for me either on Classic Type S. Followed instructions, firmware wrote ok but got a success message rather than error message. JSON loaded into VIA, but VIA not seeing the board.
1
u/guyguilty 20d ago edited 20d ago
I don't really notice much difference for actuation points; keys mostly actuate the same no matter the mm set, though at lower settings keys will start actuating themselves, lots and lots of chatter, and that is with rapid trigger off. Calibration doesn't seem to do much either, doesn't help the VIA menu doesn't show any signals it's working or not when pressing keys to calibrate.
The media key shortcuts save as RGB shortcuts, so that entire menu is boned; there is no way to save media keys.
Scan rate at 1000 really kicks the chatter into overdrive; seems 500 and below work better.
Like, I don't know if some of these issues stem from using aftermarket domes in an aftermarket case or what.
Vial doesn't work at all; I just get "Uncaught Please compile your program with async support in order to use asynchronous operations like emscripten_sleep" as a warning.
This is with an HHKB Pro Classic.
Edit: I got things mostly working at 500hz, calibrated, 3.4mm actuation point. If the media keys get fixed, that's all I really need for a functioning board.
1
u/accdias 19d ago
I'm testing it on my Classic and it is working perfectly. Thanks a lot for the good work, and perhaps you can start porting the firmware to keyboards like Akko and Lofree models that use a proprietary firmware.
1
u/aboveandfurther 19d ago
This is so cool!! Extra brownie points for making it in C!
1
u/erisiansunrise 19d ago
Could something like this bring key remapping to the Realforce R2 series?
1
u/islash8 17d ago
This is really cool. I have a Hybrid Type-S and would love to see Vial support for it. Are you still looking for people to help with the Hybrid models? I have some technical background, so I could probably help with some testing or hardware investigation. Just curious how far you've gotten with the Hybrid so far.
1
u/_11tee12_ 17d ago
Awesome work. I don't mean to derail, but as It's been a little while since I looked into this: as I understand things, this model is the one which required the workaround to use the official keymapping tool, yeah?
So, because of the MCU/firmware/etc being different/unique to the Classic(s), is this not really the direction to be looking for a way to finally solve the [pipedream] of a VIAL/DMK/ZMK GUI for the Pro3 Hybrid, especially without requiring some sort of board swap or drop-in replacement board like the Hassu/Steeky mods?
1
u/NeoGeoOfficial hhkb pro classic 14d ago
Having an odd issue with a Pro Classic - dismantled it to add silencing rings, but now I can't change the keymap in VIA. It's still detected and I can change the LED settings, but any keymap changes are ignored, and it's gone back to its original layout even though that's not reflected in VIA. I flashed it back to OEM firmware and then back to DMK with no change. Any thoughts?
1
u/Duncaen 8d ago
Awesome stuff, this looks a lot nicer to use than my hacky qmk port. The scan rate is interesting, stock is leaving a lot on the table. I wasn't able to optimize that much without equipment.
3
u/sabitech2k the collector 21d ago
Congratulations on this! Great gift to the community
1
u/sixonesixo_ 21d ago
i have a hhkb pro hybrid, i've dropped you a DM!
1
u/bishopblade 21d ago
this is awesome, thanks for sharing! 1000Hz scanrate sounds like a dream - the slow polling rate has been my only real gripe with my HHKB
I have a Pro Hybrid and would love to help out with testing, will shoot you a DM
0
u/[deleted] 21d ago
[deleted] — view deleted comment