summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/keymap.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow locate_keymap to handle DEFAULT_FOLDER (#17529)Joel Challis2022-07-011-2/+2
|
* CLI: Add 'via2json' subcommand (#16468)Erovia2022-03-241-1/+6
|
* Macros in JSON keymaps (#14374)Zach White2021-11-221-12/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macros in json keymaps * add advanced macro support to json * add a note about escaping macro strings * add simple examples * format json * add support for language specific keymap extras * switch to dictionaries instead of inline text for macros * use SS_TAP on the innermost tap keycode * add the new macro format to the schema * document the macro limit * add the json keyword for syntax highlighting * fix format that vscode screwed up * Update feature_macros.md * add tests for macros * change ding to beep * add json support for SENDSTRING_BELL * update doc based on feedback from sigprof * document host_layout * remove unused var * improve carriage return handling * support tab characters as well * Update docs/feature_macros.md Co-authored-by: Nick Brassel <nick@tzarc.org> * escape backslash characters * format * flake8 * Update quantum/quantum_keycodes.h Co-authored-by: Nick Brassel <nick@tzarc.org>
* Cleanup issues identified by lgtm (#14459)Zach White2021-09-271-2/+2
| | | | | * cleanup issues identified by lgtm * fix the git_status check
* CLI/c2json: Print 'cpp' error when executed in verbose mode (#12869)Erovia2021-05-271-1/+5
| | | Co-authored-by: Ryan <fauxpark@gmail.com>
* Align our subprocess usage with current best practices. (#12940)Zach White2021-05-191-4/+5
| | | | | | | | | | | | | | | | | * Align our subprocess usage with current best practices. * remove unused import * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * fix the cpp invocation for older python * allow for unprompted installation * make sure qmk new-keyboard works on windows Co-authored-by: Ryan <fauxpark@gmail.com>
* Add support for tab completion (#12411)Zach White2021-04-141-4/+52
| | | | | | | * Add support for tab completion * make flake8 happy * Add documentation
* Fix develop (#12039)Zach White2021-02-271-3/+3
| | | | | | | | | Fixes file encoding errors on Windows, and layouts not correctly merging into info.json. * force utf8 encoding * correctly merge layouts and layout aliases * show what aliases point to
* [CLI] Add stdin support for json2c command (#11289)LongerHV2020-12-291-7/+15
| | | | | | | | | | | | | | | * Implement stdin for json2c command * Refactor * Handle json decode error * Add stdin support for c2json cli command * Refactor to prevent code duplication * Change exit(1) to return False in c2json command * Remove unused import
* Generate api data on each push (#10609)Zach White2020-10-251-66/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add new qmk generate-api command, to generate a complete set of API data. * Generate api data and push it to the keyboard repo * fix typo * Apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * fixup api workflow * remove file-changes-action * use a more mainstream github action * fix yaml error * Apply suggestions from code review Co-authored-by: Erovia <Erovia@users.noreply.github.com> * more uniform date handling * make flake8 happy * Update lib/python/qmk/decorators.py Co-authored-by: Erovia <Erovia@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* CLI: Fix stripping of `ANY` from Configurator exports (#10585)Erovia2020-10-091-0/+2
| | | 058737f broke it ¯\_(ツ)_/¯
* [CLI] Add c2json (#8817)Erovia2020-10-061-29/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Basic keymap parsing finally works * Add 'keymap.json' creation to the qmk.keymap module * Add tests and fix formatting * Fix/exclude flake8 errors * Convert keymap.c to valid keymap.json * Fix some errors * Add tests * Finalize keymap.json creation, add json template * Add docs * Move pygments to the standard requirements * Add support for nameless layers, fix tests * Fix things after rebase * Add missing 'keymap' value. * Fix missing layer numbers from advanced keycodes Buckwich noticed that if the advanced keycode / layer toggling key contains a number, it goes missing. Now we properly handle them. Thx for noticing! * Apply suggestions from code review * fixup tests Co-authored-by: Zach White <skullydazed@drpepper.org> Co-authored-by: skullY <skullydazed@gmail.com>
* Fix the path for generated keymaps (#9213)Zach White2020-05-261-1/+5
|
* Fix compiling json files (#9210)Zach White2020-05-261-3/+3
|
* [CLI] Add a subcommand for getting information about a keyboard (#8666)Zach White2020-05-261-14/+61
| | | | | You can now use `qmk info` to get information about keyboards and keymaps. Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* Move everything to Python 3.6 (#8835)skullydazed2020-04-181-3/+2
|
* Correctly handle json keymaps with ANY()skullY2020-04-071-1/+13
|
* Use pathlib everywhere we can (#7872)skullydazed2020-02-171-12/+6
| | | | | | | | | | | | | | | | | | | | | | * Use pathlib everywhere we can * Update lib/python/qmk/path.py Co-Authored-By: Erovia <Erovia@users.noreply.github.com> * Update lib/python/qmk/path.py Co-Authored-By: Erovia <Erovia@users.noreply.github.com> * Improvements based on @erovia's feedback * rework qmk compile and qmk flash to use pathlib * style * Remove the subcommand_name argument from find_keyboard_keymap() Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* fix list_keymaps for python 3.5skullY2020-02-151-2/+2
|
* Pathlib-ify qmk.keymap.list_keymaps()Erovia2020-02-151-9/+10
|
* Fix commandline parsing and flake8 findings, rebaseErovia2020-02-151-2/+1
| | | | | Fixed commandline and config parsing. Thx @xplusplus. Rebased on master and fixed merge conflicts.
* Major rework, no regex/globbing, more walkingErovia2020-02-151-36/+16
| | | | | | Instead of using regexes and globbing to find the rules.mk and keymap.c files, walk the directory tree to find them. Also, do away with the concept of revision.
* Fix merging community and base keymapsErovia2020-02-151-1/+1
|
* Return only the unique keymapsErovia2020-02-151-6/+5
|
* Another major refactoring, add documentationErovia2020-02-151-0/+59
| | | | | | Move all useful functions to the qmk module and use the cli subcommand as a wrapper around it. Add both inline comments and documentation.
* Add flake8 to our test suite and fix all errors (#7379)skullydazed2019-11-201-4/+0
| | | | | | * Add flake8 to our test suite and fix all errors * Add some documentation
* Fix compiling json files. (#6340)skullydazed2019-07-151-1/+1
|
* QMK CLI and JSON keymap support (#6176)skullydazed2019-07-151-0/+100
* Script to generate keymap.c from JSON file. * Support for keymap.json * Add a warning about the keymap.c getting overwritten. * Fix keymap generating * Install the python deps * Flesh out more of the python environment * Remove defunct json2keymap * Style everything with yapf * Polish up python support * Hide json keymap.c into the .build dir * Polish up qmk-compile-json * Make milc work with positional arguments * Fix a couple small things * Fix some errors and make the CLI more understandable * Make the qmk wrapper more robust * Add basic QMK Doctor * Clean up docstrings and flesh them out as needed * remove unused compile_firmware() function