### Run QMK Setup Command Source: https://github.com/qmk/qmk_firmware/blob/master/docs/newbs_getting_started.md Execute this command in your terminal to initiate the QMK setup process. It is recommended to answer 'y' to all prompts for a standard installation. ```bash qmk setup ``` -------------------------------- ### Build Firmware Example for Pachi Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/xelus/pachi/rev1/readme.md Use this command to create a firmware example for the Pachi keyboard after setting up your build environment. Refer to the QMK build environment setup and make instructions for more details. ```bash make xelus/pachi/rev1:default ``` -------------------------------- ### Build Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/woodkeys/bigseries/1key/readme.md Use this command to compile a default firmware example for the Woodkeys Big Series 1-Key keyboard after setting up your build environment. Refer to QMK build environment setup and make instructions for more details. ```bash make woodkeys/bigseries/1key:default ``` -------------------------------- ### Build Example for wilba_tech WT80-A Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/wilba_tech/wt80_a/readme.md Use this command to create a default build example for the wilba.tech WT80-A keyboard after setting up your build environment. Refer to the QMK build environment setup and make instructions for more details. ```bash make wilba_tech/wt80_a:default ``` -------------------------------- ### Build Firmware Example for RART4X4 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/rart/rart4x4/readme.md Use this command to create a firmware example for the RART4X4 keyboard after setting up your build environment. Refer to the QMK documentation for build environment setup and make instructions. ```bash make rart/rart4x4:default ``` -------------------------------- ### Build Sinanju WK Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/fjlabs/sinanjuwk/readme.md Use this command to create a default firmware example for the Sinanju WK keyboard after setting up your build environment. Refer to QMK documentation for build environment setup and make instructions. ```bash make fjlabs/sinanjuwk:default ``` -------------------------------- ### Build Hifumi Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/hifumi/readme.md Use this command to build a default firmware example for the Hifumi keyboard. Ensure your build environment is set up correctly. Refer to the QMK build environment and make guide for more details. ```bash make hifumi:default ``` -------------------------------- ### Build AKI-S Keyboard Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/xelus/akis/readme.md Use this command to create a default firmware example for the AKI-S keyboard after setting up your build environment. Refer to the QMK build environment setup and make instructions for more details. ```bash make xelus/akis:default ``` -------------------------------- ### Initialize and Draw Surface Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/quantum_painter.md Example of initializing a surface and setting it up for drawing in `keyboard_post_init_kb`. Ensure the surface and display have the same pixel format when drawing. ```c static painter_device_t my_surface; static uint8_t my_framebuffer[SURFACE_REQUIRED_BUFFER_BYTE_SIZE(240, 80, 16)]; // Allocate a buffer for a 16bpp 240x80 RGB565 display void keyboard_post_init_kb(void) { my_surface = qp_rgb565_make_surface(240, 80, my_framebuffer); qp_init(my_surface, QP_ROTATION_0); keyboard_post_init_user(); } ``` -------------------------------- ### Build Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/rationalist/ratio65_hotswap/readme.md Use this command to create a default firmware example for the Ratio65 hotswap keyboard after setting up your build environment. ```bash make rationalist/ratio65_hotswap/rev_a:default ``` -------------------------------- ### Build Firmware Example for Scarlet PCB Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/lucid/scarlet/readme.md Use this command to create a default firmware example for the Scarlet PCB after setting up your build environment. Refer to the QMK documentation for build environment setup and make instructions. ```bash make lucid/scarlet:default ``` -------------------------------- ### Make Example for Infinity CE Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/mechlovin/infinityce/readme.md Use this command to create a default build example for the Infinity CE keyboard after setting up your build environment. ```bash make mechlovin/infinityce:default ``` -------------------------------- ### Build Firmware Example for Christmas Tree Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/maple_computing/christmas_tree/readme.md Use this command to build a firmware example for the Christmas Tree keyboard. Ensure your build environment is set up first. Refer to the QMK build environment and make guide for more information. ```bash make maple_computing/christmas_tree/v2017:default ``` -------------------------------- ### Example of Importing KBFirmware JSON Source: https://github.com/qmk/qmk_firmware/blob/master/docs/hand_wire.md This example demonstrates the output after running the `qmk import-kbfirmware` command, showing the process of importing a keyboard configuration and the subsequent steps recommended for development. ```bash $ qmk import-kbfirmware ~/Downloads/gh62.json Ψ Importing gh62.json. ⚠ Support here is basic - Consider using 'qmk new-keyboard' instead Ψ Imported a new keyboard named gh62. Ψ To start working on things, `cd` into keyboards/gh62, Ψ or open the directory in your preferred text editor. Ψ And build with qmk compile -kb gh62 -km default. ``` -------------------------------- ### QMK CLI Installation Options Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli.md Displays help information for the QMK CLI bootstrapper script to show available installation options. ```bash curl -fsSL https://install.qmk.fm | sh -s -- --help ``` -------------------------------- ### Build Firmware Example for AT101 BH Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/viktus/at101_bh/readme.md Use this command to create a default firmware example for the AT101 BH keyboard after setting up your build environment. Refer to QMK documentation for build environment setup and make instructions. ```bash make viktus/at101_bh:default ``` -------------------------------- ### Build Firmware Example for Clueboard 17% Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/17/readme.md Use this command to create a default firmware example for the Clueboard 17% keyboard. Ensure your build environment is set up correctly before running. ```bash make clueboard/17:default ``` -------------------------------- ### Build Example for Four Banger Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/bpiphany/four_banger/readme.md Use this command to create a default keymap example for the Four Banger keyboard after setting up your build environment. Refer to QMK documentation for build environment setup and make instructions. ```bash make bpiphany/four_banger:default ``` -------------------------------- ### Build Firmware Example for iLumkb Simpler64 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/ilumkb/simpler64/readme.md Use this command to create a firmware build for the iLumkb Simpler64 keyboard. Ensure your build environment is set up correctly. Refer to QMK documentation for detailed build and environment setup instructions. ```bash make ilumkb/simpler64:default ``` -------------------------------- ### Start Local Documentation Server Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli_commands.md Starts a local HTTP server for browsing and editing QMK documentation with live reload capabilities. Requires Node.js and Yarn. The default port is 8936. ```bash usage: qmk docs [-h] [-b] [-p PORT] ``` -------------------------------- ### Build Example for Redragon Vara Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/boss566y/redragon_vara/readme.md Use this command to create a firmware example for the handwired Redragon Vara keyboard. Ensure your build environment is set up correctly. ```bash make handwired/boss566y/redragon_vara:default ``` -------------------------------- ### Install QMK CLI Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli.md Installs the QMK CLI and all necessary dependencies using the recommended bootstrapper script. ```bash curl -fsSL https://install.qmk.fm | sh ``` -------------------------------- ### Build Example for wilba.tech WT8-A Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/wilba_tech/wt8_a/readme.md Use this command to create a default firmware example for the wilba.tech WT8-A keyboard. Ensure your build environment is set up correctly before running. ```bash make wilba_tech/wt8_a:default ``` -------------------------------- ### Build Example for Geekboards 8-keys Macropad Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/geekboards/tester/readme.md Use this command to create a default build example for the Geekboards 8-keys macropad. Refer to QMK build environment and make instructions for more details. ```bash make geekboards/tester:default ``` -------------------------------- ### Flashing Example for classic48 Keyboard (Split Right) Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/pablojimenezmateo/classic48/readme.md Command to flash the default keymap onto the right half of the pablojimenezmateo/classic48 keyboard using the UF2 bootloader. This assumes a split keyboard setup. ```bash qmk flash -kb pablojimenezmateo/classic48 -km default -bl uf2-split-right ``` -------------------------------- ### Flashing Example for classic48 Keyboard (Split Left) Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/pablojimenezmateo/classic48/readme.md Command to flash the default keymap onto the left half of the pablojimenezmateo/classic48 keyboard using the UF2 bootloader. This assumes a split keyboard setup. ```bash qmk flash -kb pablojimenezmateo/classic48 -km default -bl uf2-split-left ``` -------------------------------- ### Implement Keyboard Pre Initialization Source: https://github.com/qmk/qmk_firmware/blob/master/docs/custom_quantum_functions.md Use this function to initialize hardware pins very early in the startup process, before USB has been started. This example sets specific GPIO pins as outputs. ```c void keyboard_pre_init_user(void) { // Call the keyboard pre init code. // Set our LED pins as output gpio_set_pin_output(B0); gpio_set_pin_output(B1); gpio_set_pin_output(B2); gpio_set_pin_output(B3); gpio_set_pin_output(B4); } ``` -------------------------------- ### Install QMK CLI (FreeBSD) Source: https://github.com/qmk/qmk_firmware/blob/master/docs/newbs_getting_started.md This command installs the QMK CLI package on FreeBSD. After installation, refer to the output or use 'pkg info -Dg "py*-qmk"' for further instructions. ```shell pkg install -g "py*-qmk" ``` -------------------------------- ### Build AEGIS Keyboard Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/aeboards/aegis/readme.md Use this command to create a default firmware build for the AEGIS keyboard. Refer to the QMK build environment setup and make instructions for more details. ```bash make aeboards/aegis:default ``` -------------------------------- ### Build Example for Iron165 Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/cannonkeys/iron165/readme.md Use this command to create a default build for the Iron165 keyboard after setting up your QMK build environment. Refer to QMK documentation for detailed setup and make instructions. ```bash make cannonkeys/iron165:default ``` -------------------------------- ### Build Snampad Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/snampad/readme.md Use this command to build the default firmware for the Snampad keyboard after setting up your QMK build environment. Refer to the QMK documentation for build environment setup and make instructions. ```bash make snampad:default ``` -------------------------------- ### Build Example for leftover30 Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/marksard/leftover30/readme.md Use this command to create a default build for the leftover30 keyboard after setting up your QMK build environment. Refer to the QMK build environment setup and make instructions for more details. ```bash make marksard/leftover30:default ``` -------------------------------- ### Keyboard README Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/documentation_templates.md Example of a keyboard README file, including keyboard information, maintainer, hardware details, and build/flash commands. ```markdown # Planck ![Planck](https://i.imgur.com/q2M3uEU.jpg) A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](https://qmk.fm/planck/) * Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) * Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 * Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): make planck/rev4:default Flashing example for this keyboard: make planck/rev4:default:flash See the [build environment setup](getting_started_build_tools) and the [make instructions](getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](newbs). ## Bootloader Enter the bootloader in 3 ways: * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard * **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available ``` -------------------------------- ### Keymap README Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/documentation_templates.md Example of a keymap README file, including an image link and a descriptive text. ```markdown ![Clueboard Layout Image](https://i.imgur.com/7Capi8W.png) # Default Clueboard Layout This is the default layout that comes flashed on every Clueboard. For the most part it's a straightforward and easy to follow layout. The only unusual key is the key in the upper left, which sends Escape normally, but Grave when any of the Ctrl, Alt, or GUI modifiers are held down. ``` -------------------------------- ### Install QMK CLI (Windows, macOS, Linux/WSL) Source: https://github.com/qmk/qmk_firmware/blob/master/docs/newbs_getting_started.md This command installs the QMK CLI and its dependencies. It is the primary installation method for Windows (via QMK MSYS), macOS, and Linux/WSL. Ensure you are in the correct environment before running. ```shell curl -fsSL https://install.qmk.fm | sh ``` -------------------------------- ### QMK CLI Hello World Subcommand Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli_development.md A basic example of a QMK CLI subcommand using the MILC framework. It demonstrates argument parsing, logging, and subcommand definition. ```python """QMK Python Hello World This is an example QMK CLI script. """ from milc import cli @cli.argument('-n', '--name', default='World', help='Name to greet.') @cli.subcommand('QMK Hello World.') def hello(cli): """Log a friendly greeting. """ cli.log.info('Hello, %s!', cli.config.hello.name) ``` -------------------------------- ### Install Git on Linux/WSL Source: https://github.com/qmk/qmk_firmware/blob/master/docs/newbs_building_firmware_workflow.md Commands to install Git on various Debian-based, Fedora-based, Arch-based, and other Linux distributions. Ensure Git is installed before proceeding with the build setup. ```bash sudo apt install -y git ``` ```bash sudo yum -y install git ``` ```bash sudo pacman --needed --noconfirm -S git ``` ```bash sudo xbps-install -y git ``` ```bash sudo eopkg -y install git ``` ```bash sudo equo install dev-vcs/git ``` ```bash sudo emerge dev-vcs/git ``` -------------------------------- ### Leader Key Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/leader_key.md This example demonstrates how to use the leader key feature to play sounds on sequence start, success, and failure. It also shows how to define custom actions for matched leader sequences. ```APIDOC ## Example This example will play the Mario "One Up" sound when you hit `QK_LEAD` to start the leader sequence. When the sequence ends, it will play "All Star" if it completes successfully or "Rick Roll" you if it fails (in other words, no sequence matched). ```c #ifdef AUDIO_ENABLE float leader_start_song[][2] = SONG(ONE_UP_SOUND); float leader_succeed_song[][2] = SONG(ALL_STAR); float leader_fail_song[][2] = SONG(RICK_ROLL); #endif void leader_start_user(void) { #ifdef AUDIO_ENABLE PLAY_SONG(leader_start_song); #endif } void leader_end_user(void) { bool did_leader_succeed = false; if (leader_sequence_one_key(KC_E)) { SEND_STRING(SS_LCTL(SS_LSFT("t"))); did_leader_succeed = true; } else if (leader_sequence_two_keys(KC_E, KC_D)) { SEND_STRING(SS_LGUI("r")"cmd\n" SS_LCTL("c")); did_leader_succeed = true; } #ifdef AUDIO_ENABLE if (did_leader_succeed) { PLAY_SONG(leader_succeed_song); } else { PLAY_SONG(leader_fail_song); } #endif } ``` ``` -------------------------------- ### Example Usage of Keymap Beautifier Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/util/keymap_beautifier/README.md Demonstrates how to use the Keymap Beautifier script with specific options to format a keymap file. This example shows both Docker and non-Docker execution with pretty output and center justification. ```bash ./docker_run.sh input.c -p -c -o output.c # or if you don't want to use docker: #./KeymapBeautifier.py input.c -p -c -o output.c ``` -------------------------------- ### Example: Compile Firmware in Keyboard Directory Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli_commands.md Demonstrates compiling firmware from within a keyboard's directory, showing both default and specified keymap usage. ```bash $ qmk config compile.keymap=default $ cd ~/qmk_firmware/keyboards/planck/rev6 $ qmk compile Ψ Compiling keymap with make planck/rev6:default ... ``` ```bash $ cd ~/qmk_firmware/keyboards/clueboard/66/rev4 $ qmk compile -km 66_iso Ψ Compiling keymap with make clueboard/66/rev4:66_iso ... ``` ```bash $ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak $ qmk compile Ψ Compiling keymap with make gh60/satan:colemak ... ``` -------------------------------- ### Build Example for frankie_macropad Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/frankie_macropad/readme.md Use this command to create a firmware build for the frankie_macropad. Ensure your build environment is set up correctly. ```bash make handwired/frankie_macropad:default ``` -------------------------------- ### Initialize svn for ChibiOS Source: https://github.com/qmk/qmk_firmware/blob/master/docs/chibios_upgrade_instructions.md Use this command to initialize the svn repository for ChibiOS. Ensure git-svn is installed. This is a one-time setup. ```bash git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/ ``` -------------------------------- ### Example Auto Shift Tuning Run Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/auto_shift.md This example demonstrates the process of tuning the Auto Shift timeout. Observe the output after pressing AS_DOWN and AS_UP keys to adjust the timeout, and finally press AS_RPT to get the current timeout value. ```text hello world. my name is john doe. i am a computer programmer playing with keyboards right now. [PRESS AS_DOWN quite a few times] heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH KEYboArDS RiGHT NOw. [PRESS AS_UP a few times] hello world. my name is john Doe. i am a computer programmer playing with keyboarDs right now. [PRESS AS_RPT] 115 ``` -------------------------------- ### Build Example for pi60_rgb Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/1upkeyboards/pi60_rgb/readme.md Use this command to create a default firmware build for the pi60_rgb keyboard. Ensure your build environment is set up correctly. ```bash make 1upkeyboards/pi60_rgb:default ``` -------------------------------- ### Retrieve Specific Constants Source: https://github.com/qmk/qmk_firmware/blob/master/docs/api_docs.md Fetch constants for a particular subsystem and version using the specified endpoint format. This example shows how to get keycode constants for version 0.0.1. ```bash $ curl https://keyboards.qmk.fm/v1/constants/keycodes_0.0.1.json { "ranges": { "0x0000/0x00FF": { "define": "QK_BASIC" }, "0x0100/0x01FF": { "define": "QK_MODS" }, "0x2000/0x20FF": { "define": "QK_MOD_TAP" ``` -------------------------------- ### Page Title and Description Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/documentation_best_practices.md Start documentation pages with an H1 heading and a single paragraph description. Keep headings concise to avoid wide tables of contents. ```markdown # My Page Title This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone. ``` -------------------------------- ### Build Example for Reviung34 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/reviung/reviung34/readme.md Use this command to create a firmware build for the Reviung34 keyboard. Ensure your build environment is set up correctly. ```bash make reviung34:default ``` -------------------------------- ### Build Monokei MNK50 Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/monokei/mnk50/readme.md Use this command to build the default keymap for the Monokei MNK50 keyboard. Refer to QMK build environment and make guide documentation for setup. ```bash make monokei/mnk50:default ``` -------------------------------- ### Build Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/aokay/mid1/readme.md Generates the default firmware build for the Aokay MID.1 keyboard. Ensure your build environment is set up first. ```bash make aokay/mid1:default ``` -------------------------------- ### Build Example for Let's Split Eh? Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/maple_computing/lets_split_eh/readme.md Use this command to create a default firmware build for the Let's Split Eh? keyboard. Ensure your build environment is set up correctly. ```bash make maple_computing/lets_split_eh:default ``` -------------------------------- ### Build BM980HSRGB Keyboard Firmware Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/kprepublic/bm980hsrgb/readme.md Use this command to build the default firmware for the BM980HSRGB keyboard after setting up your build environment. Refer to the QMK build environment setup guide for more information. ```bash make kprepublic/bm980hsrgb:default ``` -------------------------------- ### Build Example for Redragon K617 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/rd_61_qmk/readme.md Use this command to create a firmware build for the Redragon K617 keyboard after setting up your QMK build environment. ```bash make handwired/rd_61_qmk:default ``` -------------------------------- ### Setup Underglow RGB Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/xdboards/recon/readme.md Configure `config.h` for underglow RGB lighting by defining the split and total LED count. This requires soldering the 'Per-Key RGB Skip' jumper and not installing per-key RGBs. ```c #define RGB_MATRIX_SPLIT { 5, 5 } #define RGB_MATRIX_LED_COUNT 10 ``` -------------------------------- ### Build Example for AEBoards EXT65 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/aeboards/ext65/readme.md Use these commands to build the firmware for the EXT65 Rev1 and Rev2 keyboards. Ensure your build environment is set up correctly. ```bash make aeboards/ext65/rev1:default ``` ```bash make aeboards/ext65/rev2:default ``` -------------------------------- ### Flashing Example for frankie_macropad Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/frankie_macropad/readme.md This command flashes the compiled firmware to the frankie_macropad. Refer to QMK documentation for detailed build environment and flashing instructions. ```bash make handwired/frankie_macropad:default:flash ``` -------------------------------- ### Build Firmware for LFK78 Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/lfkeyboards/lfk78/readme.md Use this command to build the default firmware for the LFK78 keyboard after setting up your build environment. Refer to the QMK build environment setup and make guide for more information. ```bash make lfkeyboards/lfk78:default ``` -------------------------------- ### Build Example for txuu Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/matthewdias/txuu/readme.md Use this command to create a default build for the txuu keyboard after setting up your build environment. ```bash make matthewdias/txuu:default ``` -------------------------------- ### Make Example for 3dfoxc Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/3dfoxc/readme.md Use this command to create a default firmware build for the 3dfoxc keyboard. Ensure your build environment is set up correctly. ```bash make handwired/3dfoxc:default ``` -------------------------------- ### Build Example for CannonKeys Rekt1800 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/cannonkeys/rekt1800/readme.md Use this command to build the default firmware for the CannonKeys Rekt1800 keyboard after setting up your build environment. Refer to QMK documentation for build environment setup and make instructions. ```bash make cannonkeys/rekt1800:default ``` -------------------------------- ### Leader Key Sound Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/leader_key.md Plays specific sounds when a leader sequence starts, succeeds, or fails. Requires AUDIO_ENABLE to be defined. The leader_end_user function demonstrates conditional actions based on successful leader sequences. ```c #ifdef AUDIO_ENABLE float leader_start_song[][2] = SONG(ONE_UP_SOUND); float leader_succeed_song[][2] = SONG(ALL_STAR); float leader_fail_song[][2] = SONG(RICK_ROLL); #endif void leader_start_user(void) { #ifdef AUDIO_ENABLE PLAY_SONG(leader_start_song); #endif } void leader_end_user(void) { bool did_leader_succeed = false; if (leader_sequence_one_key(KC_E)) { SEND_STRING(SS_LCTL(SS_LSFT("t"))); did_leader_succeed = true; } else if (leader_sequence_two_keys(KC_E, KC_D)) { SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c")); did_leader_succeed = true; } #ifdef AUDIO_ENABLE if (did_leader_succeed) { PLAY_SONG(leader_succeed_song); } else { PLAY_SONG(leader_fail_song); } #endif } ``` -------------------------------- ### Make Example for E80-1800 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/ebastler/e80_1800/readme.md Use this command to build the firmware for the E80-1800 keyboard. Ensure your build environment is set up correctly. ```bash make ebastler/e80_1800:default ``` -------------------------------- ### Build Duck Jetfire Keyboard Firmware Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/duck/jetfire/readme.md Use this command to build the default firmware for the Duck Jetfire keyboard after setting up your build environment. Refer to the QMK build environment setup and make guide for more information. ```bash make duck/jetfire:default ``` -------------------------------- ### Flash Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/aokay/mid1/readme.md Flashes the default firmware to the Aokay MID.1 keyboard. This command assumes the build is complete. ```bash make aokay/mid1:default:flash ``` -------------------------------- ### Hello World Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/send_string.md A custom keycode that types "Hello, world!" and presses Enter. Ensure the keycode `SS_HELLO` is defined elsewhere in your keymap. ```c bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SS_HELLO: if (record->event.pressed) { SEND_STRING("Hello, world!\n"); } return false; } return true; } ``` -------------------------------- ### Build HS60 V2.0 Keyboard Firmware Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/hs60/v2/readme.md Use this command to build the default firmware for your HS60 V2.0 keyboard. Replace `` with your specific layout (ISO, ANSI, or HHKB). Refer to the QMK build environment and make guide for setup. ```bash make hs60/v2/:default ``` -------------------------------- ### Manually Install QMK Driver Installer Source: https://github.com/qmk/qmk_firmware/blob/master/docs/faq_build.md Download and run the QMK driver installer package manually to fix bootloader driver issues on Windows. ```bash qmk_driver_installer ``` -------------------------------- ### Build Example for Slice65 Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/pizzakeyboards/slice65/readme.md Use this command to build the default firmware for the Slice65 keyboard after setting up your build environment. ```bash make pizzakeyboards/slice65:default ``` -------------------------------- ### Build Example for Churrosoft Deck-8 RGB Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/churrosoft/deck8/rgb/readme.md Use this command to build the firmware for the Churrosoft Deck-8 RGB keyboard after setting up your build environment. ```bash make churrosoft/deck8/rgb:default ``` -------------------------------- ### Install Planck Keyboard Firmware (DFU-Util) Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/readme.md Install firmware for Planck rev6 using the dfu-util method. Ensure your device is in DFU mode and dfu-util is installed. ```bash make planck/rev6:default:dfu-util ``` -------------------------------- ### Install OpenOCD using xPack Manager Source: https://github.com/qmk/qmk_firmware/blob/master/docs/arm_debugging.md Installs Open On-Chip Debugger, a crucial tool for enabling SWD communication between GDB and the ARM microcontroller. This is a global installation. ```bash xpm install --global @xpack-dev-tools/openocd ``` -------------------------------- ### Flashing Example for pi60_rgb Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/1upkeyboards/pi60_rgb/readme.md This command flashes the default firmware to the pi60_rgb keyboard. Refer to QMK documentation for detailed build environment and make instructions. ```bash make 1upkeyboards/pi60_rgb:default:flash ``` -------------------------------- ### GeminiPR Examples Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/stenography.md Examples of steno strokes and their associated GeminiPR packets. ```text EUBG = 10000000 00000000 00000000 00001100 00101000 00000000 ``` ```text WAZ = 10000000 00000010 00100000 00000000 00000000 00000001 ``` ```text PHAPBGS = 10000000 00000101 00100000 00000000 01101010 00000000 ``` -------------------------------- ### RGB Matrix Get Saturation Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/rgb_matrix.md Gets the current global effect saturation. ```APIDOC ## `uint8_t rgb_matrix_get_sat(void)` {#api-rgb-matrix-get-sat} Get the current global effect saturation. #### Return Value The current saturation value, from 0 to 255. ``` -------------------------------- ### RGB Matrix Get Hue Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/rgb_matrix.md Gets the current global effect hue. ```APIDOC ## `uint8_t rgb_matrix_get_hue(void)` {#api-rgb-matrix-get-hue} Get the current global effect hue. #### Return Value The current hue value, from 0 to 255. ``` -------------------------------- ### Build Helpo Macropad Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/axolstudio/helpo/readme.md Use this command to create a default build for the Helpo macropad. Ensure your QMK build environment is set up. ```bash make axolstudio/helpo:default ``` -------------------------------- ### Display Entire Configuration Source: https://github.com/qmk/qmk_firmware/blob/master/docs/cli_configuration.md View all currently set configuration values for the QMK CLI. ```bash qmk config ``` -------------------------------- ### Install ARM GCC Toolchain using xPack Manager Source: https://github.com/qmk/qmk_firmware/blob/master/docs/arm_debugging.md Installs the ARM embedded C/C++ compiler toolchain globally using the xPack Manager. Ensure Node.js and npm are installed first. ```bash xpm install --global @xpack-dev-tools/arm-none-eabi-gcc ``` -------------------------------- ### TX Bolt Examples Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/stenography.md Examples of steno strokes and their associated TX Bolt packets. ```text EUBG = 01110000 10101000 ``` ```text WAZ = 00010000 01000010 11001000 ``` ```text PHAPBGS = 00101000 01000010 10101100 11000010 ``` -------------------------------- ### QMK Make Command Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/handwired/rd_61_qmk/readme.md This command, when mapped to a keycode like QK_MAKE, will compile the firmware for the handwired/rd_61_qmk keyboard with the default keymap. ```bash qmk compile -kb handwired/rd_61_qmk -km default ``` -------------------------------- ### Start SPI Transaction Source: https://github.com/qmk/qmk_firmware/blob/master/docs/drivers/spi.md Starts an SPI transaction with a specified slave device and configuration. ```APIDOC ## spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) ### Description Start an SPI transaction. ### Method `bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor)` ### Parameters #### Arguments - **slavePin** (pin_t) - The GPIO pin connected to the desired device's `SS` line. - **lsbFirst** (bool) - Determines the endianness of the transmission. If `true`, the least significant bit of each byte is sent first. - **mode** (uint8_t) - The SPI mode to use: |Mode|Clock Polarity |Clock Phase | |----|--------------------|-----------------------| |`0` |Leading edge rising |Sample on leading edge | |`1` |Leading edge rising |Sample on trailing edge| |`2` |Leading edge falling|Sample on leading edge | |`3` |Leading edge falling|Sample on trailing edge| - **divisor** (uint16_t) - The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`. ### Return Value `true` if the operation was successful, otherwise `false` if the supplied parameters are invalid or the SPI peripheral is already in use. ``` -------------------------------- ### Build DZ96 Firmware Example Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/dztech/dz96/readme.md Use this command to create a firmware build for the DZ96 keyboard with the default configuration. Ensure your build environment is set up correctly. ```bash make dztech/dz96:default ``` -------------------------------- ### RGB Matrix Get Mode Source: https://github.com/qmk/qmk_firmware/blob/master/docs/features/rgb_matrix.md Gets the index of the currently running RGB Matrix effect. ```APIDOC ## `uint8_t rgb_matrix_get_mode(void)` {#api-rgb-matrix-get-mode} Get the currently running effect. #### Return Value The index of the currently running effect. ``` -------------------------------- ### Clone micronucleus and Install Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/1k/readme.md Clone the micronucleus repository and install the command-line tool. This is a prerequisite for flashing the firmware. ```bash git clone https://github.com/micronucleus/micronucleus.git cd micronucleus/commandline/ sudo make install ``` -------------------------------- ### Previewing Documentation Changes Source: https://github.com/qmk/qmk_firmware/blob/master/docs/contributing.md Run this command from the QMK firmware root directory to preview your documentation changes locally. It will typically open a web server in your browser. ```bash qmk docs -b ``` -------------------------------- ### Makefile Conditional Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/__capabilities.md An example of a conditional statement within a Makefile. Used for build system configurations. ```makefile ifeq ($(BUILD),) CHUNDER_REQUIRED = yes endif ``` -------------------------------- ### Build Example for classic48 Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/pablojimenezmateo/classic48/readme.md Use this command to create a firmware build for the pablojimenezmateo/classic48 keyboard with the default keymap. Ensure your build environment is set up correctly. ```bash make pablojimenezmateo/classic48:default ``` -------------------------------- ### Flashing Example for txuu Keyboard Source: https://github.com/qmk/qmk_firmware/blob/master/keyboards/matthewdias/txuu/readme.md This command flashes the default build of the txuu keyboard firmware using the command line. Refer to QMK documentation for detailed flashing instructions. ```bash make matthewdias/txuu:default:flash ``` -------------------------------- ### List All Installed Drivers Source: https://github.com/qmk/qmk_firmware/blob/master/docs/driver_installation_zadig.md This command lists all drivers currently installed on your system, which is useful for identifying the 'Inf name' before uninstallation. ```bash pnputil /enum-drivers ``` -------------------------------- ### ST-Link Flashing Output Example Source: https://github.com/qmk/qmk_firmware/blob/master/docs/isp_flashing_guide.md Example output from a successful ST-Link flashing operation, indicating the bootloader was written and verified. ```text st-flash 1.7.0 2022-03-08T12:16:30 INFO common.c: F1xx Medium-density: 20 KiB SRAM, 64 KiB flash in at least 1 KiB pages. file generic_boot20_pc13.bin md5 checksum: 333c30605e739ce9bedee5999fdaf81b, stlink checksum: 0x0008e534 2022-03-08T12:16:30 INFO common.c: Attempting to write 7172 (0x1c04) bytes to stm32 address: 134217728 (0x8000000) 2022-03-08T12:16:30 INFO common.c: Flash page at addr: 0x08000000 erased 2022-03-08T12:16:30 INFO common.c: Flash page at addr: 0x08000400 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08000800 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08000c00 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08001000 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08001400 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08001800 erased 2022-03-08T12:16:31 INFO common.c: Flash page at addr: 0x08001c00 erased 2022-03-08T12:16:31 INFO common.c: Finished erasing 8 pages of 1024 (0x400) bytes 2022-03-08T12:16:31 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL 2022-03-08T12:16:31 INFO flash_loader.c: Successfully loaded flash loader in sram 2022-03-08T12:16:31 INFO flash_loader.c: Clear DFSR 8/ 8 pages written 2022-03-08T12:16:31 INFO common.c: Starting verification of write complete 2022-03-08T12:16:31 INFO common.c: Flash written and verified! jolly good! 2022-03-08T12:16:31 WARN common.c: NRST is not connected ```