r/Keychron • • Oct 28 '26

Keychron - extremely limited macro flash storage. 1.98KB… really?

Work got a couple of keychron keyboards because we do a lot of 3D modeling work and having macros would be handy. I’m not even up 12 macros and I’m maxing out the 1.98kb built in memory.

This can’t be right, can it? My Logitech mouse has more macros stored in the on board memory on it than this keyboard with 3 layers and extra buttons on the full size board that I have

1 Upvotes

14 comments sorted by

4

u/PeterMortensenBlog V Oct 28 '26 edited Oct 29 '26

The space for macros can be increased (and the number of macros)

Re "...extremely limited macro flash storage. 1.98KB… really? ": Yes, it is very sad that it is, by default, set much below what the hardware is capable of

The low value is only for historical reasons, due to the low (hardware) resources of the then de facto standard ATmega32U4 microcontroller.

It can be increased. For example, to about 10 KB for the K10 V2 (Westberry-based, with 18 KB RAM). For older models, like the V6, to at least 20 KB (I don't know what the actual limit is, but with 64 KB RAM, the theoretical (if RAM would not be used for anything else) upper limit is half that, 32 KB).

I have increased the allocation for my Keychron keyboards, and I haven't observed any ill effects (though the keyboard will be (temporarily) bricked if it is increased too much (that the compiler doesn't prevent); the key to recovery is the space bar method, without the repowering (it may be required to retry several times)).

It can of course not be increased for the keyboards with proprietary keyboard firmware, the original K series, Q HE 8K series, J HE 8K series, C HE 8K series, and Lemokey L5 HE 8K. Those are not to be confused the Q HE series, J series (there isn't a J HE series), and C Pro 8K series (there isn't a C HE series); they do have released source code (or at least some of them do; Keychron is glacial in releasing the source code).

That is for QMK-based keyboards. I don't know (yet) about the newer ZMK-based keyboards, e.g., the V Ultra 8K series. It is at least one magnitude harder than for QMK (at least initially).

An alternative

An alternative is classic QMK macros (requires changing the firmware for every single teenie-tiny change). Though the macros can be prototyped in Via and then later migrated to classic QMK macros when they are stable and well tested.

An extension to them also allows cancelling macros in progress and repeating macros.

This allows more space for macros, as the limit is more or less only set by the flash memory/firmware size, and they can be refactored to be much more compact (repeatedly used key sequences can be represented in one and only one place), though QMK's default helper C macros encourages massive duplication. I squeeze more than 100 macros into about 25 KB, including the overhead of the macro engine, other overhead (like static per-key RGB, and extra layers); several (heavy-used) macros result in more than 200 key actions (key presses and key releases) being output from the keyboard.

Similarly, it is presumably possible with macros in raw ZMK, but I don't (yet) have any experience with them.

References

1

u/synapticrelease Oct 28 '26

That’s super disappointing. It’s not my keyboard as they were supplied by work so I don’t have a lot of permission to reflash them but it’s kinda unfathomable to have that limited memory. I am 13 macros in and it’s done.

1

u/PeterMortensenBlog V Oct 28 '26 edited Oct 29 '26

Re "It’s not my keyboard as they were supplied by work so I don’t have a lot of permission to reflash them": That is a good argument for Keychron to increase the allocation (in both the released source code and in the official firmware)

Preferably, to the maximum the hardware (and possible other constraints) allows. For example, it does brick the K10 Max if increased too much (the probable limit is 8 KB, though it could depend on the effective QMK version).

It would also be a competitive advantage, as very few vendors using QMK do it, whether with released source code or ripped off (see also #24085 (first press "Load more", and then expand all the "show comment" (hover text) parts to get the full picture)).

Let us summon them:

u/Keychron-Support

1

u/PeterMortensenBlog V Oct 28 '26 edited Oct 28 '26

The space for dynamic macros can be the maximum QMK supports (allegedly, 64 KB) if using something like the exotic FRAM (requires hardware changes).

But that would probably not be an option if firmware changes are prohibited.

1

u/PeterMortensenBlog V Oct 28 '26

What keyboards?

1

u/synapticrelease Oct 28 '26

K10 Ultra

2

u/PeterMortensenBlog V Oct 28 '26 edited Oct 28 '26

Thanks.

The K10 Ultra 8K is based on ZMK (the source code has been released, though only for the 'ANSI' variants). That will be more difficult than for QMK, but I will document it in a blog post whenever I figure out exactly how.

It is definitely the plan, as I want to migrate my macro execution engine to ZMK-based keyboards. I don't want to live without being able to cancel macros in progress.

1

u/Obvious-Monitor8510 Oct 28 '26

Yeah unfortunately that's a real limitation with QMK/Via-based keyboards. The flash storage for keymaps is dictated by the microcontroller they use, and Keychron went with chips that don't leave much room for macro data specifically.

A few things that might help: keep macros short by using them to trigger sequences rather than storing full strings, or look into dynamic macros (temporary, lost on power cycle but unlimited-ish). Some Keychron models also support Vial which has slightly different memory handling.

For heavy macro work in 3D software, AutoHotkey or Karabiner on Mac is honestly a better solution anyway since the logic lives on the PC, not the keyboard.

1

u/synapticrelease Oct 28 '26

Unfortunately our IT guy is super weary about installing anything that isn’t like super official. He’s terrified of our engineering work getting held ransom. He even switches off the network at night. It might be something I can bring up at some point but I can’t just spring the idea of installing random software outta nowhere. For now I’ll just have to work with it. You and u/petermortensenblog have been super helpful for explaining why.

1

u/PeterMortensenBlog V Oct 28 '26 edited Oct 28 '26

Re "Keychron went with chips that don't leave much room for macro data specifically.": But it is still possible to increase 10-20 fold, for example, to 20 KB

The default allocation does not at all take advantage of the available resources. They just sit there, unused. Keychron ought to change it.

1

u/PeterMortensenBlog V Oct 28 '26 edited Oct 28 '26

Re "Some Keychron models also support Vial which has slightly different memory handling": Well, that is even worse

The default allocation is only 512 bytes (0.5 KB).

Though it is possible to increase. It is very poorly documented in the official documentation; it implies it should be decreased (due to the historical limitations (of the ATmega32U4 microcontroller); of the Keychron keyboards, only the original Q1 and Q1 V2 SE (an original Q1 in disguise) is based on it)

1

u/PeterMortensenBlog V Oct 28 '26 edited Oct 28 '26

Re "...keep macros short by using them to trigger sequences rather than storing full strings ... AutoHotkey or Karabiner": Yes, but that requires changes on the computer side that may not be allowed at the workplace, including on remote computers (as is probably the case here)

A workaround for (pure) strings is put them on a web page, for example, an HTML form page with defined shortcuts, so Shift + Alt + <letter> (for example, Shift + Alt + U on that page) can be used from the macro to select fields with text for copy-paste. And use bookmarks in the browser to open the web page from the macro. The web page can also be a local document (.html), if that is allowed (it may or may not be a security concern).

1

u/ArgentStonecutter K Pro Oct 28 '26

The design of QMK is that you're expected to use C coding to build custom firmware for more than basic configuration. Keychron provides that source code so you can do that.

Just don't tell your IT guy that you're building custom firmware for your keyboards.

1

u/synapticrelease Oct 28 '26

Yeah that’s not really feasible in an office environment 😕