qmk_firmware/assets/features_auto_shift.md.DOcRLWqv.js

16 lines
41 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"Auto Shift: Why Do We Need a Shift Key?","description":"","frontmatter":{},"headers":[],"relativePath":"features/auto_shift.md","filePath":"features/auto_shift.md","lastUpdated":null}');
const _sfc_main = { name: "features/auto_shift.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="auto-shift-why-do-we-need-a-shift-key" tabindex="-1">Auto Shift: Why Do We Need a Shift Key? <a class="header-anchor" href="#auto-shift-why-do-we-need-a-shift-key" aria-label="Permalink to &quot;Auto Shift: Why Do We Need a Shift Key?&quot;"></a></h1><p>Tap a key and you get its character. Tap a key, but hold it <em>slightly</em> longer and you get its shifted state. Voilà! No shift key needed!</p><h2 id="why-auto-shift" tabindex="-1">Why Auto Shift? <a class="header-anchor" href="#why-auto-shift" aria-label="Permalink to &quot;Why Auto Shift?&quot;"></a></h2><p>Many people suffer from various forms of RSI. A common cause is stretching your fingers repetitively long distances. For us on the keyboard, the pinky does that all too often when reaching for the shift key. Auto Shift looks to alleviate that problem.</p><h2 id="how-does-it-work" tabindex="-1">How Does It Work? <a class="header-anchor" href="#how-does-it-work" aria-label="Permalink to &quot;How Does It Work?&quot;"></a></h2><p>When you tap a key, it stays depressed for a short period of time before it is then released. This depressed time is a different length for everyone. Auto Shift defines a constant <code>AUTO_SHIFT_TIMEOUT</code> which is typically set to twice your normal pressed state time. When you press a key, a timer starts, and if you have not released the key after the <code>AUTO_SHIFT_TIMEOUT</code> period, then a shifted version of the key is emitted. If the time is less than the <code>AUTO_SHIFT_TIMEOUT</code> time, or you press another key, then the normal state is emitted.</p><p>If <code>AUTO_SHIFT_REPEAT</code> is defined, there is keyrepeat support. Holding the key down will repeat the shifted key, though this can be disabled with <code>AUTO_SHIFT_NO_AUTO_REPEAT</code>. If you want to repeat the normal key, then tap it once then immediately (within <code>TAPPING_TERM</code>) hold it down again (this works with the shifted value as well if auto-repeat is disabled).</p><p>There are also the <code>get_auto_shift_repeat</code> and <code>get_auto_shift_no_auto_repeat</code> functions for more granular control. Neither will have an effect unless <code>AUTO_SHIFT_REPEAT_PER_KEY</code> or <code>AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY</code> respectively are defined.</p><h2 id="are-there-limitations-to-auto-shift" tabindex="-1">Are There Limitations to Auto Shift? <a class="header-anchor" href="#are-there-limitations-to-auto-shift" aria-label="Permalink to &quot;Are There Limitations to Auto Shift?&quot;"></a></h2><p>Yes, unfortunately.</p><ol><li>You will have characters that are shifted when you did not intend on shifting, and other characters you wanted shifted, but were not. This simply comes down to practice. As we get in a hurry, we think we have hit the key long enough for a shifted version, but we did not. On the other hand, we may think we are tapping the keys, but really we have held it for a little longer than anticipated.</li><li>Additionally, with keyrepeat the desired shift state can get mixed up. It will always &#39;belong&#39; to the last key pressed. For example, keyrepeating a capital and then tapping something lowercase (whether or not it&#39;s an Auto Shift key) will result in the capital&#39;s <em>key</em> still being held, but shift not.</li><li>Auto Shift does not apply to Tap Hold keys. For automatic shifting of Tap Hold keys see <a href="#retro-shift">Retro Shift</a>.</li></ol><h2 id="how-do-i-enable-auto-shift" tabindex="-1">How Do I Enable Auto Shift? <a class="header-anchor" href="#how-do-i-enable-auto-shift" aria-label="Permalink to &quot;How Do I Enable Auto Shift?&quot;"></a></h2><p>Add to your <code>rules.mk</code> in the keymap folder:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>AUTO_SHIFT_ENABLE = yes</span></span></code></pre></div><p>If no <code>rules.mk</code> exists, you can cr
const _hoisted_95 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_95);
}
const auto_shift = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
auto_shift as default
};