qmk_firmware/assets/reference_configurator_support.md.rxGtMJPf.js

16 lines
38 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":"Supporting Your Keyboard in QMK Configurator","description":"","frontmatter":{},"headers":[],"relativePath":"reference_configurator_support.md","filePath":"reference_configurator_support.md","lastUpdated":null}');
const _sfc_main = { name: "reference_configurator_support.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="supporting-your-keyboard-in-qmk-configurator" tabindex="-1">Supporting Your Keyboard in QMK Configurator <a class="header-anchor" href="#supporting-your-keyboard-in-qmk-configurator" aria-label="Permalink to &quot;Supporting Your Keyboard in QMK Configurator&quot;"></a></h1><p>This page covers how to properly support keyboards in the <a href="https://config.qmk.fm/" target="_blank" rel="noreferrer">QMK Configurator</a>.</p><h2 id="how-the-configurator-understands-keyboards" tabindex="-1">How the Configurator Understands Keyboards <a class="header-anchor" href="#how-the-configurator-understands-keyboards" aria-label="Permalink to &quot;How the Configurator Understands Keyboards&quot;"></a></h2><p>To understand how the Configurator understands keyboards, first one must understand layout macros. For this exercise, we&#39;re going to imagine a 17-key numpad PCB, which we&#39;re going to call <code>numpad</code>.</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>|---------------|</span></span>\n<span class="line"><span>|NLk| / | * | - |</span></span>\n<span class="line"><span>|---+---+---+---|</span></span>\n<span class="line"><span>|7 |8 |9 | + |</span></span>\n<span class="line"><span>|---+---+---| |</span></span>\n<span class="line"><span>|4 |5 |6 | |</span></span>\n<span class="line"><span>|---+---+---+---|</span></span>\n<span class="line"><span>|1 |2 |3 |Ent|</span></span>\n<span class="line"><span>|-------+---| |</span></span>\n<span class="line"><span>|0 | . | |</span></span>\n<span class="line"><span>|---------------|</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>For more on layout macros, see <a href="./understanding_qmk#matrix-scanning">Understanding QMK: Matrix Scanning</a> and <a href="./understanding_qmk#matrix-to-physical-layout-map">Understanding QMK: Matrix to Physical Layout Map</a>.</p></div><p>The Configurator&#39;s API reads the keyboard&#39;s <code>.h</code> file from <code>qmk_firmware/keyboards/&lt;keyboard&gt;/&lt;keyboard&gt;.h</code>. For our numpad, this file would be <code>qmk_firmware/keyboards/numpad/numpad.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;">#pragma</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> once</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#define</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LAYOUT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">( </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k00, k01, k02, k03, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k10, k11, k12, k13, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k20, k21, k22, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k30, k31, k32, k33, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k40, k42 </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ) { </span><
const _hoisted_40 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_40);
}
const reference_configurator_support = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
reference_configurator_support as default
};