<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span></code></pre></div><h3id="user-hooks"tabindex="-1">User Hooks <aclass="header-anchor"href="#user-hooks"aria-label="Permalink to "User Hooks""></a></h3><p>There are a number of hooks that you can use to add custom functionality and feedback options to Dynamic Macro feature. This allows for some additional degree of customization.</p><p>Note, that direction indicates which macro it is, with <code>1</code> being Macro 1, <code>-1</code> being Macro 2, and 0 being no macro.</p><ul><li><code>dynamic_macro_record_start_user(int8_t direction)</code> - Triggered when you start recording a macro.</li><li><code>dynamic_macro_play_user(int8_t direction)</code> - Triggered when you play back a macro.</li><li><code>dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)</code> - Triggered on each keypress while recording a macro.</li><li><code>dynamic_macro_record_end_user(int8_t direction)</code> - Triggered when the macro recording is stopped.</li></ul><p>Additionally, you can call <code>dynamic_macro_led_blink()</code> to flash the backlights if that feature is enabled.</p></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="/features/command"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Previous page</span><spanclass="title"data-v-09de1c0f>Command</span><!--]--></a></div><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link next"href="/features/grave_esc"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Next page</span><spanclass="title"data-v-09de1c0f>Grave Escape</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>