{"id":5812,"date":"2025-05-26T14:04:57","date_gmt":"2025-05-26T13:04:57","guid":{"rendered":"https:\/\/pmortensen.eu\/world2\/?p=5812"},"modified":"2025-10-30T19:25:38","modified_gmt":"2025-10-30T18:25:38","slug":"overcoming-limitations-for-macros-on-keychron-keyboards","status":"publish","type":"post","link":"https:\/\/pmortensen.eu\/world2\/2025\/05\/26\/overcoming-limitations-for-macros-on-keychron-keyboards\/","title":{"rendered":"Overcoming limitations for macros on Keychron keyboards"},"content":{"rendered":"<p>The short version: It is possible to change the number of <a href=\"https:\/\/docs.keeb.io\/via\">Via<\/a> and <a href=\"https:\/\/get.vial.today\">Vial<\/a> macros and change the space for them to be essentially unlimited. Unfortunately, there are many different ways of achieving it, depending on the particular <strong><em>keyboard<\/em><\/strong>, the particular source code <strong><em>version<\/em><\/strong>, and the particular <strong><em>firmware type<\/em><\/strong>, but this is an attempt to clear up the confusion.<\/p>\n<p>The focus is on Keychron keyboards, but most applies to any Vial or <a href=\"https:\/\/docs.qmk.fm\/#\/faq_general?id=what-is-qmk\">QMK<\/a> keyboard or <a href=\"https:\/\/keyboardsexpert.com\/macropad-mechanical-keyboard-faqs\/\">macro pad<\/a>.<\/p>\n<h2 id=\"History\">Some history<\/h2>\n<p>I initially <a href=\"https:\/\/pmortensen.eu\/world2\/2023\/06\/19\/keychron-v5-a-reasonably-priced-fully-macro-capable-qmk-based-mechanical-keyboard\/\">got a Keychron V5<\/a> and some time later <a href=\"https:\/\/www.reddit.com\/r\/olkb\/comments\/141ypnj\/comment\/jqvs7hc\/\">posted comments<\/a> on <a href=\"https:\/\/www.reddit.com\/r\/olkb\/comments\/141ypnj\/vial_assistance_needed\/\">a Reddit post<\/a> on how to expand the space for Via macros (after the OP repeatedly did not reveal <strong><em>any<\/em><\/strong> useful information on how to do it; instead the OP opted for the completely useless <a href=\"https:\/\/en.wiktionary.org\/wiki\/RTFM#Phrase\">RTFM<\/a> route. RTFM is completely useless and superfluous in general. And in this particular case, it isn&#8217;t actually in the very terse QMK documentation, at least not in any direct form; most has to be deduced from the source code)).<\/p>\n<p>Later, I expanded it in <a href=\"https:\/\/www.reddit.com\/r\/macro_pads\/comments\/1ge7cbi\/comment\/lu9jlcy\/\">a Reddit comment<\/a>, as the original information was only valid for wired-only Keychron keyboards and only for QMK versions approximately 2023. For example, QMK changed to <a href=\"https:\/\/docs.qmk.fm\/data_driven_config#data-driven-configuration\">data-driven configuration<\/a> for the space for Via macros in February 2024 (though the old method may still work; it probably overrides the data-driven configuration method). And <a href=\"https:\/\/github.com\/Keychron\/qmk_firmware\/tree\/wireless_playground\/keyboards\/keychron\/k10_pro\">Keychron&#8217;s fork<\/a> of QMK, used for all the wireless Keychron keyboards, is many years behind the main QMK project and thus uses an old method.<\/p>\n<p>I also wrote <a href=\"https:\/\/pmortensen.eu\/world2\/2024\/02\/26\/a-hack-to-use-mouse-actions-in-via-macros\/\">a blog post<\/a> about how to overcome the lack of support of <strong><em>mouse actions<\/em><\/strong> in Via macros. It also lists the many limitations of Via macros.<\/p>\n<h2 id=\"How-tos\">How-tos<\/h2>\n<p>Unfortunately, there isn&#8217;t a single method. It has changed over time. For example, both the names and the set of the preprocessor symbols have changed over time. And now there is a move to data-driven configuration, but different versions and forks are in a different state. For example, it appears the data-driven configuration method is supported in Vial, but it doesn&#8217;t do anything&#8230;<\/p>\n<p>The method to use depends on:<\/p>\n<ol>\n<li>QMK\/Via or Vial<\/li>\n<li>The version of Via or Vial<\/li>\n<li>Which fork of Via or Vial, if any<\/li>\n<li>Which Git branch (mainly for the Keychron fork of QMK)<\/li>\n<\/ol>\n<p>There are at least three different methods:<\/p>\n<ol>\n<li>xxx<\/li>\n<li>yyy<\/li>\n<li>aaa<\/li>\n<\/ol>\n<p>The meaning of the numbers has also changed:<\/p>\n<ol>\n<li>For Keychron V6 with QMK as of 2023. The number is the actual space for Via macros<\/li>\n<li>yyy<\/li>\n<li>dd config: The number is the total space for emulated, not  the actual space. There is an about 800 bytes overhead, which should be taken into consideration.<\/li>\n<\/ol>\n<h2 id=\"Limits\">Space limits<\/h2>\n<p>It is possible to increase the space for Via macros, but what are the actual limits?<\/p>\n<p>At first, it may appear as if the limit is set by the remaining flash memory (not taken up by the QMK keyboard firmware). For example,<\/p>\n<p>  xcxcx xc xc xc<\/p>\n<p>But that is not the case. Looking closer, the emulated EEPROM is &#8220;backed&#8221; by RAM. And the size of this &#8220;backing&#8221; RAM must be at least double the size of the emulated EEPROM. Thus, if the RAM size is 64 KB, then the maximum size of the emulated EEPROM memory is 32 KB (not counting the overhead for other use of RAM).<\/p>\n<p>Presumably, the &#8220;backing&#8221; RAM is for reducing the number of writes to flash memory (for example, only write to flash memory when some time has passed without write&mdash;the writes are sort of cached in RAM). And probably also for making it faster, at least for reading.<\/p>\n<p>The compilation process may not give a warning if something risks being overwritten if setting the space specification too high.<\/p>\n<p>Limiting factors<\/p>\n<ol>\n<li>Size of the flash memory, in particular what is left over after the main QMK keyboard firmware has taken its share<\/li>\n<li>Size of the RAM memory, in particular what is left over after the main QMK keyboard firmware has taken its share. As RAM memory is required for &#8220;backing&#8221; of the emulated EEPROM in flash memory<\/li>\n<li>Inherent limits in QMK for the size of the EEPROM (whether  physical or emulated)<\/li>\n<\/ol>\n<h2 id=\"Forks_and_branches\">Differences between QMK, its forks, and the forks&#8217; Git branches<\/h2>\n<p>There are definitely differences in the maximum space for Via macros.<br \/>\nDifferences between QMK, its forks, the forks&#8217; Git branches<\/p>\n<p>For example, the &#8220;wireless_playground&#8221; branch in Keychron&#8217;s fork has a limit of 8 KB (total EEPROM space; with overhead, about 6.8 KB for Via macros)<\/p>\n<p>TBD.<\/p>\n<h3 id=\"Limits\">Hardware extension<\/h2>\n<p>This hasn&#8217;t been explored, but it is possible to <a href=\"https:\/\/www.reddit.com\/r\/olkb\/comments\/18lpxpp\/comment\/ke5nobu\/\">add extra hardware<\/a> that can extended the EEPROM space. In particular, it doesn&#8217;t require &#8220;backing&#8221; in RAM, so the RAM size does not become a limiting factor<\/p>\n<p><!--\n\n  Research:\n\n    1. Find the exact threshold revision dates\n\n    2. Does Vial now support the data-driven configuration method?\n\n    3. Map out what versions of QMK the many different methods correspond to. Including find the threshold dates, including if they actually work (not just by source code inspection).\n\n    4. Test many keyboard models, as, for example, the K Pro series could be different from K Max series, even if they are in the same Git branch (wireless_playground).\n\n    5. Also test on the \"bluetooth_playground\" Git branch\n\n    6. Incorporate the information from a Reddit comment, where we promised to update our comment. And test it.\n--><\/p>\n<p><!-- T H E   E N D . . .   Marker for editing in WordPress: pppp --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The short version: It is possible to change the number of Via and Vial macros and change the space for them to be essentially unlimited. Unfortunately, there are many different ways of achieving it, depending on the particular keyboard, the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/pmortensen.eu\/world2\/2025\/05\/26\/overcoming-limitations-for-macros-on-keychron-keyboards\/\"> <span class=\"screen-reader-text\">Overcoming limitations for macros on Keychron keyboards<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,28,26,35,16,38],"tags":[],"_links":{"self":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5812"}],"collection":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/comments?post=5812"}],"version-history":[{"count":98,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5812\/revisions"}],"predecessor-version":[{"id":6053,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/5812\/revisions\/6053"}],"wp:attachment":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/media?parent=5812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/categories?post=5812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/tags?post=5812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}