qmk_firmware/assets/features_tri_layer.md.DkFd4pCh.js

16 lines
5.2 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.Cauyuiy8.js";
const __pageData = JSON.parse('{"title":"Tri Layers","description":"","frontmatter":{},"headers":[],"relativePath":"features/tri_layer.md","filePath":"features/tri_layer.md","lastUpdated":null}');
const _sfc_main = { name: "features/tri_layer.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="tri-layers" tabindex="-1">Tri Layers <a class="header-anchor" href="#tri-layers" aria-label="Permalink to &quot;Tri Layers {#tri-layers}&quot;"></a></h1><p>This enables support for the OLKB style &quot;Tri Layer&quot; keycodes. These function similar to the <code>MO</code> (momentary) function key, but if both the &quot;Lower&quot; and &quot;Upper&quot; keys are pressed, it activates a third &quot;Adjust&quot; layer. To enable this functionality, add this line to your <code>rules.mk</code>:</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;">TRI_LAYER_ENABLE = yes</span></span></code></pre></div><p>Note that the &quot;upper&quot;, &quot;lower&quot; and &quot;adjust&quot; names don&#39;t have a particular significance, they are just used to identify and clarify the behavior. Layers are processed from highest numeric value to lowest, however the values are not required to be consecutive.</p><p>For a detailed explanation of how the layer stack works, check out <a href="./../keymap#keymap-and-layers">Keymap Overview</a>.</p><h2 id="keycodes" tabindex="-1">Keycodes <a class="header-anchor" href="#keycodes" aria-label="Permalink to &quot;Keycodes {#keycodes}&quot;"></a></h2><table><thead><tr><th>Keycode</th><th>Alias</th><th>Description</th></tr></thead><tbody><tr><td><code>QK_TRI_LAYER_LOWER</code></td><td><code>TL_LOWR</code></td><td>Momentarily enables the &quot;lower&quot; layer. Enables the &quot;adjust&quot; layer if the &quot;upper&quot; layer is also enabled.</td></tr><tr><td><code>QK_TRI_LAYER_UPPER</code></td><td><code>TL_UPPR</code></td><td>Momentarily enables the &quot;upper&quot; layer. Enables the &quot;adjust&quot; layer if the &quot;lower&quot; layer is also enabled.</td></tr></tbody></table><h2 id="configuration" tabindex="-1">Configuration <a class="header-anchor" href="#configuration" aria-label="Permalink to &quot;Configuration&quot;"></a></h2><p>To change the default values for the layers, you can change these defines, in your <code>config.h</code></p><table><thead><tr><th>Config name</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>TRI_LAYER_LOWER_LAYER</code></td><td><code>1</code></td><td>Sets the default for the &quot;lower&quot; layer.</td></tr><tr><td><code>TRI_LAYER_UPPER_LAYER</code></td><td><code>2</code></td><td>Sets the default for the &quot;upper&quot; layer.</td></tr><tr><td><code>TRI_LAYER_ADJUST_LAYER</code></td><td><code>3</code></td><td>Sets the default for the &quot;adjust&quot; layer.</td></tr></tbody></table><p>Eg, if you wanted to set the &quot;Adjust&quot; layer to be layer 5, you&#39;d add this to your <code>config.h</code>:</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;"> TRI_LAYER_ADJUST_LAYER</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 5</span></span></code></pre></div><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><table><thead><tr><th>Function name</th><th>Description</th></tr></thead><tbody><tr><td><code>set_tri_layer_lower_layer(layer)</code></td><td>Changes the &quot;lower&quot; layer*.</td></tr><tr><td><code>set_tri_layer_upper_layer(layer)</code></td><td>Changes the &quot;upper&quot; layer*.</td></tr><tr><td><code>set_tri_layer_adjust_layer(layer)</code></td><td>Changes the &quot;adjust&quot; layer*.</td></tr><tr><td><code>set_tri_layer_layers(lower, upper, adjust)</code></td><td>Sets the &quot;lower&quot;, &quot;upper&quot; and &quot;adjust&quot; layers*.</td></tr><tr><td><code>get_tri_layer_lower_layer()</code></td><td>Gets the current &quot;lower&quot; layer.</td></tr><tr><td><code>get_tri_layer_upper_layer()</code></td><td>Gets the current &quot;upper&quot; layer.</td></tr><tr><td><code>get_tri_layer_adjust_layer()</code></td><td>Gets the current &quot;adjust&quot; layer.</td></tr></tbody></table><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Note: these settings are not persistent, and will be reset to the default on power loss or power cycling of the controller.</p></div>', 15);
const _hoisted_16 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_16);
}
const tri_layer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
tri_layer as default
};