qmk_firmware/assets/getting_started_introduction.md.CJdmri3z.js

16 lines
6.1 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":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"getting_started_introduction.md","filePath":"getting_started_introduction.md","lastUpdated":null}');
const _sfc_main = { name: "getting_started_introduction.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="introduction" tabindex="-1">Introduction <a class="header-anchor" href="#introduction" aria-label="Permalink to &quot;Introduction&quot;"></a></h1><p>This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.</p><h2 id="basic-qmk-structure" tabindex="-1">Basic QMK Structure <a class="header-anchor" href="#basic-qmk-structure" aria-label="Permalink to &quot;Basic QMK Structure&quot;"></a></h2><p>QMK is a fork of <a href="https://github.com/tmk" target="_blank" rel="noreferrer">Jun Wako</a>&#39;s <a href="https://github.com/tmk/tmk_keyboard" target="_blank" rel="noreferrer">tmk_keyboard</a> project. The original TMK code, with modifications, can be found in the <code>tmk_core</code> folder. The QMK additions to the project may be found in the <code>quantum</code> folder. Keyboard projects may be found in the <code>keyboards</code> folder.</p><h3 id="userspace-structure" tabindex="-1">Userspace Structure <a class="header-anchor" href="#userspace-structure" aria-label="Permalink to &quot;Userspace Structure&quot;"></a></h3><p>Within the folder <code>users</code> is a directory for each user. This is a place for users to put code that they might use between keyboards. See the docs for <a href="./feature_userspace">Userspace feature</a> for more information.</p><h3 id="keyboard-project-structure" tabindex="-1">Keyboard Project Structure <a class="header-anchor" href="#keyboard-project-structure" aria-label="Permalink to &quot;Keyboard Project Structure&quot;"></a></h3><p>Within the folder <code>keyboards</code>, its subfolder <code>handwired</code> and its vendor and manufacture subdirectories e.g. <code>clueboard</code> is a directory for each keyboard project, for example <code>qmk_firmware/keyboards/clueboard/2x1800</code>. Within it, you&#39;ll find the following structure:</p><ul><li><code>keymaps/</code>: Different keymaps that can be built</li><li><code>rules.mk</code>: The file that sets the default &quot;make&quot; options. Do not edit this file directly, instead use a keymap specific <code>rules.mk</code>.</li><li><code>config.h</code>: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific <code>config.h</code>.</li><li><code>info.json</code>: The file used for setting layout for QMK Configurator. See <a href="./reference_configurator_support">Configurator Support</a> for more information.</li><li><code>readme.md</code>: A brief overview of the keyboard.</li><li><code>&lt;keyboardName&gt;.h</code>: This file is where the keyboard layout is defined against the keyboard&#39;s switch matrix.</li><li><code>&lt;keyboardName&gt;.c</code>: This file is where you can find custom code for the keyboard.</li></ul><p>For more information on project structure, see <a href="./hardware_keyboard_guidelines">QMK Keyboard Guidelines</a>.</p><h3 id="keymap-structure" tabindex="-1">Keymap Structure <a class="header-anchor" href="#keymap-structure" aria-label="Permalink to &quot;Keymap Structure&quot;"></a></h3><p>In every keymap folder, the following files may be found. Only <code>keymap.c</code> is required, and if the rest of the files are not found the default options will be chosen.</p><ul><li><code>config.h</code>: the options to configure your keymap</li><li><code>keymap.c</code>: all of your keymap code, required</li><li><code>rules.mk</code>: the features of QMK that are enabled</li><li><code>readme.md</code>: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur.</li></ul><h1 id="the-config-h-file" tabindex="-1">The <code>config.h</code> File <a class="header-anchor" href="#the-config-h-file" aria-label="Permalink to &quot;The `config.h` File&quot;"></a></h1><p>There are 3 possible <code>config.h</code> locations:</p><ul><li>keyboard (<code>/keyboards/&lt;keyboard&gt;/config.h</code>)</li><li>userspace (<code>/users/&lt;user&gt;/config.h</code>)</li><li>keymap (<code>/keyboards/&lt;keyboard&gt;/keymaps/&lt;keymap&gt;/config.h</code>)</li></ul><p>The build system automatically picks up the config files in the above order. If you wish to override any setting set by a previous <code>config.h</code> you will need to first include some boilerplate code for the settings you wish to change.</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>#pragma once</span></span></code></pre></div><p>Then to override a setting from the previous <code>config.h</code> file you must <code>#undef</code> and then <code>#define</code> the setting again.</p><p>The boilerplate code and setting look like this together:</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>#pragma once</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>// overrides go here!</span></span>\n<span class="line"><span>#undef MY_SETTING</span></span>\n<span class="line"><span>#define MY_SETTING 4</span></span></code></pre></div>', 21);
const _hoisted_22 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_22);
}
const getting_started_introduction = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
getting_started_introduction as default
};