<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> NO_AUTO_SHIFT_SPECIAL</span></span></code></pre></div><h3id="auto-shift-timeout-value-in-ms"tabindex="-1">AUTO_SHIFT_TIMEOUT (Value in ms) <aclass="header-anchor"href="#auto-shift-timeout-value-in-ms"aria-label="Permalink to "AUTO_SHIFT_TIMEOUT (Value in ms)""></a></h3><p>This controls how long you have to hold a key before you get the shifted state. Obviously, this is different for everyone. For the common person, a setting of 135 to 150 works great. However, one should start with a value of at least 175, which is the default value. Then work down from there. The idea is to have the shortest time required to get the shifted state without having false positives.</p><p>Play with this value until things are perfect. Many find that all will work well at a given value, but one or two keys will still emit the shifted state on occasion. This is simply due to habit and holding some keys a little longer than others. Once you find this value, work on tapping your problem keys a little quicker than normal and you will be set.</p><divclass="tip custom-block"><pclass="custom-block-title">TIP</p><p>Auto Shift has three special keys that can help you get this value right very quick. See "Auto Shift Setup" for more details!</p></div><p>For more granular control of this feature, you can add the following 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;"> AUTO_SHIFT_TIMEOUT_PER_KEY</span></span></code></pre></div><p>You can then add the following function to your keymap:</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;">uint16_t</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_autoshift_timeout</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;">record</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Note that you cannot override individual keys that are in one of those groups if you are using them; trying to add a case for <code>KC_A</code> in the above example will not compile as <code>AUTO_SHIFT_ALPHA</code> is there. A possible solution is a second switch above to handle individual keys with no default case and only referencing the groups in the below fallback switch.</p><h3id="no-auto-shift-special-simple-define"tabindex="-1">NO_AUTO_SHIFT_SPECIAL (simple define) <aclass="header-anchor"href="#no-auto-shift-special-simple-define"aria-label="Permalink to "NO_AUTO_SHIFT_SPECIAL (simple define)""></a></h3><p>Do not Auto Shift special keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>, /?, and the KC_TAB.</p><h3id="no-auto-shift-tab-simple-define"tabindex="-1">NO_AUTO_SHIFT_TAB (simple define) <aclass="header-anchor"href="#no-auto-shift-tab-simple-define"aria-label="Permalink to "NO_AUTO_SHIFT_TAB (simple define)""></a></h3><p>Do not Auto Shift KC_TAB but leave Auto Shift enabled for the other special characters.</p><h3id="no-auto-shift-symbols-simple-define"tabindex="-1">NO_AUTO_SHIFT_SYMBOLS (simple define) <aclass="header-anchor"href="#no-auto-shift-symbols-simple-define"aria-label="Permalink to "NO_AUTO_SHIFT_SYMBOLS (simple define)""></a></h3><p>Do not Auto Shift symbol keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>, and /?.</p><h3id="no-auto-shift-numeric-simple-define"tabindex="-1">NO_AUTO_SHIFT_NUMERIC (simple define) <aclass="header-anchor"href="#no-auto-shift-numeric-simple-define"aria-label="Permalink to "NO_AUTO_SHIFT_NUMERIC (simple define)""></a></h3><p>Do not Auto Shift numeric keys, zero through nine.</p><h3id="no-auto-shift-alpha-simple-define"tabindex="-1">NO_AUTO_SHIFT_ALPHA (simple define) <aclass="header-anchor"href="#no-auto-shift-alpha-simple-define"aria-label="Permalink to "NO_AUTO_SHIFT_ALPHA (simple define)""></a></h3><p>Do not Auto Shift alpha characters, which include A through Z.</p><h3id="auto-shift-enter-simple-define"tabindex="-1">AUTO_SHIFT_ENTER (simple define) <aclass="header-anchor"href="#auto-shift-enter-simple-define"aria-label="Permalink to "AUTO_SHIFT_ENTER (simple define)""></a></h3><p>Auto Shift the enter key.</p><h3id="auto-shift-per-key"tabindex="-1">Auto Shift Per Key <aclass="header-anchor"href="#auto-shift-per-key"aria-label="Permalink to "Auto Shift Per Key""></a></h3><p>There are functions that allows you to determine which keys should be autoshifted, much like the tap-hold keys.</p><p>The first of these, used to simply add a key to Auto Shift, is <code>get_custom_auto_shifted_key</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;">bool</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_custom_auto_shifted_key</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;">record</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>For more granular control, there is <code>get_auto_shifted_key</code>. The default function looks 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:#D73A49;--shiki-dark:#F97583;">bool</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_auto_shifted_key</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;">record</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>This functionality is enabled by default, and does not need a define.</p><h3id="auto-shift-repeat-simple-define"tabindex="-1">AUTO_SHIFT_REPEAT (simple define) <aclass="header-anchor"href="#auto-shift-repeat-simple-define"aria-label="Permalink to "AUTO_SHIFT_REPEAT (simple define)""></a></h3><p>Enables keyrepeat.</p><h3id="auto-shift-no-auto-repeat-simple-define"tabindex="-1">AUTO_SHIFT_NO_AUTO_REPEAT (simple define) <aclass="header-anchor"href="#auto-shift-no-auto-repeat-simple-define"aria-label="Permalink to "AUTO_SHIFT_NO_AUTO_REPEAT (simple define)""></a></h3><p>Disables automatically keyrepeating when <code>AUTO_SHIFT_TIMEOUT</code> is exceeded.</p><h3id="auto-shift-alpha-predefined-key-group"tabindex="-1">AUTO_SHIFT_ALPHA (predefined key group) <aclass="header-anchor"href="#auto-shift-alpha-predefined-key-group"aria-label="Permalink to "AUTO_SHIFT_ALPHA (predefined key group)""></a></h3><p>A predefined group of keys representing A through Z.</p><h3id="auto-shift-numeric-predefined-key-group"tabindex="-1">AUTO_SHIFT_NUMERIC (predefined key group) <aclass="header-anchor"href="#auto-shift-numeric-predefined-key-group"aria-label="Permalink to "AUTO_SHIFT_NUMERIC (predefined key group)""></a></h3><p>A predefined group of keys representing 0 through 9. Note, these are defined as 1 through 0 since that is the order they normally appear in.</p><h3id="auto-shift-symbols-predefined-key-group"tabindex="-1">AUTO_SHIFT_SYMBOLS (predefined key group) <aclass="header-anchor"href="#auto-shift-symbols-predefined-key-group"aria-label="Permalink to "AUTO_SHIFT_SYMBOLS (predefined key group)""></a></h3><p>A predefined group of keys representing symbolic characters which include -_, =+, [{, ]}, ;:, '", ,<, .>, and /?.</p><h3id="auto-shift-special-predefined-key-group"tabindex="-1">AUTO_SHIFT_SPECIAL (predefined key group) <aclass="header-anchor"href="#auto-shift-special-predefined-key-group"aria-label="Permalink to "AUTO_SHIFT_SPECIAL (predefined key group)""></a></h3><p>A predefined group of keys that combines AUTO_SHIFT_SYMBOLS and KC_TAB.</p><h2id="custom-shifted-values"tabindex="-1">Custom Shifted Values <aclass="header-anchor"href="#custom-shifted-values"aria-label="Permalink to "Custom Shifted Values""></a></h2><p>Especially on small keyboards, the default shifted value for many keys is not optimal. To provide more customizability, there are two user-definable functions, <code>autoshift_press/release_user</code>. These register or unregister the correct value for the passed key. Below is an example adding period to Auto Shift and making its shifted value exclamation point. Make sure to use weak mods - setting real would make any keys following it use their shifted values as if you were holding the key. Clearing of modifiers is handled by Auto Shift, and the OS-sent shift value if keyrepeating multiple keys is always that of the last key pressed (whether or not it's an Auto Shift key).</p><p>You can also have non-shifted keys for the shifted values (or even no shifted value), just don't set a shift modifier!</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;">bool</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_custom_auto_shifted_key</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><spanstyle="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F9
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2id="retro-shift"tabindex="-1">Retro Shift <aclass="header-anchor"href="#retro-shift"aria-label="Permalink to "Retro Shift""></a></h2><p>Holding and releasing a Tap Hold key without pressing another key will ordinarily result in only the hold. With <code>retro shift</code> enabled this action will instead produce a shifted version of the tap keycode on release.</p><p>It does not require <ahref="./tap_hold#retro-tapping">Retro Tapping</a> to be enabled, and if both are enabled the state of <code>retro tapping</code> will only apply if the tap keycode is not matched by Auto Shift. <code>RETRO_TAPPING_PER_KEY</code> and its corresponding function, however, are checked before <code>retro shift</code> is applied.</p><p>To enable <code>retro shift</code>, add the following 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;"> RETRO_SHIFT</span></span></code></pre></div><p>If <code>RETRO_SHIFT</code> is defined to a value, hold times greater than that value will not produce a tap on release for Mod Taps, and instead triggers the hold action. This enables modifiers to be held for combining with mouse clicks without generating taps on release. For example:</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;"> RETRO_SHIFT</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 500</span></span></code></pre></div><p>Without a value set, holds of any length without an interrupting key will produce the shifted value.</p><p>This value (if set) must be greater than one's <code>TAPPING_TERM</code>, as the key press must be designated as a 'hold' by <code>process_tapping</code> before we send the modifier. <ahref="./tap_hold#tapping-term">Per-key tapping terms</a> can be used as a workaround. There is no such limitation in regards to <code>AUTO_SHIFT_TIMEOUT</code> for normal keys.</p><p><strong>Note:</strong> Tap Holds must be added to Auto Shift, see <ahref="./feature_auto_shift#auto-shift-per-key">here.</a><code>IS_RETRO</code> may be helpful if one wants all Tap Holds retro shifted.</p><h3id="retro-shift-and-tap-hold-configurations"tabindex="-1">Retro Shift and Tap Hold Configurations <aclass="header-anchor"href="#retro-shift-and-tap-hold-configurations"aria-label="Permalink to "Retro Shift and Tap Hold Configurations""></a></h3><p>Tap Hold Configurations work a little differently when using Retro Shift. Referencing <code>TAPPING_TERM</code> makes little sense, as holding longer would result in shifting one of the keys.</p><p><code>RETRO_SHIFT</code> enables <ahref="./tap_hold#permissive-hold"><code>PERMISSIVE_HOLD</code>-like behaviour</a> (even if not explicitly enabled) on all mod-taps for which <code>RETRO_SHIFT</code> applies.</p><h2id="using-auto-shift-setup"tabindex="-1">Using Auto Shift Setup <aclass="header-anchor"href="#using-auto-shift-setup"aria-label="Permalink to "Using Auto Shift Setup""></a></h2><p>This will enable you to define three keys temporarily to increase, decrease and report your <code>AUTO_SHIFT_TIMEOUT</code>.</p><h3id="setup"tabindex="-1">Setup <aclass="header-anchor"href="#setup"aria-label="Permalink to "Setup""></a></h3><p>Map three keys temporarily in your keymap:</p><table><thead><tr><th>Keycode</th><th>Aliases</th><th>Description</th></tr></thead><tbody><tr><td><code>QK_AUTO_SHIFT_DOWN</code></td><td>
<spanclass="line"><span>keyboards right now.</span></span>
<spanclass="line"><span></span></span>
<spanclass="line"><span>[PRESS AS_DOWN quite a few times]</span></span>
<spanclass="line"><span></span></span>
<spanclass="line"><span>heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH</span></span>
<spanclass="line"><span>KEYboArDS RiGHT NOw.</span></span>
<spanclass="line"><span></span></span>
<spanclass="line"><span>[PRESS AS_UP a few times]</span></span>
<spanclass="line"><span></span></span>
<spanclass="line"><span>hello world. my name is john Doe. i am a computer programmer playing with</span></span>
<spanclass="line"><span>keyboarDs right now.</span></span>
<spanclass="line"><span>115</span></span></code></pre></div><p>The keyboard typed <code>115</code> which represents your current <code>AUTO_SHIFT_TIMEOUT</code> value. You are now set! Practice on the <em>D</em> key a little bit that showed up in the testing and you'll be golden.</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="/keycodes_us_ansi_shifted"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Previous page</span><spanclass="title"data-v-09de1c0f>US ANSI Shifted Keys</span><!--]--></a></div><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link next"href="/feature_autocorrect"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Next page</span><spanclass="title"data-v-09de1c0f>Autocorrect</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>