r/HHKB • • 8d ago • Heartwarming 3 Bravo 2

DMK – Open-source custom firmware for HHKB Classic, Hybrid and Type-S (ANSI/JIS)

Post image

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!

230 Upvotes

68 comments sorted by

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.

1

u/aroum2 7d ago

That's great to hear! Thanks for testing it on your Hybrid Type-S and confirming that calibration and SW6 recovery work!

Did you also reduce the heap size to 1 KB, or is your build still using the old settings?

If your implementation is stable, please consider opening a pull request! Screenshots of the VIA settings and a short description of how everything works would be really helpful.

I'd be happy to review it. Thanks again for your work and for sharing the results!

2

u/blandjelly 7d ago

No, the heap size is still 2kb. Flash is at 64 508 out of 65 536 B, so 1kb is left. I cloned the main branch so it might be using old settings. I did some tests using usb matrix scan and it looks solid. I still have one more feature in mind, but it should be done next week.

1

u/aroum2 7d ago

I'm actually surprised you had enough RAM for this! We're already pretty close to the limit.

It's great that your tests look solid. I'm looking forward to your PR and seeing what else you've planned. Thanks again for contributing!

3

u/23942 7d ago

How the heck did you get adjustable actuation point? I thought that was a hardware limitation of the switch?

6

u/aroum2 7d ago

Each key's signal is read through an ADC. There's a range of roughly 2,000 ADC values between a fully released and fully pressed key, so we can use those readings to adjust the actuation point in firmware.

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

3

u/aroum2 6d ago

Thanks for the kind words! And yes, full calibration after flashing is important, especially on the Hybrid.

As for Grave Escape, I don't want DMK to turn into another monster like QMK. I'd rather keep the core small and simple.

You can easily implement this behavior using DMK's module system. If you implement it as part of the HHKB module, feel free to open a PR. I'd be happy to review it!

2

u/aroum2 5d ago

1

u/SandwichEducational8 5d ago

Oh snap! Thanks for creating this so fast! I will try it out

5

u/spacoom 8d ago

Who is we?

6

u/aroum2 8d ago

u/SuperEnduro and I have been working on reducing the Hybrid's power consumption over the past few days.

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?

10

u/aroum2 8d ago

The firmware has been tested on both Classic and Hybrid, but I can't guarantee that the risk of permanently bricking your keyboard is zero.

You can make a full backup before flashing. I've included a backup and recovery guide in the documentation:

https://github.com/aroum/dmk/blob/main/keyboards/hhkb/docs/en/backup-restore.md

Please understand that flashing custom firmware is entirely at your own risk. I take no responsibility for any damage to your keyboard.

1

u/mobility6601 7d ago

Cool. I might take a look

7

u/Dear-Regret-9476 hhkb pro hybrid 8d ago

I just installed it on my Hybrid and it's incredible

2

u/tosS_ita hhkb snow white limited edition 7d ago

What does it do for you?

2

u/tuxkids hhkb pro hybrid s 7d ago

What is the most beneficial thing you get after installing it?

6

u/Dear-Regret-9476 hhkb pro hybrid 7d ago edited 7d ago

VIA/VIAL

2

u/accdias 7d ago

Via/Vial: Yes. QMK: No. You get DMK :-)

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!

2

u/aroum2 7d ago

Unfortunately, battery reporting isn't much more detailed than in the official firmware. The Hybrid uses three hardware voltage thresholds rather than continuous battery voltage measurement, so DMK reports 100%, 15%, 5%, or 0%. The 100% value just means the battery is above the low-battery thresholds, not that it's actually full. You can also check the level using the orange LED.

And you're right about the Topre switches. They need power to detect key presses.

DMK handles this by briefly powering up the sensor circuit and scanning the matrix while sleeping. You can configure the scan rate from 1 to 10 Hz in VIA. At the default 1 Hz, you need to hold a key for up to a second to wake the keyboard. Higher rates make wake-up faster but may increase power consumption.

This is optional. If matrix wake is disabled, the keyboard goes directly to power-off and you use the physical power button to turn it back on.

More details are in the documentation:
https://github.com/aroum/dmk/tree/main/keyboards/hhkb/docs/en

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?

2

u/aroum2 7d ago

Yes, that's expected! The error appears because DMK starts running with a different USB ID, so the official HHKB Keymap Tool can no longer recognize it.

If the firmware flashed successfully, you don't need to flash anything else.

To use VIA:

  1. Download via.json from the release page.
  2. Open https://usevia.app/ in Chrome or Edge.
  3. Go to Settings and enable Show Design tab.
  4. Open the Design tab, click Load Draft Definition, and select via.json.
  5. Connect your HHKB over USB and authorize it in VIA. It should appear as HHKB Professional.

I'd also recommend running a full key calibration after installation.

The documentation covers all of this step by step:

Installation: https://github.com/aroum/dmk/blob/main/keyboards/hhkb/docs/en/install.md

VIA setup and calibration: https://github.com/aroum/dmk/blob/main/keyboards/hhkb/docs/en/via-debug.md

2

u/schittstack 7d ago

Yeah, I downloaded and did the draft definition part too, but VIA still isn't recognising it as a HID device. Is there a way to check if DMK was successfully installed?

2

u/aroum2 7d ago edited 7d ago

Did you make sure SW6 was OFF before flashing?

If DMK is running, the HHKB Keymap Tool will no longer recognize the keyboard. This is expected because DMK uses a different USB VID/PID.

Please connect the keyboard via USB, not Bluetooth, and check whether it appears as HHKB Professional with VID/PID CAFE:4014.

You can check the USB device information in Chrome:

chrome://device-log
chrome://usb-internals

Or use your operating system's USB device tools.

If you still see VID 04FE, the keyboard may still be running the official firmware or be in Bank 1 recovery mode.

Please share what you find and which operating system you're using. That should help us figure out whether DMK was installed successfully.

1

u/StrikeExact3588 7d ago

Does it support the types with 30g pressure?

1

u/aroum2 7d ago

Yes, it should be supported. The documentation lists the PD-KB800WSC1 as an HHKB Hybrid Type-S 30th Anniversary (ANSI).

You need dmk-hhkb-hybrid-ansi.bin from the release and the official HHKB800_FW_A048.hfb. Use the HTML patcher to combine them.

I'd recommend checking the supported models documentation before flashing. It includes the model numbers and testing status:

https://github.com/aroum/dmk/blob/main/keyboards/hhkb/docs/en/models.md

1

u/va_mario_256 7d ago

Does this support JIS layout?

1

u/aroum2 7d ago

Yes, JIS is supported on the Classic Type-S, Hybrid, and Hybrid Type-S. Just make sure to download the correct JIS firmware.

Supported models are listed in the release notes:
https://github.com/aroum/dmk/releases/tag/2026.11.22

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/aroum2 7d ago

Do you mean that selecting a Bluetooth profile through VIA works, but the stock Fn+Ctrl+1 shortcut does nothing? DMK uses dedicated BT Select 1–4 keycodes, which you can assign to keys on your Fn layer in VIA.

1

u/thomasboleyn hhkb pro hybrid s 7d ago

Thanks for the reply. I wrongly assumed the standard HHKB shortcuts would carry over. I've assigned them in VIA and all is well!

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/aroum2 6d ago

Thanks for testing both the Classic and Hybrid Type-S! I'm really glad everything works well, including the HTML flashing tool.

And yes, I'm definitely interested in your Corne port! I'd love to see it.

DMK already has a layer LED module for the Kabarga keyboard that might be useful as an example:
https://github.com/aroum/dmk/tree/main/keyboards/kabarga/modules/layer_leds

You can also keep your keyboard configuration and custom modules in a separate repository, without modifying the DMK core.

Module documentation:
https://github.com/aroum/dmk/blob/main/docs/en/modules.md

Configuration repository template:
https://github.com/aroum/dmk-config-template

There's also a guide for building firmware automatically using GitHub Actions:
https://github.com/aroum/dmk/blob/main/docs/en/build.md#automated-build-in-custom-repository-github-actions

1

u/accdias 6d ago edited 6d ago

I will take a look on those documents.

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/aroum2 6d ago

Yes to all three questions. In fact, the supported models are listed right in the title of the release.

Both the Classic and Hybrid Type-S are supported. No disassembly, soldering, or hardware modifications are required. You can also restore the original firmware if needed.

As for features, Bluetooth is supported on the Hybrid, but the official HHKB Keymap Tool doesn't work with DMK. Instead, you can use VIA or Vial for configuration.

The release notes and documentation cover supported models, installation, limitations, and recovery in more detail:

https://github.com/aroum/dmk/releases/tag/2026.11.22

https://github.com/aroum/dmk/tree/main/keyboards/hhkb/docs/en

1

u/areyouhourly- hhkb pro hybrid s 6d ago

Thanks!

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/aroum2 6d ago

I hadn't seen that comment! I rarely visit r/MechanicalKeyboards, I'm more of an r/ErgoMechKeyboards person. 

I'm really glad I could help you get closer to your endgame keyboard. Thanks for the kind words!

1

u/the_stage_manager 6d ago

Ah, interesting stuff. I have thought about an Alice-HHKB from time to time.

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/aroum2 5d ago

1

u/ubrutisimus hhkb pro hybrid s 4d ago

i did see as a limit before but didn't understand if there's any workarounds I could do get back the functionality

1

u/ubrutisimus hhkb pro hybrid s 4d ago

nevermind seems to work with any key and 0x80 etc

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/aroum2 5d ago

Thanks for reporting this! I fixed the modifier-side conversion bug in the dev branch on November 23, 2026, in commit e1213f98:
https://github.com/aroum/dmk/commit/e1213f989b58c1444c254ea2ae837b35081e63dc

That fix isn’t included in the release you’re using. However, I also found a separate issue affecting MT(MOD_RCTL, KC_APP), which still needs fixing in dev.

1

u/the_stage_manager 5d ago

Ah, neat! I'll keep an eye on the updates then. Thanks again for all your work on this!

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.

2

u/aroum2 4d ago

Thanks! I'm glad you're enjoying DMK on your Classic!

Unfortunately, the Realforce R1 and R2 can't be flashed over USB. That became possible starting with the R3, which has hardware somewhat similar to the HHKB.

If someone provides a complete hardware schematic and is willing to test and debug the firmware using SWD, I might consider supporting the R3.

But I don't really have a goal of porting DMK to every keyboard out there, especially models I don't own. That would take far more time than I can dedicate to the project.

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.

2

u/thomasboleyn hhkb pro hybrid s 7d ago

This firmware allows you to do that. It's awesome!

3

u/chikamakaleyley 7d ago

I think this is grounds to be knighted

2

u/chikamakaleyley 7d ago

er like Time Magazine POY

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/SuperEnduro 7d ago

I also have a Realforce R2. I can do some exploration to see how feasible a port is, should hopefully be easier than the hybrid!

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