Scripts2026年5月27日·1 分钟阅读

QMK Firmware — Open-Source Keyboard Firmware for Custom Keyboards

QMK is a feature-rich open-source firmware for mechanical keyboards, numpads, and pointing devices. It gives developers full control over keymaps, macros, layers, RGB lighting, and more through C code or a web configurator.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
QMK Firmware Overview
直接安装命令
npx -y tokrepo@latest install 50873726-5983-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

QMK (Quantum Mechanical Keyboard) Firmware is the standard open-source firmware for custom mechanical keyboards. It powers hundreds of keyboard PCBs and gives users programmable layers, tap-dance keys, macros, and per-key RGB control.

What QMK Does

  • Provides a fully programmable keymap system with up to 32 layers per keyboard
  • Supports tap-hold behavior, leader keys, combos, and one-shot modifiers
  • Drives per-key RGB LEDs and underglow with dozens of built-in animation modes
  • Handles pointing devices like trackballs, trackpoints, and encoders alongside keys
  • Compiles via CLI or the online QMK Configurator without writing any C code

Architecture Overview

QMK is built on top of ChibiOS or LUFA depending on the microcontroller (ARM or AVR). The firmware scans a key matrix at high frequency, processes the keymap through a layered state machine, and sends HID reports to the host. Features are modular: users enable only what they need via rules.mk to keep firmware size within flash limits.

Self-Hosting & Configuration

  • Install the QMK CLI via pip; it manages toolchains for AVR and ARM targets
  • Each keyboard has its own directory under keyboards/ with hardware-specific pin definitions
  • Keymaps live in keymaps/<username>/keymap.c and override defaults
  • config.h and rules.mk control feature toggles like RGB, audio, and mouse keys
  • Flash via QMK Toolbox (GUI), qmk flash (CLI), or supported bootloaders directly

Key Features

  • Over 1,500 keyboards supported in the official repository
  • QMK Configurator provides a visual drag-and-drop keymap editor in the browser
  • VIA and Vial support allow live keymap changes without reflashing
  • Tap Dance lets a single key perform different actions based on tap count
  • Audio support on boards with speakers for feedback beeps and music mode

Comparison with Similar Tools

  • ZMK — wireless-first firmware for BLE keyboards; QMK focuses on wired boards with broader feature support
  • KMK — CircuitPython-based firmware; easier to modify but slower scan rates than QMK's compiled C
  • TMK — QMK's predecessor; QMK adds layers of convenience and a larger community
  • Via/Vial — GUI configurators that run on top of QMK firmware for real-time remapping
  • Kaleidoscope — Arduino-based firmware for Keyboardio boards; QMK supports a wider range of hardware

FAQ

Q: Do I need to know C to use QMK? A: No. The QMK Configurator web tool lets you build keymaps visually. C knowledge helps for advanced features like custom macros or tap-dance logic.

Q: Can QMK run on wireless keyboards? A: QMK has experimental BLE support, but ZMK is generally recommended for wireless builds due to better power management.

Q: How do I add my custom keyboard to QMK? A: Create a directory under keyboards/ with your pin matrix, config files, and a default keymap. Submit a pull request to have it merged upstream.

Q: Does QMK support macOS, Windows, and Linux equally? A: Yes. QMK sends standard HID reports that work on all operating systems without drivers.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产