Open-source keyboard firmware for Atmel AVR and Arm USB families https://qmk.fm
Go to file
Liyang HU 383fae55c5
Refactor quantum/command.{c,h} for code size & {read,maintain}ability (#11842)
* quantum/command.c: coalesce `print()`s in `command_common_help()` & `print_version()`

Also undo some damage by clang-format in b624f32f94

* quantum/command.c: replace `print(…); print_{,val_}{dec,hex}*(…);` sequences with single `xprintf(…)`

`print_{dec,hex}*(…)` are just `#define`s for `xprintf(…)` anyway.

Each additional `xprintf(…)` costs ~8 bytes: the call instructions,
plus an additional NUL terminator.

This _really_ adds up: this commit saves 814 bytes on my ATmega32.

* quantum/command.c: optimise `mousekey_console()` for size & legibility

Made various tweaks to the interface, but still functionally identical.

Assume `KC_1`…`KC_0` to be contiguous, and removed `numkey2num(…)` entirely.
It was exported in `command.h` by 1a0bac8bcc for no obvious reason, before
which it was `static`. I doubt anyone uses it.

`mousekey_console()` is now enabled regardless of `MK_3_SPEED`.
Needs fleshing out for things other than the X11 variant though.

This commit saves 638 bytes on my ATmega32.
2021-08-07 17:12:57 +10:00
.github CLI/Docs: Fix the format commands' name (#13668) 2021-07-23 21:41:33 +01:00
.vscode do not automatically format json (#13320) 2021-06-25 22:47:48 -07:00
api_data Generate api data on each push (#10609) 2020-10-25 14:48:44 -07:00
bin Ensure that safe_commands always run (#13199) 2021-06-14 16:51:58 -07:00
data Remove references to info.json width and height in CLI (#13728) 2021-07-29 22:37:18 -07:00
docs Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
drivers __flash? (#13799) 2021-07-31 14:35:30 +01:00
keyboards Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
layouts Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
lib Update ChibiOS-Contrib, mirroring script. (#13896) 2021-08-06 16:40:12 +10:00
nix Update Python dependencies for Nix (#12855) 2021-06-20 14:30:16 +01:00
platforms/chibios Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards (#12870) 2021-08-04 07:38:37 +10:00
quantum Refactor quantum/command.{c,h} for code size & {read,maintain}ability (#11842) 2021-08-07 17:12:57 +10:00
tests Allow output of logging when running unit tests (#13556) 2021-07-25 17:18:09 +01:00
tmk_core Add HOLD_ON_OTHER_KEY_PRESS option for dual-role keys (#9404) 2021-08-07 09:16:26 +10:00
users Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
util Update ChibiOS-Contrib, mirroring script. (#13896) 2021-08-06 16:40:12 +10:00
.clang-format fix indent size 2019-06-11 01:51:40 -07:00
.editorconfig QMK CLI and JSON keymap support (#6176) 2019-07-15 12:14:27 -07:00
.gitattributes [nix] Use niv and poetry2nix to more easily manage dependencies (#11181) 2021-04-03 08:05:46 -07:00
.gitignore Cleanup gitignore (#13390) 2021-07-02 16:08:34 +10:00
.gitmodules 2020 May 30 Breaking Changes Update (#9215) 2020-05-30 13:14:59 -07:00
.travis.yml CI: Add workflow for codebase formatting (#7382) 2020-12-10 17:01:51 +00:00
book.json adds redirects for docs 2017-08-19 08:31:54 -04:00
bootloader.mk Update LUFA (18-07-2021) and add QMK-HID Bootloader support (#13588) 2021-07-24 23:00:57 -07:00
build_full_test.mk Ensure single newline at EOF for core files (#11310) 2020-12-28 04:36:32 +11:00
build_json.mk Fixing incorrect keymap build when switching between multiple keymap.jsons (#12632) 2021-06-19 15:30:23 -07:00
build_keyboard.mk [Core] Unite half-duplex and full-duplex serial drivers (#13081) 2021-07-02 08:24:08 +10:00
build_layout.mk Fix building layouts from JSON (#13310) 2021-06-27 12:52:38 +10:00
build_test.mk Move print/debug files to quantum (#12069) 2021-08-03 18:49:33 +01:00
CODE_OF_CONDUCT.md updates the coc 2019-08-24 12:43:39 -04:00
common_features.mk Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
common.mk 2020 November 28 Breaking Changes Update (#11053) 2020-11-28 12:02:18 -08:00
disable_features.mk Add a <FEATURE>_SUPPORTED flag (#9058) 2021-01-30 13:08:58 -08:00
Dockerfile Update docker util script and travis to use new base container 2019-07-14 21:01:38 -07:00
Doxyfile Generate API docs from source code comments (#2491) 2018-03-22 02:50:38 -04:00
doxygen-todo Remove iWRAP protocol (#9284) 2020-08-29 14:30:02 -07:00
LICENSE add an explicit lisence file for github to pickup 2017-11-13 20:50:54 -05:00
license_GPLv2.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_GPLv3.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_Modified_BSD.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
Makefile Merge remote-tracking branch 'origin/master' into develop 2021-07-28 11:02:58 +00:00
message.mk Update MSG_PYTHON_MISSING (#13427) 2021-07-06 15:34:04 +10:00
nose2.cfg Setup a python test framework 2019-09-07 07:58:41 -07:00
readme.md 2021 February 27 Breaking Changes Changelog (#11975) 2021-02-27 12:10:23 -08:00
requirements-dev.txt Move hid and pyusb to requirements.txt (#13134) 2021-06-07 16:30:55 -07:00
requirements.txt switch to qmk-dotty-dict (#13460) 2021-07-14 09:08:48 -07:00
secrets.tar.enc update building for .hex, secrets moving 2017-08-21 21:57:46 -04:00
setup.cfg Use the schema to eliminate custom code (#11108) 2021-01-09 13:34:14 -08:00
shell.nix Update Python dependencies for Nix (#12855) 2021-06-20 14:30:16 +01:00
show_options.mk add yaml_build_options target (#10533) 2021-08-06 08:18:32 +10:00
testlist.mk Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
Vagrantfile Upgrades Vagrant box to Debian 10 to fix Docker build error on Debian 9. (#13236) 2021-06-19 13:52:34 +01:00

Quantum Mechanical Keyboard Firmware

Current Version Build Status Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are powered by Docsify and hosted on GitHub. They are also viewable offline; see Previewing the Documentation for more details.

You can request changes by making a fork and opening a pull request, or by clicking the "Edit this page" link at the bottom of any page.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by ZSA Technology Labs, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official Website

qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.