qmk_firmware/assets/features_caps_word.md.CYfZhNN7.js

16 lines
17 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":"Caps Word","description":"","frontmatter":{},"headers":[],"relativePath":"features/caps_word.md","filePath":"features/caps_word.md","lastUpdated":null}');
const _sfc_main = { name: "features/caps_word.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="caps-word" tabindex="-1">Caps Word <a class="header-anchor" href="#caps-word" aria-label="Permalink to &quot;Caps Word&quot;"></a></h1><p>It is often useful to type a single word in all capitals, for instance abbreviations like &quot;QMK&quot;, or in code, identifiers like <code>KC_SPC</code>. &quot;Caps Word&quot; is a modern alternative to Caps Lock:</p><ul><li><p>While active, letters are capitalized and <code>-</code> becomes <code>_</code>. The <code>_</code> makes it easier to type constant names (eg &#39;PROGRAM_CONSTANTS&#39;).</p></li><li><p>Caps Word automatically disables itself at the end of the word. That is, it stops by default once a space or any key other than <code>KC_A</code>--<code>KC_Z</code>, <code>KC_0</code>--<code>KC_9</code>, <code>KC_MINS</code>, <code>KC_UNDS</code>, <code>KC_DELETE</code>, or <code>KC_BACKSPACE</code> is pressed. Caps Word also disables itself if the keyboard is idle for 5 seconds. This is configurable, see below.</p></li><li><p>To avoid requiring a dedicated key for Caps Word, there is an option (<code>BOTH_SHIFTS_TURNS_ON_CAPS_WORD</code>) to activate Caps Word by simultaneously pressing both shift keys. See below for other options.</p></li><li><p>The implementation does not use the Caps Lock (<code>KC_CAPS</code>) keycode. Caps Word works even if you&#39;re remapping Caps Lock at the OS level to Ctrl or something else, as Emacs and Vim users often do. As a consequence, Caps Word does not follow the typical Caps Lock behaviour and may thus act in potentially unexpected ways, especially when using an <em>OS</em> keyboard layout other than US or UK. For example, Dvorak&#39;s <kbd>, &lt;</kbd> key (<code>DV_COMM</code> aka <code>KC_W</code>) will get shifted because Caps Word interprets that keycode as the letter &#39;W&#39; by default, the Spanish <kbd>Ñ</kbd> key (<code>ES_NTIL</code> aka <code>KC_SCLN</code>) will not get capitalized because Caps Word interprets it as the semicolon &#39;;&#39; punctuation character, and the US hyphen key (<code>KC_MINS</code>), while unaffected by Caps Lock, is shifted by Caps Word. However, this is not really a problem because you can <a href="#configure-which-keys-are-word-breaking">configure which keys should Caps Word shift</a>.</p></li></ul><h2 id="how-do-i-enable-caps-word" tabindex="-1">How do I enable Caps Word <a class="header-anchor" href="#how-do-i-enable-caps-word" aria-label="Permalink to &quot;How do I enable Caps Word {#how-do-i-enable-caps-word}&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;">CAPS_WORD_ENABLE = yes</span></span></code></pre></div><p>Next, use one the following methods to activate Caps Word:</p><ul><li><p><strong>Activate by pressing a key</strong>: Use the <code>QK_CAPS_WORD_TOGGLE</code> keycode (short alias <code>CW_TOGG</code>) in your keymap.</p></li><li><p><strong>Activate by pressing Left Shift + Right Shift</strong>: Add <code>#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD</code> to config.h. You may also need to disable or reconfigure Command, details below. Then, simultaneously pressing both left and right shifts turns on Caps Word. This method works with the plain <code>KC_LSFT</code> and <code>KC_RSFT</code> keycodes as well as one-shot shifts and Space Cadet shifts. If your shift keys are mod-taps, hold both shift mod-tap keys until the tapping term, then release them.</p></li><li><p><strong>Activate by double tapping Left Shift</strong>: Add <code>#define DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD</code> config.h. Then, double tapping Left Shift turns on Caps Word. This method works with <code>KC_LSFT</code> or one-shot Left Shift <code>OSM(MOD_LSFT)</code>. To count as a double tap, the maximum time in milliseconds between taps is <code>TAPPING_TERM</code>, or if us
const _hoisted_35 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_35);
}
const caps_word = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
caps_word as default
};