<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">EXTRAKEY_ENABLE = no</span></span></code></pre></div><p>This disables some of the functionality that you may not need. But note that extrakeys disables stuff like the media keys and system volume control.</p><p>If that isn't enough to get your firmware down to size, then there are some additional features that you can disable:</p><divclass="language-make vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">make</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPACE_CADET_ENABLE = no</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GRAVE_ESC_ENABLE = no </span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MAGIC_ENABLE = no</span></span></code></pre></div><p>These features are enabled by default, but they may not be needed. Double check to make sure. The <ahref="./keycodes_magic">Magic Keycodes</a> are the largest and control things like NKRO toggling, GUI and ALT/CTRL swapping, etc. Disabling them will disable those functions. See <ahref="#magic-functions">Magic Functions</a> for disabling related functions.</p><p>If you use <code>sprintf</code> or <code>snprintf</code> functions you can save around ~400 Bytes by enabling this option.</p><divclass="language-make vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">make</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">AVR_USE_MINIMAL_PRINTF = yes</span></span></code></pre></div><p>This will include smaller implementations from AVRs libc into your Firmware. They are <ahref="https://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#gaa3b98c0d17b35642c0f3e4649092b9f1"target="_blank"rel="noreferrer">not fully featured</a>, for instance zero padding and field width specifiers are not supported. So if you use <code>sprintf</code> or <code>snprintf</code> like this:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sprintf</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(wpm_str, </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%03d</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get_current_wpm</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">snprintf</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(keylog_str, </span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">sizeof</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(keylog_str), </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%d</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">x</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%d</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">, k</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%2d</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> : </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%c</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>you will still need the standard implementation.</p><h2id="config-h-settings"tabindex="-1"><code>config.h</code> Settings <aclass="header-anchor"href="#config-h-settings"aria-label="Permalink to "`config.h` Settings""></a></h2><p>If you've done all of that, and you don't want to disable features like RGB, Audio, OLEDs, etc, there are some additional options that you can add to your config.h that can help.</p><p>Starting with Lock Key support. If you have a Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your <code>config.h</code>:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LOCKING_SUPPORT_ENABLE</span></span>
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LOCKING_RESYNC_ENABLE</span></span></code></pre></div><p>Oneshots. If you're not using these, you can disable the feature by adding this to your <code>config.h</code>:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> NO_ACTION_ONESHOT</span></span></code></pre></div><p>The same with tapping keys (mod tap, layer tap, etc)</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> NO_ACTION_TAPPING</span></span></code></pre></div><h2id="audio-settings"tabindex="-1">Audio Settings <aclass="header-anchor"href="#audio-settings"aria-label="Permalink to "Audio Settings""></a></h2><p>If you're using the Audio feature, by default that includes the music mode feature. This tranlates matrix positions into notes. It's neat for sure, but most likely, you're not using it. You can disable it by adding this to your <code>config.h</code>:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> NO_MUSIC_MODE</span></span></code></pre></div><p>And by adding this to your <code>rules.mk</code></p><divclass="language-make vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">make</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MUSIC_ENABLE = no</span></span></code></pre></div><h2id="layers"tabindex="-1">Layers <aclass="header-anchor"href="#layers"aria-label="Permalink to "Layers""></a></h2><p>There are also some options for layers, that can reduce the firmware size. All of these settings are for your <code>config.h</code>.</p><p>You can limit the number of layers that the firmware uses -- if you're using up to 8 layers in total:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LAYER_STATE_8BIT</span></span></code></pre></div><p>or if you require up to 16 layers instead:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LAYER_STATE_16BIT</span></span></code></pre></div><p>Or if you're not using layers at all, you can outright remove the functionality altogether:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> NO_ACTION_LAYER</span></span></code></pre></div><h2id="magic-functions"tabindex="-1">Magic
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#endif</span></span></code></pre></div><p>Likewise, if you are not using magic keycodes to swap modifiers, such as Control with GUI, add the following to your <code>keymap.c</code> or user space code:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#ifndef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MAGIC_ENABLE</span></span>
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#endif</span></span></code></pre></div><p>Both of them will overwrite the placeholder functions with a simple return statement to reduce firmware size.</p><h2id="oled-tweaks"tabindex="-1">OLED tweaks <aclass="header-anchor"href="#oled-tweaks"aria-label="Permalink to "OLED tweaks""></a></h2><p>One place you can save a bunch of space here is by not using <code>sprintf</code> or <code>snprintf</code>. This function call takes up ~1.5kB of firmware space, and can be rewritten. For instance, WPM uses this a lot.</p><p>You can convert this:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // OLD CODE</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> oled_write</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get_u8_str</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get_current_wpm</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(), </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'0'</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">), </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>which outputs <code>WPM: 005</code>.</p><h2id="rgb-settings"tabindex="-1">RGB Settings <aclass="header-anchor"href="#rgb-settings"aria-label="Permalink to "RGB Settings""></a></h2><p>If you're using RGB on your board, both RGB Light (Underglow) and RGB Matrix (per key RGB) now require defines to enable different animations -- some keyboards enable a lot of animations by default, so you can generally gain back some space by disabling specific animations if you don't use them. For RGB Light you can disable these in your keymap's <code>config.h</code>:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RGBLIGHT_ANIMATIONS</span></span>
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RGBLIGHT_EFFECT_TWINKLE</span></span></code></pre></div><p>For RGB Matrix, these need to be explicitly enabled as well. To disable any that were enabled by the keyboard, add one or more of these to your keymap's <code>config.h</code>:</p><divclass="language-c vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">c</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ENABLE_RGB_MATRIX_ALPHAS_MODS</span></span>
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#undef</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ENABLE_RGB_MATRIX_SOLID_MULTISPLASH</span></span></code></pre></div><h1id="final-thoughts"tabindex="-1">Final Thoughts <aclass="header-anchor"href="#final-thoughts"aria-label="Permalink to "Final Thoughts""></a></h1><p>If you've done all of this, and your firmware is still too large, then it is time to consider making the switch to ARM. There are a number of Pro Micro replacements with an ARM controller:</p><ul><li><ahref="https://github.com/customMK/Bonsai-C"target="_blank"rel="noreferrer">Bonsai C</a> (Open Source, DIY/PCBA)</li><li><ahref="https://github.com/megamind4089/STeMCell"target="_blank"rel="noreferrer">STeMCell</a> (Open Source, DIY/PCBA)</li><li><ahref="https://learn.adafruit.com/adafruit-kb2040"target="_blank"rel="noreferrer">Adafruit KB2040</a></li><li><ahref="https://www.sparkfun.com/products/18288"target="_blank"rel="noreferrer">SparkFun Pro Micro - RP2040</a></li><li><ahref="https://boardsource.xyz/store/628b95b494dfa308a6581622"target="_blank"rel="noreferrer">Blok</a></li><li><ahref="https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040"target="_blank"rel="noreferrer">Elite-Pi</a></li><li><ahref="https://keeb.supply/products/0xcb-helios"target="_blank"rel="noreferrer">0xCB Helios</a> (<ahref="https://github.com/0xCB-dev/0xCB-Helios"target="_blank"rel="noreferrer">Open Source</a>, DIY/PCBA/Shop)</li><li><ahref="https://splitkb.com/products/liatris"target="_blank"rel="noreferrer">Liatris</a></li><li><ahref="https://splitkb.com/products/imera"target="_blank"rel="noreferrer">Imera</a></li><li><ahref="https://github.com/ci-bus/michi-promicro-rp2040"target="_blank"rel="noreferrer">Michi</a></li><li><ahref="https://qmk.fm/proton-c/"target="_blank"rel="noreferrer">Proton C</a> (out of stock)</li></ul><p>There are other, non-Pro Micro compatible boards out there. The most popular being:</p><ul><li><ahref="https://www.aliexpress.com/item/1005001456186625.html"target="_blank"rel="noreferrer">WeAct Blackpill F411</a> (~$6 USD)</li></ul></div></div></main><footerclass="VPDocFooter"data-v-39a288b8data-v-09de1c0f><!--[--><!--]--><!----><navclass="prev-next"data-v-09de1c0f><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link prev"href="/faq_keymap"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Previous page</span><spanclass="title"data-v-09de1c0f>Keymap FAQ</span><!--]--></a></div><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link next"href="/reference_glossary"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Next page</span><spanclass="title"data-v-09de1c0f>Glossary</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>