mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-27 01:56:43 +00:00
16 lines
25 KiB
JavaScript
16 lines
25 KiB
JavaScript
|
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
|
|||
|
const __pageData = JSON.parse('{"title":"Mod-Tap","description":"","frontmatter":{},"headers":[],"relativePath":"mod_tap.md","filePath":"mod_tap.md"}');
|
|||
|
const _sfc_main = { name: "mod_tap.md" };
|
|||
|
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="mod-tap" tabindex="-1">Mod-Tap <a class="header-anchor" href="#mod-tap" aria-label="Permalink to "Mod-Tap""></a></h1><p>The Mod-Tap key <code>MT(mod, kc)</code> acts like a modifier when held, and a regular keycode when tapped. In other words, you can have a key that sends Escape when you tap it, but functions as a Control or Shift key when you hold it down.</p><p>The modifiers this keycode and <code>OSM()</code> accept are prefixed with <code>MOD_</code>, not <code>KC_</code>:</p><table><thead><tr><th>Modifier</th><th>Description</th></tr></thead><tbody><tr><td><code>MOD_LCTL</code></td><td>Left Control</td></tr><tr><td><code>MOD_LSFT</code></td><td>Left Shift</td></tr><tr><td><code>MOD_LALT</code></td><td>Left Alt</td></tr><tr><td><code>MOD_LGUI</code></td><td>Left GUI (Windows/Command/Meta key)</td></tr><tr><td><code>MOD_RCTL</code></td><td>Right Control</td></tr><tr><td><code>MOD_RSFT</code></td><td>Right Shift</td></tr><tr><td><code>MOD_RALT</code></td><td>Right Alt (AltGr)</td></tr><tr><td><code>MOD_RGUI</code></td><td>Right GUI (Windows/Command/Meta key)</td></tr><tr><td><code>MOD_HYPR</code></td><td>Hyper (Left Control, Shift, Alt and GUI)</td></tr><tr><td><code>MOD_MEH</code></td><td>Meh (Left Control, Shift, and Alt)</td></tr></tbody></table><p>You can combine these by ORing them together like so:</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;">MT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(MOD_LCTL </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> MOD_LSFT, KC_ESC)</span></span></code></pre></div><p>This key would activate Left Control and Left Shift when held, and send Escape when tapped.</p><p>For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:</p><table><thead><tr><th>Key</th><th>Aliases</th><th>Description</th></tr></thead><tbody><tr><td><code>LCTL_T(kc)</code></td><td><code>CTL_T(kc)</code></td><td>Left Control when held, <code>kc</code> when tapped</td></tr><tr><td><code>LSFT_T(kc)</code></td><td><code>SFT_T(kc)</code></td><td>Left Shift when held, <code>kc</code> when tapped</td></tr><tr><td><code>LALT_T(kc)</code></td><td><code>LOPT_T(kc)</code>, <code>ALT_T(kc)</code>, <code>OPT_T(kc)</code></td><td>Left Alt when held, <code>kc</code> when tapped</td></tr><tr><td><code>LGUI_T(kc)</code></td><td><code>LCMD_T(kc)</code>, <code>LWIN_T(kc)</code>, <code>GUI_T(kc)</code>, <code>CMD_T(kc)</code>, <code>WIN_T(kc)</code></td><td>Left GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>RCTL_T(kc)</code></td><td></td><td>Right Control when held, <code>kc</code> when tapped</td></tr><tr><td><code>RSFT_T(kc)</code></td><td></td><td>Right Shift when held, <code>kc</code> when tapped</td></tr><tr><td><code>RALT_T(kc)</code></td><td><code>ROPT_T(kc)</code>, <code>ALGR_T(kc)</code></td><td>Right Alt when held, <code>kc</code> when tapped</td></tr><tr><td><code>RGUI_T(kc)</code></td><td><code>RCMD_T(kc)</code>, <code>RWIN_T(kc)</code></td><td>Right GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>LSG_T(kc)</code></td><td><code>SGUI_T(kc)</code>, <code>SCMD_T(kc)</code>, <code>SWIN_T(kc)</code></td><td>Left Shift and GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>LAG_T(kc)</code></td><td></td><td>Left Alt and GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>RSG_T(kc)</code></td><td></td><td>Right Shift and GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>RAG_T(kc)</code></td><td></td><td>Right Alt and GUI when held, <code>kc</code> when tapped</td></tr><tr><td><code>LCA_T(kc)</code></td><td></td><td>Left Control and Alt when held, <code>kc</code> when tapped</td></tr><tr><td><code>LSA_T(k
|
|||
|
const _hoisted_26 = [
|
|||
|
_hoisted_1
|
|||
|
];
|
|||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
|
return openBlock(), createElementBlock("div", null, _hoisted_26);
|
|||
|
}
|
|||
|
const mod_tap = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|||
|
export {
|
|||
|
__pageData,
|
|||
|
mod_tap as default
|
|||
|
};
|