qmk_firmware/features/combo.html

209 lines
158 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Combos | QMK Firmware</title>
<meta name="description" content="Documentation for QMK Firmware">
<meta name="generator" content="VitePress v1.1.3">
<link rel="preload stylesheet" href="/assets/style.No8zk9aC.css" as="style">
<script type="module" src="/assets/app.DSDfcPLw.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/framework.DyMmIvSC.js">
<link rel="modulepreload" href="/assets/chunks/theme.CQbmPx_P.js">
<link rel="modulepreload" href="/assets/features_combo.md.C-GfDyXJ.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar top" data-v-ae24b3ad data-v-ccf7ddec><div class="wrapper" data-v-ccf7ddec><div class="container" data-v-ccf7ddec><div class="title" data-v-ccf7ddec><div class="VPNavBarTitle has-sidebar" data-v-ccf7ddec data-v-ab179fa1><a class="title" href="/" data-v-ab179fa1><!--[--><!--]--><!--[--><!--[--><!--[--><img class="VPImage dark logo" src="/qmk-logo-dark.svg" alt data-v-8426fc1a><!--]--><!--[--><img class="VPImage light logo" src="/qmk-logo-light.svg" alt data-v-8426fc1a><!--]--><!--]--><!--]--><span data-v-ab179fa1>QMK Firmware</span><!--[--><!--]--></a></div></div><div class="content" data-v-ccf7ddec><div class="content-body" data-v-ccf7ddec><!--[--><!--]--><div class="VPNavBarSearch search" data-v-ccf7ddec><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-ccf7ddec data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Home</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-ccf7ddec data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-ccf7ddec data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://reddit.com/r/olkb" aria-label target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px"><path d="M 29 3 C 28.0625 3 27.164063 3.382813 26.5 4 C 25.835938 4.617188 25.363281 5.433594 25 6.40625 C 24.355469 8.140625 24.085938 10.394531 24.03125 13.03125 C 19.234375 13.179688 14.820313 14.421875 11.28125 16.46875 C 10.214844 15.46875 8.855469 14.96875 7.5 14.96875 C 6.089844 14.96875 4.675781 15.511719 3.59375 16.59375 C 1.425781 18.761719 1.425781 22.238281 3.59375 24.40625 L 3.84375 24.65625 C 3.3125 26.035156 3 27.488281 3 29 C 3 33.527344 5.566406 37.585938 9.5625 40.4375 C 13.558594 43.289063 19.007813 45 25 45 C 30.992188 45 36.441406 43.289063 40.4375 40.4375 C 44.433594 37.585938 47 33.527344 47 29 C 47 27.488281 46.6875 26.035156 46.15625 24.65625 L 46.40625 24.40625 C 48.574219 22.238281 48.574219 18.761719 46.40625 16.59375 C 45.324219 15.511719 43.910156 14.96875 42.5 14.96875 C 41.144531 14.96875 39.785156 15.46875 38.71875 16.46875 C 35.195313 14.433594 30.800781 13.191406 26.03125 13.03125 C 26.09375 10.546875 26.363281 8.46875 26.875 7.09375 C 27.164063 6.316406 27.527344 5.757813 27.875 5.4375 C 28.222656 5.117188 28.539063 5 29 5 C 29.460938 5 29.683594 5.125 30.03125 5.40625 C 30.378906 5.6875 30.785156 6.148438 31.3125 6.6875 C 32.253906 7.652344 33.695313 8.714844 36.09375 8.9375 C 36.539063 11.238281 38.574219 13 41 13 C 43.75 13 46 10.75 46 8 C 46 5.25 43.75 3 41 3 C 38.605469 3 36.574219 4.710938 36.09375 6.96875 C 34.3125 6.796875 33.527344 6.109375 32.75 5.3125 C 32.300781 4.851563 31.886719 4
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM test_combo2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_C, KC_D, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key_combos</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(test_combo1, KC_ESC),</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(test_combo2, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LCTL</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_Z)),</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // keycodes with modifiers are possible too!</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span></code></pre></div><p>This will send &quot;Escape&quot; if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys.</p><h2 id="advanced-keycodes-support" tabindex="-1">Advanced Keycodes Support <a class="header-anchor" href="#advanced-keycodes-support" aria-label="Permalink to &quot;Advanced Keycodes Support&quot;"></a></h2><p>Advanced keycodes, such as <a href="./../mod_tap">Mod-Tap</a> and <a href="./tap_dance">Tap Dance</a> are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM test_combo1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LSFT_T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_A), </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KC_B), COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM test_combo2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">TD</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(TD_ESC_CAPS), KC_F1, COMBO_END};</span></span></code></pre></div><h2 id="overlapping-combos" tabindex="-1">Overlapping Combos <a class="header-anchor" href="#overlapping-combos" aria-label="Permalink to &quot;Overlapping Combos&quot;"></a></h2><p>It is possible to overlap combos. Before, with the example below both combos would activate when all three keys were pressed. Now only the three key combo will activate.</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM test_combo1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LSFT_T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_A), </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KC_B), COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM test_combo2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LSFT_T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_A), </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KC_B), KC_C, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key_combos</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(test_combo1, KC_ESC)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(test_combo2, KC_TAB)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span></code></pre></div><h2 id="examples" tabindex="-1">Examples <a class="header-anchor" href="#examples" aria-label="Permalink to &quot;Examples&quot;"></a></h2><p>A long list of combos can be defined in an <code>enum</code> list:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">enum</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> combos {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AB_ESC,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> JK_TAB,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QW_SFT,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SD_LAYER</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM ab_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_A, KC_B, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM jk_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_J, KC_K, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM qw_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_Q, KC_W, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM sd_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_S, KC_D, COMBO_END};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key_combos</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [AB_ESC] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ab_combo, KC_ESC),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [JK_TAB] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(jk_combo, KC_TAB),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [QW_SFT] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(qw_combo, KC_LSFT),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [SD_LAYER] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(sd_combo, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_LAYER)),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span></code></pre></div><p>For a more complicated implementation, you can use the <code>process_combo_event</code> function to add custom handling.</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">enum</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> combo_events {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> EM_EMAIL,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> BSPC_LSFT_CLEAR,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM email_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_E, KC_M, COMBO_END};</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM clear_line_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_BSPC, KC_LSFT, COMBO_END};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key_combos</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [EM_EMAIL] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO_ACTION</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(email_combo),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [BSPC_LSFT_CLEAR] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO_ACTION</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(clear_line_combo),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">/* COMBO_ACTION(x) is same as COMBO(x, KC_NO) */</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> process_combo_event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> combo_index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> pressed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(combo_index) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> EM_EMAIL:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (pressed) {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SEND_STRING</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;john.doe@example.com&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> BSPC_LSFT_CLEAR:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (pressed) {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> tap_code16</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_END);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> tap_code16</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">S</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_HOME));</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> tap_code16</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_BSPC);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>This will send &quot;<a href="mailto:john.doe@example.com" target="_blank" rel="noreferrer">john.doe@example.com</a>&quot; if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings.</p><p>It is worth noting that <code>COMBO_ACTION</code>s are not needed anymore. As of <a href="https://github.com/qmk/qmk_firmware/pull/8591/" target="_blank" rel="noreferrer">PR#8591</a>, it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in <code>process_record_user</code>, and define a combo with <code>COMBO(&lt;key_array&gt;, &lt;your_custom_keycode&gt;)</code>. See the first example in <a href="./../feature_macros">Macros</a>.</p><h2 id="keycodes" tabindex="-1">Keycodes <a class="header-anchor" href="#keycodes" aria-label="Permalink to &quot;Keycodes&quot;"></a></h2><p>You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your <code>keymap.c</code></p><table><thead><tr><th>Keycode</th><th>Aliases</th><th>Description</th></tr></thead><tbody><tr><td><code>QK_COMBO_ON</code></td><td><code>CM_ON</code></td><td>Turns on Combo feature</td></tr><tr><td><code>QK_COMBO_OFF</code></td><td><code>CM_OFF</code></td><td>Turns off Combo feature</td></tr><tr><td><code>QK_COMBO_TOGGLE</code></td><td><code>CM_TOGG</code></td><td>Toggles Combo feature on and off</td></tr></tbody></table><h2 id="advanced-configuration" tabindex="-1">Advanced Configuration <a class="header-anchor" href="#advanced-configuration" aria-label="Permalink to &quot;Advanced Configuration&quot;"></a></h2><p>These configuration settings can be set in your <code>config.h</code> file.</p><h3 id="combo-term" tabindex="-1">Combo Term <a class="header-anchor" href="#combo-term" aria-label="Permalink to &quot;Combo Term&quot;"></a></h3><p>By default, the timeout for the Combos to be recognized is set to 50ms. This can be changed if accidental combo misfires are happening or if you&#39;re having difficulties pressing keys at the same time. For instance, <code>#define COMBO_TERM 40</code> would set the timeout period for combos to 40ms.</p><h3 id="buffer-and-state-sizes" tabindex="-1">Buffer and state sizes <a class="header-anchor" href="#buffer-and-state-sizes" aria-label="Permalink to &quot;Buffer and state sizes&quot;"></a></h3><p>If you&#39;re using long combos, or you have a lot of overlapping combos, you may run into issues with this, as the buffers may not be large enough to accommodate what you&#39;re doing. In this case, you can configure the sizes of the buffers used. Be aware, larger combo sizes and larger buffers will increase memory usage!</p><p>To configure the amount of keys a combo can be composed of, change the following:</p><table><thead><tr><th>Keys</th><th>Define to be set</th></tr></thead><tbody><tr><td>6</td><td><code>#define EXTRA_SHORT_COMBOS</code></td></tr><tr><td>8</td><td>QMK Default</td></tr><tr><td>16</td><td><code>#define EXTRA_LONG_COMBOS</code></td></tr><tr><td>32</td><td><code>#define EXTRA_EXTRA_LONG_COMBOS</code></td></tr></tbody></table><p>Defining <code>EXTRA_SHORT_COMBOS</code> combines a combo&#39;s internal state into just one byte. This can, in some cases, save some memory. If it doesn&#39;t, no point using it. If you do, you also have to make sure you don&#39;t define combos with more than 6 keys.</p><p>Processing combos has two buffers, one for the key presses, another for the combos being activated. Use the following options to configure the sizes of these buffers:</p><table><thead><tr><th>Define</th><th>Default</th></tr></thead><tbody><tr><td><code>#define COMBO_KEY_BUFFER_LENGTH 8</code></td><td>8 (the key amount <code>(EXTRA_)EXTRA_LONG_COMBOS</code> gives)</td></tr><tr><td><code>#define COMBO_BUFFER_LENGTH 4</code></td><
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // decide by combo-&gt;keycode</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo-&gt;keycode) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KC_X:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 50</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // or with combo index, i.e. its name from enum.</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (index) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> COMBO_NAME_HERE:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 9001</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // And if you&#39;re feeling adventurous, you can even decide by the keys in the chord,</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // i.e. the exact array of keys you defined for the combo.</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // This can be useful if your combos have a common key and you want to apply the</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // same combo term for all of them.</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo-&gt;keys[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KC_ENT) {</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // if first key in the array is Enter</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 150</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> COMBO_TERM;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_combo_must_hold</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">combo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Same as above, decide by keycode, the combo index, or by the keys in the chord.</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">KEYCODE_IS_MOD</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(combo-&gt;keycode) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">||</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo-&gt;keycode </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QK_MOMENTARY </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> combo-&gt;keycode </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QK_MOMENTARY_MAX)</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // MO(kc) keycodes</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (index) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> COMBO_NAME_HERE:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_combo_must_tap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">combo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // If you want all combos to be tap-only, just uncomment the next line</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // return true</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // If you want *all* combos, that have Mod-Tap/Layer-Tap/Momentary keys in its chord, to be tap-only, this is for you:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint8_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> idx </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> while</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ((key </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> pgm_read_word</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">combo-&gt;keys[idx])) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> COMBO_END) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (key) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QK_MOD_TAP...QK_MOD_TAP_MAX:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QK_LAYER_TAP...QK_LAYER_TAP_MAX:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> QK_MOMENTARY...QK_MOMENTARY_MAX:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> idx </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_combo_must_press_in_order</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> combo_index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">combo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo_index) {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /* List combos here that you want to only activate if their keys</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * are pressed in the same order as they are defined in the combo&#39;s key</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * array. */</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> COMBO_NAME_HERE:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="generic-hook-to-dis-allow-a-combo-activation" tabindex="-1">Generic hook to (dis)allow a combo activation <a class="header-anchor" href="#generic-hook-to-dis-allow-a-combo-activation" aria-label="Permalink to &quot;Generic hook to (dis)allow a combo activation&quot;"></a></h3><p>By defining <code>COMBO_SHOULD_TRIGGER</code> and its companying function <code>bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record)</code> you can block or allow combos to activate on the conditions of your choice. For example, you could disallow some combos on the base layer and allow them on another. Or disable combos on the home row when a timer is running.</p><p>Examples:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> combo_should_trigger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> combo_index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">combo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /* Disable combo `SOME_COMBO` on layer `_LAYER_A` */</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo_index) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SOME_COMBO:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">layer_state_is</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_LAYER_A)) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="combo-timer" tabindex="-1">Combo timer <a class="header-anchor" href="#combo-timer" aria-label="Permalink to &quot;Combo timer&quot;"></a></h3><p>Normally, the timer is started on the first key press and then reset on every subsequent key press within the <code>COMBO_TERM</code>. Inputting combos is relaxed like this, but also slightly more prone to accidental misfires.</p><p>The next two options alter the behaviour of the timer.</p><h4 id="define-combo-strict-timer" tabindex="-1"><code>#define COMBO_STRICT_TIMER</code> <a class="header-anchor" href="#define-combo-strict-timer" aria-label="Permalink to &quot;`#define COMBO_STRICT_TIMER`&quot;"></a></h4><p>With <code>COMBO_STRICT_TIMER</code>, the timer is started only on the first key press. Inputting combos is now less relaxed; you need to make sure the full chord is pressed within the <code>COMBO_TERM</code>. Misfires are less common but if you type multiple combos fast, there is a chance that the latter ones might not activate properly.</p><h4 id="define-combo-no-timer" tabindex="-1"><code>#define COMBO_NO_TIMER</code> <a class="header-anchor" href="#define-combo-no-timer" aria-label="Permalink to &quot;`#define COMBO_NO_TIMER`&quot;"></a></h4><p>By defining <code>COMBO_NO_TIMER</code>, the timer is disabled completely and combos are activated on the first key release. This also disables the &quot;must hold&quot; functionalities as they just wouldn&#39;t work at all.</p><h3 id="customizable-key-releases" tabindex="-1">Customizable key releases <a class="header-anchor" href="#customizable-key-releases" aria-label="Permalink to &quot;Customizable key releases&quot;"></a></h3><p>By defining <code>COMBO_PROCESS_KEY_RELEASE</code> and implementing the function <code>bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode)</code>, you can run your custom code on each key release after a combo was activated. For example you could change the RGB colors, activate haptics, or alter the modifiers.</p><p>You can also release a combo early by returning <code>true</code> from the function.</p><p>Here&#39;s an example where a combo resolves to two modifiers, and on key releases the modifiers are unregistered one by one, depending on which key was released.</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">enum</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> combos {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AB_MODS</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> uint16_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PROGMEM ab_combo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {KC_A, KC_B, COMBO_END};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> key_combos</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">[]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [AB_MODS] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ab_combo, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LCTL</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_LSFT)),</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> process_combo_key_release</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> combo_index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">combo_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">combo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint8_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> key_index</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (combo_index) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AB_MODS:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(keycode) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KC_A:</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> unregister_mods</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(MOD_MASK_CTRL);</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KC_B:</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> unregister_mods</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(MOD_MASK_SHIFT);</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // do not release combo</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="layer-independent-combos" tabindex="-1">Layer independent combos <a class="header-anchor" href="#layer-independent-combos" aria-label="Permalink to &quot;Layer independent combos&quot;"></a></h3><p>If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer.</p><p>With <code>#define COMBO_ONLY_FROM_LAYER 0</code> in config.h, the combos&#39; keys are always checked from layer <code>0</code>, even if other layers are active.</p><h4 id="combo-reference-layers-by-layer" tabindex="-1">Combo reference layers by layer. <a class="header-anchor" href="#combo-reference-layers-by-layer" aria-label="Permalink to &quot;Combo reference layers by layer.&quot;"></a></h4><p>If not using <code>COMBO_ONLY_FROM_LAYER</code> it is possible to specify a combo reference layer for any layer using the <code>combo_ref_from_layer</code> hook. The combo macros automatically create this function from the <code>COMBO_REF_LAYER()</code> entries given.</p><p>This function returns the assigned reference layer for the current layer. if there is no match, it returns the default reference layer if set, or the current layer otherwise. A default layer can be set with <code>DEFAULT_REF_LAYER(_MY_COMBO_REF_LAYER)</code></p><p>If not set, the default reference layer selection from the automatically generated <code>combo-ref-from-layer()</code> will be the current layer.</p><p>The following <code>combo_ref_from_layer</code> function will give a reference layer of _QWERTY for the _DVORAK layer and will give the _NAV layer as a reference to it&#39;s self. All other layers will have the default for their combo reference layer. If the default is not set, all other layers will reference themselves.</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> COMBO_REF_DEFAULT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _MY_COMBO_LAYER</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint8_t</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> combo_ref_from_layer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint8_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> layer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">){</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get_highest_layer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(layer_state)){</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _DVORAK: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _QWERTY;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _NAV: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _NAV;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _MY_COMBO_LAYER;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> layer;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // important if default is not in case.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The equivalent definition using the combo macros is this:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMBO_REF_LAYER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_DVORAK, _QWERTY)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMBO_REF_LAYER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_NAV, _NAV)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">DEFAULT_REF_LAYER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_MY_COMBO_LAYER).</span></span></code></pre></div><h2 id="user-callbacks" tabindex="-1">User callbacks <a class="header-anchor" href="#user-callbacks" aria-label="Permalink to &quot;User callbacks&quot;"></a></h2><p>In addition to the keycodes, there are a few functions that you can use to set the status, or check it:</p><table><thead><tr><th>Function</th><th>Description</th></tr></thead><tbody><tr><td><code>combo_enable()</code></td><td>Enables the combo feature</td></tr><tr><td><code>combo_disable()</code></td><td>Disables the combo feature, and clears the combo buffer</td></tr><tr><td><code>combo_toggle()</code></td><td>Toggles the state of the combo feature</td></tr><tr><td><code>is_combo_enabled()</code></td><td>Returns the status of the combo feature state (true or false)</td></tr></tbody></table><h2 id="dictionary-management" tabindex="-1">Dictionary Management <a class="header-anchor" href="#dictionary-management" aria-label="Permalink to &quot;Dictionary Management&quot;"></a></h2><p>Having 3 places to update when adding new combos or altering old ones does become cumbersome when you have a lot of combos. We can alleviate this with some magic! ... If you consider C macros magic. First, you need to add <code>VPATH += keyboards/gboards</code> to your <code>rules.mk</code>. Next, include the file <code>g/keymap_combo.h</code> in your <code>keymap.c</code>.</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This functionality uses the same <code>process_combo_event</code> function as <code>COMBO_ACTION</code> macros do, so you cannot use the function yourself in your keymap. Instead, you have to define the <code>case</code>s of the <code>switch</code> statement by themselves within <code>inject.h</code>, which <code>g/keymap_combo.h</code> will then include into the function.</p></div><p>Then, write your combos in <code>combos.def</code> file in the following manner:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Alternate reference layers by layer</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Layer Reference layer</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMBO_REF_LAYER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_DVORAK, _QWERTY)</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // reference the qwerty layer for dvorak.</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMBO_REF_LAYER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_NAV, _NAV)</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // explicit reference to self instead of the default.</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// name result chord keys</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(AB_ESC, KC_ESC, KC_A, KC_B)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(JK_TAB, KC_TAB, KC_J, KC_K)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(JKL_SPC, KC_SPC, KC_J, KC_K, KC_L)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(BSSL_CLR, KC_NO, KC_BSPC, KC_LSFT)</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // using KC_NO as the resulting keycode is the same as COMBO_ACTION before.</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">COMB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(QW_UNDO, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">C</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_Z), KC_Q, KC_W)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">SUBS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(TH_THE, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;the&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KC_T, KC_H)</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // SUBS uses SEND_STRING to output the given string.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">...</span></span></code></pre></div><p>For small to huge ready made dictionaries of combos, you can check out <a href="http://combos.gboards.ca/" target="_blank" rel="noreferrer">http://combos.gboards.ca/</a>.</p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-09de1c0f><!--[--><!--]--><!----><nav class="prev-next" data-v-09de1c0f><div class="pager" data-v-09de1c0f><a class="VPLink link pager-link prev" href="/features/caps_word" data-v-09de1c0f><!--[--><span class="desc" data-v-09de1c0f>Previous page</span><span class="title" data-v-09de1c0f>Caps Word</span><!--]--></a></div><div class="pager" data-v-09de1c0f><a class="VPLink link pager-link next" href="/feature_debounce_type" data-v-09de1c0f><!--[--><span class="desc" data-v-09de1c0f>Next page</span><span class="title" data-v-09de1c0f>Debounce API</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"features_encoders.md\":\"BY--6WYQ\",\"drivers_is31fl3743a.md\":\"9TiNS_bm\",\"breaking_changes_history.md\":\"CJNU0o77\",\"platformdev_blackpill_f4x1.md\":\"DvObLRuk\",\"newbs_learn_more_resources.md\":\"Dj1s2BDG\",\"features_pointing_device.md\":\"DP6-XwL6\",\"coding_conventions_c.md\":\"DdrpXBEh\",\"other_vscode.md\":\"Di3vOySR\",\"changelog_20210529.md\":\"CR1YNfZX\",\"coding_conventions_python.md\":\"BV-OK1s5\",\"changelog_20201128.md\":\"7XXL02Bn\",\"configurator_troubleshooting.md\":\"BxGLPT8G\",\"configurator_step_by_step.md\":\"CB5U_ksW\",\"drivers_is31fl3737.md\":\"BgIEmU0V\",\"changelog_20230528.md\":\"nX9R48zP\",\"changelog_20240825.md\":\"BZM0WSFG\",\"drivers_uart.md\":\"BNBs-m3h\",\"drivers_ws2812.md\":\"D9E3Wb-Y\",\"cli.md\":\"BLzAdA6l\",\"configurator_architecture.md\":\"DEFTvTlS\",\"changelog_20220226.md\":\"BWO5r_ec\",\"cli_development.md\":\"3xFA2OvS\",\"drivers_is31fl3733.md\":\"B2SurzgJ\",\"feature_layers.md\":\"8GwBUTZN\",\"feature_layouts.md\":\"qcy8hNMO\",\"feature_macros.md\":\"By1M5R8G\",\"features_leader_key.md\":\"DBQTnBRh\",\"easy_maker.md\":\"DAfbIK4w\",\"features_digitizer.md\":\"DGIGZFVx\",\"drivers_is31fl3236.md\":\"BsbsN_Nu\",\"drivers_is31fl3729.md\":\"uZAm-59P\",\"changelog_20230827.md\":\"NSPhmB6l\",\"features_midi.md\":\"u3tHPteB\",\"drivers_is31fl3742a.md\":\"CKPjB5T1\",\"chibios_upgrade_instructions.md\":\"B5dMtL5R\",\"api_development_environment.md\":\"EhJClb9f\",\"config_options.md\":\"DvMeqlpB\",\"features_oled_driver.md\":\"D9wJVdL1\",\"drivers_adc.md\":\"DzU8txf8\",\"feature_advanced_keycodes.md\":\"CX8dJkY-\",\"features_combo.md\":\"C-GfDyXJ\",\"features_send_string.md\":\"vM68un4v\",\"features_command.md\":\"Byl9YoT7\",\"feature_converters.md\":\"DcwmzUcD\",\"features_secure.md\":\"BX7jFvW5\",\"quantum_painter_qgf.md\":\"BJNSu2s0\",\"features_stenography.md\":\"Bb_IhUGl\",\"unit_testing.md\":\"u3fgbGUj\",\"features_swap_hands.md\":\"DOhgGQf9\",\"breaking_changes_instructions.md\":\"C99NYDjO\",\"support_deprecation_policy.md\":\"CCo4ljiw\",\"cli_tab_complete.md\":\"ChaxfzYo\",\"changelog_20240526.md\":\"DAmAEDG5\",\"data_driven_config.md\":\"BvLQ7P20\",\"features_repeat_key.md\":\"2ulQYjgy\",\"drivers_apa102.md\":\"Cl7Xer3S\",\"documentation_templates.md\":\"Bhkum0wD\",\"syllabus.md\":\"B_ARGkLg\",\"changelog_20200530.md\":\"Dk-vRpTQ\",\"driver_installation_zadig.md\":\"CX9-BACt\",\"custom_matrix.md\":\"DMnRw_5l\",\"drivers_audio.md\":\"mqaz6p5N\",\"tap_hold.md\":\"DD8WTSla\",\"cli_configuration.md\":\"CGSB128P\",\"drivers_flash.md\":\"DhWcHp8S\",\"quantum_painter_lvgl.md\":\"DobNbSgA\",\"drivers_gpio.md\":\"C5PvyJVh\",\"compatible_microcontrollers.md\":\"6HA6FJZJ\",\"understanding_qmk.md\":\"f-Bc_eHQ\",\"quantum_painter_rle.md\":\"B07V3m-n\",\"features_programmable_button.md\":\"D332w_PT\",\"features_key_overrides.md\":\"C02U5_E5\",\"features_space_cadet.md\":\"DmNfYRVJ\",\"getting_started_docker.md\":\"mz6HE4Bl\",\"drivers_i2c.md\":\"Cuj87reB\",\"reference_keymap_extras.md\":\"D-__wuxf\",\"features_tri_layer.md\":\"DdnBVinw\",\"how_a_matrix_works.md\":\"JINKbCuX\",\"features_wpm.md\":\"BYf-Xc1H\",\"changelog_20210828.md\":\"DNbHIuuM\",\"getting_started_github.md\":\"OYq7IT7B\",\"hand_wire.md\":\"GiNX60kU\",\"hardware_drivers.md\":\"BUnx48D9\",\"features_rawhid.md\":\"bKKG3KCa\",\"index.md\":\"BFvlZFTs\",\"capabilities_inc.md\":\"Ca9zpMce\",\"feature_userspace.md\":\"BsmY9yWw\",\"mod_tap.md\":\"C7wRKLcf\",\"isp_flashing_guide.md\":\"BiuBpOKX\",\"keycodes_basic.md\":\"CHIeCvwn\",\"faq_build.md\":\"DL_WezA1\",\"configurator_default_keymaps.md\":\"B3v8dlHd\",\"faq_debug.md\":\"DuThValw\",\"drivers_aw20216s.md\":\"CgKehEzB\",\"changelog_20231126.md\":\"D2Ok5QAf\",\"faq_general.md\":\"BOlGsWSk\",\"capabilities.md\":\"DgKwcj5n\",\"keycodes_us_ansi_shifted.md\":\"Cs78SDfM\",\"newbs_building_firmware_workflow.md\":\"DpLVwA7x\",\"how_keyboards_work.md\":\"CB7z8ocb\",\"features_mouse_keys.md\":\"DIChRnuA\",\"newbs_git_resolving_merge_conflicts.md\":\"72w3BRmm\",\"newbs.md\":\"-YYNd3dT\",\"changelog_20190830.md\":\"Drtq3lMy\",\"newbs_bu
</body>
</html>