1411c79aef
Functions in filters did not work properly except when used in the last (or only) filter. The problem was caused by the peculiarity of the `lambda` behavior in Python — any variables from the outer scope are captured only by reference, therefore any subsequent reassignment of those variables is propagated to all lambdas created earlier in the same scope. Together with the laziness of `filter()` (it returns an iterator which performs filtering on demand) this resulted in all function filters using the values of the `key` and `value` variables which correspond to the last filter in the sequence, therefore the result of filtering was wrong if some filter with a function was not the last one in the sequence. Apparently the shortest way to make a Python lambda capture some variables by value is to add arguments with default values for such variables (default values are evaluated when the lambda is created, and any subsequent reassignments in the outer scope no longer changes them). This makes filters with functions work properly even when such filters are not at the last position in the sequence. |
||
---|---|---|
.github | ||
.vscode | ||
builddefs | ||
data | ||
docs | ||
drivers | ||
keyboards | ||
layouts | ||
lib | ||
platforms | ||
quantum | ||
tests | ||
tmk_core | ||
users | ||
util | ||
.clang-format | ||
.clangd | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
Doxyfile | ||
doxygen-todo | ||
LICENSE | ||
license_GPLv2.md | ||
license_GPLv3.md | ||
license_Modified_BSD.md | ||
Makefile | ||
nose2.cfg | ||
paths.mk | ||
readme.md | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.cfg | ||
shell.nix |
Quantum Mechanical Keyboard Firmware
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.