r/HHKB
•
u/aroum2
•
8d ago
•
3
2
DMK – Open-source custom firmware for HHKB Classic, Hybrid and Type-S (ANSI/JIS)
I'm happy to announce a new release of DMK, an MIT-licensed custom firmware for modern HHKB Professional keyboards.
DMK runs on the original controller. No hardware modifications, soldering or keyboard disassembly are required.
Supported keyboards:
- HHKB Professional Classic (ANSI)
- HHKB Professional Classic Type-S (ANSI/JIS)
- HHKB Professional Hybrid (ANSI/JIS)
- HHKB Professional Hybrid Type-S (ANSI/JIS)
Main features:
- VIA and Vial support
- Rapid Trigger and adjustable actuation point
- Individual key calibration
- Configurable matrix scan rate up to 1000 Hz over USB
- Fixed matrix scan rate of approximately 92 Hz in battery-powered Bluetooth mode, matching the official firmware
- Multiple layers, Mod-Tap and custom keycodes
- Bluetooth support with four profiles
- Configurable sleep, matrix wake and power-button actions
- Battery level and configurable LED indicators
Hybrid power consumption
A lot of work has gone into Hybrid power management. We've managed to get power consumption close to the official firmware. Power-off consumption is now just 0.21 mA on the tested keyboard.
Sleep with matrix wake also supports a configurable scan rate from 1 to 10 Hz, allowing you to choose between faster wake-up and lower power consumption.
Why does the Hybrid require firmware patching?
Unlike the Classic, the Hybrid has two microcontrollers: an STM32L072 for keyboard operation and a Nordic nRF52832 for Bluetooth.
The official firmware update file contains firmware for both chips. DMK replaces only the STM32 firmware and communicates with the original Nordic firmware over SPI.
Since the Nordic firmware is proprietary, I don't distribute it with DMK. Hybrid users need to download the official firmware and patch it locally using the DMK binary.
I've developed a standalone offline HTML patcher to make this process simple. Everything happens locally in your browser, and there is no need to install Python. The original Bluetooth firmware remains unchanged.
Classic users can simply download the ready-to-flash HFB files.
Installation and documentation
The documentation has been updated and now covers installation, configuration, calibration, recovery and other technical details.
Please read the installation guide, use the latest VIA JSON file, and perform a full calibration after flashing.
Special thanks to u/SuperEnduro for extensive Hybrid testing, power consumption measurements and reverse engineering, and to u/guyguilty for testing the Classic.
Download: https://github.com/aroum/dmk/releases/tag/2026.11.22
Documentation: https://github.com/aroum/dmk/tree/main/keyboards/hhkb/docs/en
Source code: https://github.com/aroum/dmk/tree/main/keyboards/hhkb
Feedback, suggestions and bug reports are always welcome!
3
u/blandjelly 7d ago
This is fantastic, works great on my hybrid type S after doing the calibration. Firmware reset also works fine using SW6.
You could implement per-key rapid trigger and actuation point settings, it would be useful for fps games. I managed to vibe code it with Claude, 1KB of flash left after implementation. I could open a PR if you dont mind.
3
u/23942 7d ago
How the heck did you get adjustable actuation point? I thought that was a hardware limitation of the switch?
3
u/SandwichEducational8 6d ago
Thanks so much for creating this. This covers the only weak point HHKB had - Firmware. I think one of the caution for HHKB hybrid users (although it is already in the documentation of DMK) is that once flashed, you do need to calibrate all keys otherwise some keys might not even work while Via testing.
Do you plan to implement the grave escape? I see it's not supported
5
u/spacoom 8d ago
Who is we?
21
u/stalkingnite hhkb pro hybrid 8d ago
This is the coolest post I’ve seen in this sub since I joined ~4 years ago. I’m going to try this instantly
3
u/mobility6601 8d ago
What is the odd of permanently bricking my keyboard?
7
u/Dear-Regret-9476 hhkb pro hybrid 8d ago
I just installed it on my Hybrid and it's incredible
11
u/Gas_Pedal_6700 7d ago
Congrats on the work here.
Something to consider for future releases.
For Mac users, only Apple and I believe Matias keyboards can send keyboard inputs to the login screen on reboot over Bluetooth when FileVault is enabled. I think Matias spoofs the MFG identifier to do this.
For Mac users with Hybrids, it would be useful to gain this functionality and not have to temporarily plug in w/USB on system reboot.
1
u/Fbar123 7d ago
This is absolutely awesome! Thanks for your efforts!
Does this firmware report a more detailed battery level (I think the official goes from 100% to 20% to 5% if I remember correctly?)
Oh, and how does the custom wake buttons work? I thought that the Topre needs a separate wake button because the switches need power to register keys?
Thanks again for your work, this is a very cool project!
1
u/schittstack 7d ago
I flashed the dmk file via the hhkb keymap tool, and got the error message like I was supposed to, then what? Should VIA start recognising the board or is there a different step that I need to take?
1
u/StrikeExact3588 7d ago
Does it support the types with 30g pressure?
1
u/va_mario_256 7d ago
Does this support JIS layout?
1
u/thomasboleyn hhkb pro hybrid s 7d ago
This is great so far on my Hybrid. Only issue is that I can't seem to get it switch from wired mode to one of the saved BT profiles. fn+ctrl+1 is not doing anything. I can only entering pairing mode and switch profiles using VIA.
1
u/accdias 7d ago
Tested on both my Classic and Hybrid Type S. Works like a charm, and the new HTML flashing tool is realy something. Thanks for your work on this.
BTW, I have a DMK port working on my X.Tips v4a Corne with RGB breathing effect and layers indication. Let me know if you are interested.
1
u/areyouhourly- hhkb pro hybrid s 7d ago
Hi, does this work on the default hhkb classic and hybrid type s? Do I need to open and modify anything to install it? Are you able to restore the original firmware if you need to?
Also are there any features from the original firmware that don’t work?
1
u/the_stage_manager 6d ago
My friend, do you see this comment (https://www.reddit.com/r/MechanicalKeyboards/s/jvjR2ovjce)?
YOU 🫵 have gotten me closer to an endgame keyboard than I've ever been. Now I can put my EC parts kit to use in adapting the HHKB over to MX-mount sliders and I'll be more or less there for all intents and purposes.
Metal standoffs would've been a nice get; but for the functionality you've just added to the board, it'd be worth it to just buy a fresh one and keep this as a tester/backup for different domes, then just take apart the new one once to do the final build.
Thanks for the amazing work on this!
1
u/Upstairs-Sweet442 the photographer 5d ago
Absolutely brilliant work <3, thank you! Only wish: Grave Escape support. My Esc` key keeps ghosting me :\
1
u/ubrutisimus hhkb pro hybrid s 5d ago
just installed today, very smooth installation, no issues. media controls only work via USB , is there a workaround to get them working on bluetooth as well ?
1
u/the_stage_manager 5d ago
Have you noticed anything like this?
I originally wrote this key to be MT(MOD_RSFT, KC_RGUI), but it seems to have expanded out to include both shift keys. I can correct it by re-writing the key, but that doesn't seem to stick (I haven't quite figured out when it re-writes just yet).
Seeing a similar sort of behavior with MT(MOD_RCTL, KC_APP), but in that case it seems to be morphing into LM(11, MOD_LCTL | MOD_LALT).
Not sure if there's some sort of bug there, or if you might have any ideas about what's going on.
Thanks!
1
u/EnterAnsiMan hhkb pro classic 4d ago
Thank you so much. My HHKB Pro Classic 2025 can do a lot of things with VIA 😂💐💐💐
Hope you will develop fw for Realforce R1 R2 TKL.
3
u/kayk1 7d ago
Full key customizations?! I hate how the default firmware doesn’t let me change the default fn key etc. can’t wait to try. Thanks.
3
u/chikamakaleyley 7d ago
I think this is grounds to be knighted
2
u/distilled_mojo 8d ago
This looks very nice, thank you.
2
u/xrabbit hhkb pro hybrid s 7d ago
great work, this is the only thing hybrid is lacking - good programmability
1
u/ChunK2405 7d ago
I’m wondering any chance you have plan for Realforce in the future. Really insane work right there huge huge kudos!
1
u/wizware 7d ago
I now deeply regret selling my hybrid a year ago because I hated the stock firmware. The number one thing about it that pissed me off was how sleep worked.
1
u/elihuelihuelihu 6d ago
Massive congrats and thanks! Can't believe I'm using VIA on my hybrid!
0
u/guyguilty 7d ago
Hot damn, you're on a roll