qmk_firmware/assets/features_repeat_key.md.C3eWDUWn.js

16 lines
69 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
const __pageData = JSON.parse('{"title":"Repeat Key","description":"","frontmatter":{},"headers":[],"relativePath":"features/repeat_key.md","filePath":"features/repeat_key.md"}');
const _sfc_main = { name: "features/repeat_key.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="repeat-key" tabindex="-1">Repeat Key <a class="header-anchor" href="#repeat-key" aria-label="Permalink to &quot;Repeat Key&quot;"></a></h1><p>The Repeat Key performs the action of the last pressed key. Tapping the Repeat Key after tapping the <kbd>Z</kbd> key types another &quot;<code>z</code>.&quot; This is useful for typing doubled letters, like the <code>z</code> in &quot;<code>dazzle</code>&quot;: a double tap on <kbd>Z</kbd> can instead be a roll from <kbd>Z</kbd> to <kbd>Repeat</kbd>, which is potentially faster and more comfortable. The Repeat Key is also useful for hotkeys, like repeating Ctrl + Shift + Right Arrow to select by word.</p><p>Repeat Key remembers mods that were active with the last key press. These mods are combined with any additional mods while pressing the Repeat Key. If the last press key was <kbd>Ctrl</kbd> + <kbd>Z</kbd>, then <kbd>Shift</kbd> + <kbd>Repeat</kbd> performs Ctrl + Shift + <code>Z</code>.</p><h2 id="how-do-i-enable-repeat-key" tabindex="-1">How do I enable Repeat Key <a class="header-anchor" href="#how-do-i-enable-repeat-key" aria-label="Permalink to &quot;How do I enable Repeat Key&quot;"></a></h2><p>In your <code>rules.mk</code>, add:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">REPEAT_KEY_ENABLE = yes</span></span></code></pre></div><p>Then pick a key in your keymap and assign it the keycode <code>QK_REPEAT_KEY</code> (short alias <code>QK_REP</code>). Optionally, use the keycode <code>QK_ALT_REPEAT_KEY</code> (short alias <code>QK_AREP</code>) on another key.</p><h2 id="keycodes" tabindex="-1">Keycodes <a class="header-anchor" href="#keycodes" aria-label="Permalink to &quot;Keycodes&quot;"></a></h2><table><thead><tr><th>Keycode</th><th>Aliases</th><th>Description</th></tr></thead><tbody><tr><td><code>QK_REPEAT_KEY</code></td><td><code>QK_REP</code></td><td>Repeat the last pressed key</td></tr><tr><td><code>QK_ALT_REPEAT_KEY</code></td><td><code>QK_AREP</code></td><td>Perform alternate of the last key</td></tr></tbody></table><h2 id="alternate-repeating" tabindex="-1">Alternate Repeating <a class="header-anchor" href="#alternate-repeating" aria-label="Permalink to &quot;Alternate Repeating&quot;"></a></h2><p>The Alternate Repeat Key performs the &quot;alternate&quot; action of the last pressed key if it is defined. By default, Alternate Repeat is defined for navigation keys to act in the reverse direction. When the last key is the common &quot;select by word&quot; hotkey Ctrl + Shift + Right Arrow, the Alternate Repeat Key performs Ctrl + Shift + Left Arrow, which together with the Repeat Key enables convenient selection by words in either direction.</p><p>Alternate Repeat is enabled with the Repeat Key by default. Optionally, to reduce firmware size, Alternate Repeat may be disabled by adding in config.h:</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;"> NO_ALT_REPEAT_KEY</span></span></code></pre></div><p>The following alternate keys are defined by default. See <code>get_alt_repeat_key_keycode_user()</code> below for how to change or add to these definitions. Where it makes sense, these definitions also include combinations with mods, like Ctrl + Left Ctrl + Right Arrow.</p><p><strong>Navigation</strong></p><table><thead><tr><th>Keycodes</th><th>Description</th></tr></thead><tbody><tr><td><code>KC_LEFT</code> <code>KC_RGHT</code></td><td>Left Right Arrow</td></tr><tr><td><code>KC_UP</code> <code>KC_DOWN</code></td><td>Up Down Arrow</td></tr><tr><td><code>KC_HOME</code> <EFBFBD><EFBFBD>
const _hoisted_66 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_66);
}
const repeat_key = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
repeat_key as default
};