* move kbd67mkiirgb into kbd67 directory as mkiirgb
* rename files
* rename LAYOUT to LAYOUT_65_ansi_blocker
* add support for default layout
* update readme for new build target
* update parent readme with the fourth variant
* rename LAYOUT to LAYOUT_65_blocker_ansi
* rename LAYOUT macro
* enable LAYOUT_65_blocker_ansi community layout support and remove uneeded lines of code
* rename LAYOUT to LAYOUT_65_blocker_ansi
* rename LAYOUT macro
* enable LAYOUT_65_blocker_ansi community layout support
* enable LAYOUT_65_blocker_ansi support
* fix rename mess up
* add QMK Configurator support with the new rename
* rename blocker_ansi to ansi_blocker as it rolls off the tongue easier
* Rework how bin/qmk handles subcommands
* qmk config wip
* Code to show all configs
* Fully working `qmk config` command
* Mark some CLI arguments so they don't pollute the config file
* Fleshed out config support, nicer subcommand support
* sync with installable cli
* pyformat
* Add a test for subcommand_modules
* Documentation for the `qmk config` command
* split config_token on space so qmk config is more predictable
* Rework how subcommands are imported
* Document `arg_only`
* Document deleting from CLI
* Document how multiple operations work
* Add cli config to the doc index
* Add tests for the cli commands
* Make running the tests more reliable
* Be more selective about building all default keymaps
* Update new-keymap to fit the new subcommand style
* Add documentation about writing CLI scripts
* Document new-keyboard
* Update docs/cli_configuration.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/cli_development.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/cli_development.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/cli_development.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Address yan's comments.
* Apply suggestions from code review
suggestions from @noahfrederick
Co-Authored-By: Noah Frederick <code@noahfrederick.com>
* Apply suggestions from code review
Co-Authored-By: Noah Frederick <code@noahfrederick.com>
* Remove pip3 from the test runner
* move canoe into percent directory
* update readme for new make path
* move skog into percent directory
* update readme for new path and new instructions
* update readme
* fix error in naming
* made tapdance dual_role general
* updated original dual_role functionality
* added toggling layer example
* Fix dual role and add alias
* Update docs about new layer tap dances
* Fix up based on feedback
* Add support for Void Linux systems to the qmk_install.sh script
* Fix typos + grammatical edits in comments
* Sort distributions by alphabetical order in linux_install.sh
* Revert previous commit and sort Void packages in alphabetical order
* Fix permissions on `util/linux_install.sh`
* Add reset instructions for boards that use Command to the Zadig driver installation guide
* -> → →
* Apply suggestions from code review
Replace shorthand keycode names with full names
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Added ottodokto keymaps for dz60 and tmo50.
* moved placement of keymaps to proper directory
* fixed accidental deletion of semicolon for tmo50 map
* fix to use short form codes
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* provide means to turn on RTP mode and set the amplitude
* new keycode HPT_CONT to turn RTP off/on
* introduce new keycodes HPT_CONI, and HPT_COND for Haptic Continuous Increase and Decrease
* support for continuous mode amplitude increase and decrease
* code cleanup
* update docs to reference new keycodes and functionality
* don't touch the keymaps
* add function prototypes
* add proper guards
* cleanup guards
* remove extra reserved
* move caps lock led to keyboard level so even QMK Configurator users have access to it
* set bootloader correctly to atmel-dfu
* clean up extra carriage return
* Updated encoder.c so that split encoders are indexed based on left hand encoders first.
This ensures when swapping master sides that code logic based on encoder index doesn't change.
PR Review fixes
* Removed extra define
* convert codebase to #pragma once
* fix file includes
- quantum.h is included at keyboard level, redundant at revision level
- keyboard-level path is accessible at revision level, remove relative pathing
* duplicate common layout macros from rev1 to rev2
Add the layout macros supported by both rev1 and rev2 to rev2.h directly, which exposes these layouts to QMK Configurator.
* enable community layout support (75_ansi, 75_iso)
* add LAYOUT_75_iso layout data
It needs its own tree because its keys are in a different order from LAYOUT_iso_1u even though the physical layout is the same.
* minimize rules.mk files (use QMK defaults)
* use atmel-dfu bootloader rule
* fix typo on rev1 info.json
* making a new board setup for ymdk bface clone
* removing extra keymaps that copied over
* documentation and edits for new ymdk_bface board
* cleaning up config and keymaps
* removed extra keymap and working on READMEs
* readme edits
* shorter aliexpress link in ymdk_bface readme
* added images to readmes and edited the keymaps
* more flashing directions
* Mac directions formatting
* editing and creating the all layout
* cleanign up ymdk_bface keymaps
* fixed typos in layout
* removed tabs
* cleaned up the LED and Backlight configuration.
* adding more to info.josn and cleaning up readme
* fixing JSON typos
* made a ymdk folder and moved the bface into it.
* fixing file names for the new folder structure
* Added Xerpocalypse's layout
+ Number row and symbols are switched compared to default TMO50 layout
+ Right-hand spacebar acts as backspace and a hold-layer for layer 2.
* Update keyboards/tmo50/keymaps/xerpocalypse/keymap.c
Removed unnecessary #define
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/tmo50/keymaps/xerpocalypse/keymap.c
Changed keymap to use KC_UNDS instead of custom-defined keycode
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* get rid of custom matrix that is no longer being used
* remove _kc LAYOUT
* remove ifdefs and replace with pragma once
* cleanup rules and use bootmagic lite
* get rid of led.c
* Update keyboards/alps64/alps64.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* remove unneeded configurations
* Fix Planck default keymap to play sounds on rev6
The dip_switch_update callback was overriding the default startup sound. This should prevent that from happening, and still allow it to play sounds, or stop them, when appropriate.
* Fix Preonic default keymap to play sounds on Rev 3
The dip_switch_update callback was overriding the default startup sound. This should prevent that from happening, and still allow it to play sounds, or stop them, when appropriate.
* Fix enables for Haptic Feedback
If you enabled bothe DRV2605 and SOLENOID, it would only enable one of these, not both.
This fixes the check so that you can enable both options.
* Fix check for haptic feature
It was sending a comma keypress, while I believe that the targeted
stenography software (at least on systems that generally use
US-International keyboard layout) expects a single-quote/apostrophe key.
* adding working 2key2crawl
Adding working 2key2crawl files
edited files in accordance with original PR comments
* Changes
Changes and updates
* Update readme.md
* Update config.h
removed IS_COMMAND block that was missed in previous commit
* Changes to vol/keymap.c
Removed unneccesary function
* adding a custom mf68 keymap
* added custom tada68 keymap
* readme edit on tada68 map
* added mac fast-forward and rewind keybindings to tada68 emdarcher keymap
* tada68 keymap documentation and edits
* cleanup and edits
* typo fix in emdarcher's tada68 keymap
* cleaning up emdarcher keymap for tada68
* cleaned up emdarcher keymap for mf68
* Created python version of new_keymap.sh: new_keymap.py
* Updated usage message
* Updated new_keymap.py to use python3.5+ syntax & be more similar to new_keyboard.sh
* Updated complete message
* Updated usage in argparser and removed incorrect usage_message
* Reverted the fstrings back to strings that use .format() & updated docstring convention
* Added helper to recursively cd .. until at qmk_firmware root directory
* Revert "Added helper to recursively cd .. until at qmk_firmware root directory"
This reverts commit 61a0ff3b25f91901287bec8d58eb51a1f126e2ad.
* Updated new_keymap.py to use printf-style format strings
* First draft lib/python/qmk/cli/new/keymap.py with milc
* Removed shebang & syspath appending lines
* Added optional args & resolved some cr comemnts
* Added a docstring and updated strings
* Added new 2x5 Keypad with 3 LEDs to indicate the selected layer. By Jonathan Cameron.
* Minor refactor from suggestions from qmk team
* Added
* Moved to 'handwired' directory
* Update readme.md
* Update readme.md
* Update readme.md
* Update keyboards/handwired/2x5keypad/readme.md
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Switch to image offsite
* Moved image offsite
* Update keyboards/handwired/2x5keypad/keymaps/default/keymap.h
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/handwired/2x5keypad/2x5keypad.h
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Moved functions into .c file per suggestions
* Cosmetic
* Fixed function called, per suggestions.
* Update keyboards/handwired/2x5keypad/2x5keypad.h
Ok
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Moved LED functions to the top level since they can be used it various flavors
* Declare those moved LED functions!
* Update keyboards/handwired/2x5keypad/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
The E6.5 is the new 65% keyboard made by Exclusive.
This changeset adds its PCB to QMK, including all the bottom row
variants and iso/ansi/split BS layouts.
* add dp60 keyboard
* fixup wording in readme
* fix layout name in default keymap. I was missing an r
* Add QMK Configurator support for the additional layouts
* Update keyboards/dp60/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/dp60/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/dp60/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/dp60/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/dp60/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* strip out the VIA enabling from default rules.mk
* add a VIA only keymap
* Add Rabbit68 Keyboard w/ default,kaiec keymaps.
* Requested changes by @fauxpark
* Change flash command, as suggested by @drashna
* Update keyboards/rabbit/rabbit68/readme.md
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Add link to Github repo
As I per suggestion changed the link above to an image, I added now the link to the project page to the Open Source text, where it actually makes the most sense.
* change LAYOUT_ANSI to LAYOUT_60_ansi
* change QMK Configurator layout to LAYOUT_60_ansi as well
* add 60_ansi support so I can make my userspace =)
* update readme
* Very strange. ISO keymap is still using 60_ansi LAYOUT macro. But then again....no ISO hottswap dz60 has been released
* UT47.2 keymap/updates for Planck style layout switching
* UT47.2 keymap for Planck-style layout switching / code clean up
* UT47.2 keymap for Planck-style layout switching: Qwerty, Workman, Colemak, Colemak Mod-DH, and Dvorak added / code clean up
* Change the layout info to match the keymap
* Edit readme to contain relevant info for layout switching
* Edit readme to contain relevant info for layout switching
* Edit readme to contain relevant info for layout switching
* Edit readme to contain relevant info for layout switching. Add QMK Configurator file.
* Update readme.md with make information
* Undo breaking change in config.h
* Code cleanup
* Code cleanup
* Code cleanup
* More code cleanup
* Turn off more unnecessary features by default
* Double TAP_CODE_DELAY due to more media key issues
Even with this change, some of the rotary encoder turns on my BDN9's
volume knob still seem to get dropped. It's possible there's something
wrong with the encoder itself. (Maybe the TAP_CODE_DELAY actually causes
QMK to miss an encoder turn? Unclear.) The other knob (backlight
brightness) works fine, FWIW....
* Restructure userspace config.h a bit
* Hack around Instant60 Via EEPROM conflict
Remove this when #6589 is fixed for Via boards.
* Add backlight breathing and (EEPROM) reset to BDN9
* Add keymap for 9-Key macropad
* Add a quefrency keymap
* New Alt-ernate layouts
* Enable Per Key Tapping Term to preserve sanity
* Use underglow and mod lights for status on Corne
* Update the drashna_ms keymap for quefrency
* Disable Audio since there isn't enough space
* Update KC_MAKE to ues :flash target
* Cleanup ergodox layout
* Enable i2c support for Iris
* Add keymap support for CG_SWAP
* Enable RGB Matrix Shutdown mode
* enable heatmap
* Update gitlab CI to install python3
* Remove game macros
These are no longer needed, and haven't been used in ages
* Cleanup planck layout
* Add RGB Matrix fun and RGB cleanup
* Add keycode and config for RGB Matrix idle animations
* Clean up rgb idle animation code
* Add rgb idle keycode to keymaps
* Fix issues with rgb matrix idle animation
* Fix some handling for idle animation
* Reduce idle animation timeout to 15s to be more reasonable
* fix up rgb stuff
* Fix isses with rgb functions not being called for matrix
* Use custom EEPROM Magic Number so testing is easier
* Extend Default Layer macro to support a lot more layers
* Fix bjohnson macropad
* Adjust KC_MAKE to process mods for more consistent behavior
* Fix up rgb stuff on corne
* Corne OLED Overhaul
* Fixes a number of issues with weirdness.
* Fixes issues with keylogger (should be more reliable now)
* Modulaize the OLED render sections
* Rewrite layer display code
* Update URL for Font Editor
Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows.
* Update polling rate on all keebs
* Fix planck ez layout config
* Remove macros from Viterbi
* Update keymap.c
Additional functionality added to layers.
* Error fix
Fixed missing key in layer 5, fixed brightness keys with universal codes, made code more readable.
* fix missing commas
fixed missing commas on line 19 and line 23
* fix Indicator LED sticking on RGB off toggle.
fixes issue: LED indicators stay on when toggling RGB off
* fixup readme to adhere to QMK standards and to also have more information
* use pragma once
* strip out the custom bootmagic lite routine as it is the same as QMK's default bootmagic lite routine. Also add the caps lock led indicator
* turn on bootmagic lite
* update default keymap
* Update keyboards/playkbtw/ca66/ca66.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* remove lines 4 thru 37 and add bootloader
* Add missing void parameter declarations to *_light functions
* Add doro67/multi:konstantin keymap
* Allow FNLK to be canceled with Esc
* Function layer → Fn layer in keymap comments
* Fix battery level code in adafruit_ble.cpp
The code in tsk_core/protocol/lufa/adafluit_ble.cpp that polls the
battery level for the Adafruit feather BLE controller reads the
regulated voltage, not the raw voltage coming from the battery. To do
that, the Adafruit Feather docs say you should read from pin A9:
https://learn.adafruit.com/adafruit-feather-32u4-basic-proto/power-management#measuring-battery-4-9.
(See also
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts#logic-pins-2-9.)
I'm not sure why, but analogRead(9); doesn't read the correct pin.
Checking all available analog pins experimentally, it turns out that
analogRead(7); returns the correct value. So the code above should read:
state.vbat = analogRead(7);
* Update tmk_core/protocol/lufa/adafruit_ble.cpp
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Remove old comment
* Fix linking error
* Remove `#ifdef` around `#include analog.h`.
* Really fix linking error
Add spacing to LAYOUT macros, add layout comments, improve consistency, fix ISO layout bug
* Remove placeholder comments in regular.h and rgb.h
* Change K## to k## in multi.h and regular.h
* Add alignment whitespace in Doro67 LAYOUT macros
* Update multi default keymaps and add layout comments
* Update rgb default keymap and add layout comments
* Add RESET to Fn layer in multi default keymaps
* Replace KC_GESC with KC_ESC in rgb default keymap for consistency with other Doro keymaps
* Update regular default keymap and add layout comments
* WIP
* Replace odd F1, F2 with proper split LShift/Backspace keys in default_multi
* Minor fixes and tweaks in multi default keymaps
* Fix Enter and NUHS positions in multi LAYOUT_iso
* Return true in process_record_user in rgb default keymap
* Update Enter position in multi info.json
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update labels in multi info.json to match the default keymaps
* Enable Fn layer tap dances only if LAYER_FN is defined
* Update KBD6X keymap spacing to match LAYOUT spacing
* Add regular FNLK to userspace, update keymap comment labels
* Rename KC_BRK → BREAK, KC_SYSR → SYSRQ in userspace
* Change mousekey positions in KBD6X
* Disable Console in KBD6X to reduce firmware size
* Return false in process_record_* only when overriding existing keys
* Fix Caps light not working after LSFT_FN
* Refactor Fn/Caps light, fix sequencing issues
* Add Dip Switches as a core feature
* Add documentation for Dip Switch feature
* Update Preonic Rev3 to use new feature and remove custom matrix
* Apply suggestions from code review
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Remove custom matrix line completely
Rather than just disabling it
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* DIP changes
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Use better check for DIP Switch configuration
* Add to show features
* Add bitmask callback for dip switch
* Fix OLKB Boards dip switch config
* Update docs to include bitmask example
* Fix comments/documentation
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fix issues with docs and use example from @tuzonghua
* Fix wording
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fix example to use proper formatting
Bad, BAAAAAAD drashna!!!
* Handle dip switch initialization better
* Add `dfu-programmer` to `pacman -S` (#6618)
`dfu-programmer` now resides at `extra/dfu-programmer` and is no longer
in the AUR
* Add `--needed` option to `pacman -S` for efficiency
* Fix
* Update util/linux_install.sh
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
Specifically, the `util/travis_compiled_push.sh` runs a number of cleanup and deployment routines. This includes `dos2unix` that fixes the line endings for sanity's sake. However, it only runs on successful builds. That would be fine, except some builds WILL fail (community layouts, yay), which is a problem.
This should change the behavior to always run the post compile checks.
However, in the long run, we should break up this script into more parts.
* update codebase to four-space indent
* update codebase to use #pragma once
* refactor config.h
* change info.json to debug linting
* refactor readme
- file header
- update docs links
* minimize and lint rules.mk
* change features
- enable mousekeys and nkro
* use GPIO commands for Status LED
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* use IS_LED_ON macro
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* update compile/flash examples in readme
* :flash doesn't use QMK Toolbox
* added personal CTRL keymap
* added personal dz60rgb keymap
* enabled new rgb effect
* added space cadet shift
* media player track buttons now orange
* updated keymaps with rgb setting and visual HSV setting preview
* fixed source stuff?
* added support for underglow toggle (bugged to all hell)
* everything now behaves as expected when ti comes to RGB toggles, thank god
* removed ifdefs
* changed color of MAS_CRM
* uh, whitespace
* changed rgb positions and modifiers within RGB matrix thing for CTRL and DZ60RGB
* updated keymap to work kindof
* KEYMAP: changed list of rgb effects
* changed CTRL rgb defaults
* KEYMAP: new LED layout for ctrl
* fixed white LED position in indicator
* changed capslock tap timing
* Added new keymap - dz68rgb
* Apply suggestions from code review
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Fixed pin for RGB
* Added support for second revision of vitamins included
* Added rev2 config and switched to #pragma once
* Switch to quantum.h pincontrol
* Fixed left-half check
* Moved revision agnostic code to main header file
* Moved common build options to main makefile
* Referred to rev2 documentation
* JTAG is dissabled in keyboard.c now
* moved EEHANDS to rev1 config
* moved rev2 to use split_common
* Updated default keymaps
* Changed handedness ifdef to allow user-overrides
* Add some space saving defines
* Changed to more sane I2C clock
* Removed rev2 check in matrix.c as rev2 uses split_common
* Removed rev2 check in rev1 only code
* Update debounce constant name
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Switch KEYMAP macro to LAYOUT
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Switch kc_keymap macro to layout_kc
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Switch kc_keymap macro to layout_kc
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Add legacy layout macro alias
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/vitamins_included/rev2/config.h
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Split readme into revision specific versions
* Updated src to allow LTO
* Renamed readmes to lower-case
* Switched my keyboards to FEED VID
* Fixed markdown lint errors
* fixed readme links
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Maintain keymap backwards compatibility
Co-Authored-By: Joel Challis <git@zvecr.com>
* Switch Quefrency back to I2C (#6161 fixes the lag)
* Update Quefrency keymap
* Add reset and EEPROM reset keybindings so these tasks can be performed
separately, rather than relying on Bootmagic Lite, which performs both
tasks at the same time.
* Move Caps Lock from Fn+Ctrl to Fn+Tab since Fn+Ctrl is sometimes used
as part of a more complex keybinding, whereas Fn+Tab is always safe.
* Update KBD67 keymap
* Add reset and EEPROM reset keybindings so these tasks can be performed
separately, rather than relying on Bootmagic Lite, which performs both
tasks at the same time.
* Move Caps Lock from Fn+Ctrl to Fn+Tab since Fn+Ctrl is sometimes used
as part of a more complex keybinding, whereas Fn+Tab is always safe.
* Move Menu to a layer tap on the Fn key since that's a more natural
location.
* Update 60% Tsangan HHKB layout
* Move Caps Lock from Fn+Ctrl to Fn+Tab since Fn+Ctrl is sometimes used
as part of a more complex keybinding, whereas Fn+Tab is always safe.
* Update 60% ANSI split backspace/right-shift layout
* Add reset and EEPROM reset keybindings so these tasks can be performed
separately, rather than relying on Bootmagic Lite, which performs both
tasks at the same time.
* Move Caps Lock from Fn+Ctrl to Fn+Tab since Fn+Ctrl is sometimes used
as part of a more complex keybinding, whereas Fn+Tab is always safe.
* Update atreus to current code conventions - add multi revision instead of defines
* Remove config.h duplication from user keymaps
* Add breaking change log
* Add missing pragma once
* Branch point for 2019 Aug 30 Breaking Change
* LUFA USB descriptor cleanup (#4871)
* Fix indentation
* Fix braces
* Expand descriptor headers
* Align descriptor elements
* Nicer formatting
* Tidy up preprocessor statements
* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418
* Tidy up comments
* Tweak ordering of HID report elements (no functional changes)
* We don't need all of these newlines
* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense
* Ask nicely
* Add some more comments
* Change indentation back to 4 spaces
* Add changelog entry
* Language Keymap extras backport from ZSA fork (#6198)
* Swedish extra keymap refactor
* Fix swedish $ sign definition (#81)
* Fix br abnt2 keymap compilation error
* Add PR changelog doc
* Update PR6198.md
* Enforce clang-format (#6293)
* Enforce clang-format on commit for core files
* forgot about tests
* Migrate ACTION_LAYER_MOMENTARYs to MO() (#5176)
* Migrate ACTION_LAYER_MOMENTARYs to MO()
* Add changelog entry
* Update docs/ChangeLog/20190830/PR5176.md
Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>
* Migrate ACTION_BACKLIGHT_* to BL_*
* Add changelog
* Update docs/ChangeLog/20190830/PR6299.md
Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>
* Fix indentation
* Fix braces
* Expand descriptor headers
* Align descriptor elements
* Nicer formatting
* Tidy up preprocessor statements
* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418
* Tidy up comments
* Tweak ordering of HID report elements (no functional changes)
* We don't need all of these newlines
* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense
* Ask nicely
* Add some more comments
* Change indentation back to 4 spaces
* Add changelog entry
This will manually wipe the EEPROM. This is a hacky solution for when new ranges are added or moved around.
A better (more complicated) solution would be to zero out everything, not just known ranges. But for now, this is a hacky solution that will work.
* default keymap fix for questionmark
Added /? to the default position for a qwerty keyboard. Moved |\ to the left ctrl with the same behaviour as before.
* Small PR adjustments and Keypad optimization
* Update keymap.c
* Update keymap.c
* Add 2015 revision of pegasus hoof to QMK
* Add different version strings
* Fix ansi tkl layout
- temporary JIS mapping, I can't test this as I don't have the hardware
* Reverse engineer JIS layout macro for 2015 Pegasus Hoof
* Linting on 2013.h
* Add more resources to readme
* Update keyboards/bpiphany/pegasushoof/2013/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/bpiphany/pegasushoof/2015/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/bpiphany/pegasushoof/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/bpiphany/pegasushoof/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Try to use core debouncing code
* return changed
* Use helpers
* initial commit
* Add the correct pins and ordering
* create an appropriate keymap macro for the board
* add an appropriate LAYOUT macro
* add a keymap that fits the LAYOUT layout macro
* add QMK Configurator support
* add missing pin D7 and LAYOUT_all
* fix my mistake when I added an extra key to the electrical matrix instead of the physical one
* add qmk configurator support for LAYOUT_all
* Update keyboards/eve/meteor/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/eve/meteor/rules.mk
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* use the default names so BMC still works
* remove mcu rules as per resolution of 6253
* Layout with better use of navigation keys
* Update keyboards/tada68/keymaps/onelivesleft/config.h
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* added combos
* minor adjustments, added combos
* Add second encoder, add modifiers to encoders
Added a skeleton for the possibily having a second encoder.
Added 9 modifiers for the first rotary encoder:
- None
General navigation. Page up/down
- SHIFT
Fast navigation. Home/end
- CTRL
Vertical navigation. Up/down
- CTRL+SHIFT
Horizontal navigation. Left/right
- ALT
Audio volume control.
- GUI
Browser navigation(windows). Forward/backward
- ALT+SHIFT
Form navigation. Tab up/down
- ALT+CTRL
Media control. (Play|pause)/mute
- HYPER
Media navigation. Next/prev track
Key codes are stored in `uint16_t encoder_actions[2][9]`
* Add second encoder, add modifiers to encoders
Added a skeleton for the possibily having a second encoder.
Added 9 modifiers for the first rotary encoder:
- None
General navigation. Page up/down
- SHIFT
Fast navigation. Home/end
- CTRL
Vertical navigation. Up/down
- CTRL+SHIFT
Horizontal navigation. Left/right
- ALT
Audio volume control.
- GUI
Browser navigation(windows). Forward/backward
- ALT+SHIFT
Form navigation. Tab up/down
- ALT+CTRL
Media control. (Play|pause)/mute
- HYPER
Media navigation. Next/prev track
Key codes are stored in `uint16_t encoder_actions[2][9]`
* Clean up; added combos
Combos:
- CV: Copy
- XC: Cut
- ZV: Paste
- QP: KC_SLEEP
* Fix LEADER_DICTIONARY to be more useful
* Add documentation
* Minor fixes
* Raise TAPPING_TERM
* testing
* Rearrange modifiers
* Fix kc being stored in uint8 instead of uint16
* Update documentation
* Clean up
* Remove excess comments
* Put encoder_actions in progmem
* Add Zadig 101 to docs
* Add USBasp bootloader name
* Add links to the page
* Note the usual VIDs and PIDs for the bootloaders
* Add "List All Devices" note, just in case
* Talk about keyboard-specific bootloader procedures
* Send users to the new page in "Unknown Device for DFU Bootloader" section
* Halfkay bootloaders are also an exception here
* Update how_keyboards_work.md
bridged the gap between scancodes and keycodes, the doc didn't make the distinction and was ambiguous.
* Update docs/how_keyboards_work.md
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update docs/how_keyboards_work.md
fix typo
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update Layer functions to use layer_state_t in ZSA Boards
* Update Music Mask for ZSA boards
Fixes an issue with the board getting stuck on Adjust layer when activating music mode
* Add Support for SMART LED Toggle to Planck EZ
* Add support for SMART LED toggle in Ergodox EZ
* Ifdef swiss cheeze for Oryx Configurator
* Documentation and updates
* Add Oryx Keymap
* Add option to configure the layers for the Layer Indicator
* Update keymap with better examples
* Make sure eeprom is initialized before reading from it
* Force flush of LED matrix when suspending board
This fixes an issue where the LEDs don't fully clear sometimes when the host system goes to sleep
* Enable RGB Sleeping by default
* Add clarification about planck ez led layer config
* A little easier to read the definition of the GPIO control macro for AVR.
No change in build result.
* Changed to not use GNU statement expression extension.
No change in build result.
* Modified split_common/serial.c to use qmk_firmware standard GPIO control macro.
No change in build result.
* fix PE6 -> E6
* remove some space
* add some comment to config_common.h
* Changed split_common/serial.c to use a newer version of qmk_firmware standard GPIO control macro.
* Additional changes for Layer State typedef compatibility
* Replace biton32 with get_highest_layer in docs
* Change additional layer structure code
* Fix uGFX reference issue
* Remove dynamic_keymap check
* Where did all these extra spaces come from
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Add MAGIC_SWAP_CONTROL_LGUI and MAGIC_UNSWAP_CONTROL_LGUI keycodes
Key codes to swap and unswap the control and windows/cmd keys
* Fix issues with pull request #6110
Renamed swap/unswap lctl and lgui key codes, added key codes to swap/unswap rctl and rgui, and moved new bool inside keycode_config.h struct to the end
* Move new keycodes to the end of the enum (#6110)
* add cases for swapped control and OS keys to mod_config (#6110)
* Add new keycodes to feature_bootmagic.md (#6110)
* Add R+L swap codes to keep in parity with AG_* codes
* Extend Magic range check to include new magic codes
* Update audio docs
* Combine 2 byte ranges into 1 word for EECONFG
Fix names for Keymap config EEPROM
* Update docs/feature_bootmagic.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/feature_bootmagic.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/feature_bootmagic.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update docs/feature_bootmagic.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Optimize RGB Matrix rendering for Ergodox EZ
* Optimize RGB Matrix rendering for Planck EZ
* Update keyboards/planck/ez/config.h
Co-Authored-By: Joel Challis <git@zvecr.com>
* Remove superfluous JTAG disable code
* 32A has differently named register
* Accidentally some operators
* 32A also has different JTAG pins
* Wrap disable_jtag() in an ifndef
* Document this new define
* Rename the define, it conflicts with a LUFA thing
Also, move the ifndef wrapping to the call in keyboard_setup()
* removed some debug prints
* removed unnecessary files, tweaked some things
* rotary encoder button now connected into column 0, row 3
* tweaked keymap and moved encoder control into keymap
* tweaks
* added test keymap
* updated some things to make it easier to work with QMK configurator
* updates after merging latest master in
* fixed a few things
* removed test keymap and all related #ifdefs
* changed some dumbpad default keys, added KC_LOCK
* added image to readme
* added link to PCB github repo
* moved lock key to the rotary encoder pushbutton
* making suggested changes from @fauxpark in https://github.com/qmk/qmk_firmware/pull/6452
* adding bootmagic lite since i'm lazy and haven't soldered on the reset button...
* renamed to
* using 7 underscores for KC_TRNS
* adding my layout (default is for wife)
* updated my own layout, tweaked default keymap to use cleaner switch for encoder control
* removed commented out import from imchipwood keymap, removed unnecessary comment from default layout
* added LED layer control
* flash the layer indicator LEDs at startup
* change layer_state_set_user to layer_state_set_kb
Co-Authored-By: Joel Challis <git@zvecr.com>
* in layer_state_set_kb, return layer_state_set_user
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* remove include of upper level config.h, add pragma once
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* changing default keymap slightly, added config.h for default layout
* change _delay_ms to wait_ms
* replaced locking numlock with numlock
* Update keyboards/dumbpad/dumbpad.c
change `keyboard_pre_init_user` to `keyboard_pre_init_kb`
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/dumbpad/dumbpad.c
adding `keyboard_pre_init_user()` to `keyboard_pre_init_kb()`
Co-Authored-By: Joel Challis <git@zvecr.com>
* fixed some comments about the layer key (MO to TT) and the SUB layer rotary encoder control
* Move default keymap's rules to keyboard level
* Concatenate the two sets of rules
This sets CONSOLE_ENABLE to no, which was being set at the keymap level.
* Wrap the USB Device Description in quotes
Some preventative maintenance. The firmware for the_ruler can't be compiled without this change if `CONSOLE_ENABLE = yes` because this string has a comma, which gets picked up as two arguments by the Command code, instead of one as it should be.
* Linting
- remove firmware size impacts
- remove trailing white space
- visual alignment of rules
* Use QMK's pre-loaded default rules for atmega32u4
* Update readme
- markdown formatting
- update Hardware Availability link (Maple Computing's site has disappeared)
- update Docs links
* Update header files to use #pragma once
* Add universal flash command
* Add bootloader info to I:C boards
* Add support for ATSAM
* Add messages for flash target
* Message cleanup
* Add USB ASP Flashing target
* Make usbasp target more universal
* Add phoney target for usbasp
* Clarify error message when bootloader isn't matched
* Fix Clueboard hotswap gen1 not compiling when LED Matrix is disabled
* Move keymap.json to default keymap folder
* Revert "Move keymap.json to default keymap folder"
This reverts commit 7f28df909d7e4dcc79ab0ff44fe264656b5dfa18.
* Add an alternative method for keyboard discovery to speed up build
* Chain MAKEFLAGS for docker_build.sh
* Slight improvement to number of items sent to sort
* Remove debug line
* Fix line escape
* Added Bulbizarre keymap for the XD75
* Fixed no newline at the end of file
* Update keyboards/xd75/keymaps/bulbizarre/readme.md
Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com>
* Update led status check
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Remove unnecessary define
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* remove led layer code
* enable PWM on STM32F303
* Unusable PWM code
* Updated PWM Stuff?
* PWM Semi-working
* Both LEDs working at the same time
* Update names
* Add led level functions
* Add LED levels and persistent settings
* Revert change due to issues with timing related code
* Review feedback and minor cleanup
* add Userspace and keymaps
* Adding keymaps for zeal60 and iris
* Created my own tap dance that toggles RGB Mode based on whether I toggled caps lock or not
* parent 578ed42a7f8f986147cad040d50d4ae1d24a32e2
author Seth Barberee <seth.barberee@gmail.com> 1565065903 -0500
committer Seth Barberee <seth.barberee@gmail.com> 1565065903 -0500
move to userspace
add zeal60
* update based on review
* move userspace to github name
@ -8,8 +8,17 @@ Our users, contributors, and collaborators are expected to treat each other with
* The use of sexualized language or imagery
* Unwelcome advances, sexual or otherwise
* Deliberate intimidation, stalking, or following
* Insults or derogatory comments, or personal or political attacks
* Publishing others’ private information without explicit permission
* Sustained disruption of talks or other events
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Advocating for, or encouraging, any of the above behaviour
If someone is violating this Code of Conduct you may email hello@qmk.fm to bring your concern to the Members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
# Reporting
If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated.
QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that.
Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly.
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
This document marks the inaugural Breaking Change merge. A list of changes follows.
## Core code formatting with clang-format
* All core files (`drivers/`, `quantum/`, `tests/`, and `tmk_core/`) have been formatted with clang-format
* A travis process to reformat PR's on merge has been instituted
* You can use the new CLI command `qmk cformat` to format before submitting your PR if you wish.
## LUFA USB descriptor cleanup
* Some code cleanups related to the USB HID descriptors on AVR keyboards, to make them easier to read and understand
* More information: see https://github.com/qmk/qmk_firmware/pull/4871
* No behaviour changes anticipated and no keymaps modified
## Migrating `ACTION_LAYER_MOMENTARY()` entries in `fn_actions` to `MO()` keycodes
*`fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity
* All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
## Update Atreus to current code conventions
* Duplicate include guards have bypassed the expected header processing behavior
* All keymaps affected are recommended to remove duplication of `<keyboard>/config.h` to `<keyboard>/keymaps/<user>/config.h` and only provide overrides at the keymap level
## Backport changes to keymap language files from ZSA fork
* Fixes an issue in the `keymap_br_abnt2.h` file that includes the wrong source (`keymap_common.h` instead of `keymap.h`)
* Updates the `keymap_swedish.h` file to be specific to swedish, and not just "nordic" in general.
* Any keymaps using this will need to remove `NO_*` and replace it with `SE_*`.
## Update repo to use LUFA as a git submodule
*`/lib/LUFA` removed from the repo
* LUFA set as a submodule, pointing to qmk/lufa
* This should allow more flexibility with LUFA, and allow us to keep the sub-module up to date, a lot more easily. It was ~2 years out of date with no easy path to fix that. This prevents that from being an issue in the future
## Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes
*`fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys
* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
## Remove `KC_DELT` alias in favor of `KC_DEL`
*`KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result
This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps.
The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted.
## What has been included in past Breaking Changes?
* [2019 Aug 30](ChangeLog/20190830.md)
## When is the next Breaking Change?
The next Breaking Change is scheduled for Nov 29.
### Important Dates
* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly.
* [ ] 2019 Nov 01 - `future` closed to new PR's.
* [ ] 2019 Nov 01 - Call for testers.
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
* [ ] 2019 Nov 29 - Merge `future` to `master`.
* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again.
## What changes will be included?
To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged.
If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted.
Criteria for acceptance:
* PR is complete and ready to merge
* PR has a ChangeLog
# Checklists
This section documents various processes we use when running the Breaking Changes process.
## Rebase `future` from `master`
This is run every Friday while `future` is open.
Process:
```
cd qmk_firmware
git checkout master
git pull --ff-only
git checkout future
git rebase master
git push --force
```
## Creating the `future` branch
This happens immediately after the previous `future` branch is merged.
*`qmk_firmware` git commands
* [ ]`git checkout master`
* [ ]`git pull --ff-only`
* [ ]`git checkout -b future`
* [ ] Edit `readme.md`
* [ ] Add a big notice at the top that this is a testing branch.
* [ ] Include a link to this document
* [ ]`git commit -m 'Branch point for <DATE> Breaking Change'`
* [ ]`git tag breakpoint_<YYYY>_<MM>_<DD>`
* [ ]`git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
* [ ]`git push origin future`
* [ ]`git push --tags`
## 4 Weeks Before Merge
*`future` is now closed to new PR's, only fixes for current PR's may be merged
* Post call for testers
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb
## 1 Week Before Merge
* Announce that master will be closed from <2DaysBefore> to <DayofMerge>
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb
## 2 Days Before Merge
* Announce that master is closed for 2 days
* [ ] Discord
* [ ] GitHub PR
* [ ] https://reddit.com/r/olkb
## Day Of Merge
*`qmk_firmware` git commands
* [ ]`git checkout future`
* [ ]`git pull --ff-only`
* [ ]`git rebase origin/master`
* [ ] Edit `readme.md`
* [ ] Remove the notes about `future`
* [ ] Roll up the ChangeLog into one file.
* [ ]`git commit -m 'Merge point for <DATE> Breaking Change'`
@ -4,28 +4,143 @@ This page describes how to setup and use the QMK CLI.
# Overview
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
*`qmk compile-json`
*[Global CLI](#global-cli)
* [Local CLI](#local-cli)
* [CLI Commands](#cli-commands)
# Setup
# Requirements
Simply add the `qmk_firmware/bin` directory to your `PATH`. You can run the `qmk` commands from any directory.
The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
# Global CLI
QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically.
## Install Using Homebrew (macOS, some Linux)
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
```
export PATH=$PATH:$HOME/qmk_firmware/bin
brew tap qmk/qmk
brew install qmk
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```
You may want to add this to your `.profile`, `.bash_profile`, `.zsh_profile`, or other shell startup scripts.
## Install Using easy_install or pip
# Commands
If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
## `qmk compile-json`
```
pip3 install qmk
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```
This command allows you to compile JSON files you have downloaded from <https://config.qmk.fm>.
## Packaging For Other Operating Systems
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
* Follow best practices for your OS when they conflict with these guidelines
* Documment why in a comment when you do deviate
* Install using a virtualenv
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
# Local CLI
If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
**Example**:
```
$ ~/qmk_firmware/bin/qmk hello
Ψ Hello, World!
```
## Local CLI Limitations
There are some limitations to the local CLI compared to the global CLI:
* The local CLI does not support `qmk setup` or `qmk clone`
* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
# CLI Commands
## `qmk compile`
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.
**Usage for Configurator Exports**:
```
qmk compile <configuratorExport.json>
```
**Usage for Keymaps**:
```
qmk compile -kb <keyboard_name> -km <keymap_name>
```
## `qmk cformat`
This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.
**Usage**:
```
qmk compile-json mine.json
qmk cformat [file1] [file2] [...] [fileN]
```
## `qmk config`
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
Configuration for QMK CLI is a key/value system. Each key consists of a subcommand and an argument name separated by a period. This allows for a straightforward and direct translation between config keys and the arguments they set.
## Simple Example
As an example let's look at the command `qmk compile --keyboard clueboard/66/rev4 --keymap default`.
There are two command line arguments that could be read from configuration instead:
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
```
Now I can run `qmk compile` without specifying my keyboard and keymap each time.
## Setting User Defaults
Sometimes you want to share a setting between multiple commands. For example, multiple commands take the argument `--keyboard`. Rather than setting this value for every command you can set a user value which will be used by any command that takes that argument.
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
```
# CLI Documentation (`qmk config`)
The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:
<subcommand|general|default>[.<key>][=<value>]
## Setting Configuration Values
You can set configuration values by putting an equal sign (=) into your config key. The key must always be the full `<section>.<key>` form.
Example:
```
$ qmk config default.keymap=default
default.keymap: None -> default
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
```
## Reading Configuration Values
You can read configuration values for the entire configuration, a single key, or for an entire section. You can also specify multiple keys to display more than one value.
### Entire Configuration Example
qmk config
### Whole Section Example
qmk config compile
### Single Key Example
qmk config compile.keyboard
### Multiple Keys Example
qmk config user compile.keyboard compile.keymap
## Deleting Configuration Values
You can delete a configuration value by setting it to the special string `None`.
Example:
```
$ qmk config default.keymap=None
default.keymap: default -> None
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
```
## Multiple Operations
You can combine multiple read and write operations into a single command. They will be executed and displayed in order:
This document has useful information for developers wishing to write new `qmk` subcommands.
# Overview
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
# Subcommands
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
Subcommands in the local CLI are always found in `qmk_firmware/lib/python/qmk/cli`.
Let's start by looking at an example subcommand. This is `lib/python/qmk/cli/hello.py`:
```python
"""QMK Python Hello World
This is an example QMK CLI script.
"""
frommilcimportcli
@cli.argument('-n','--name',default='World',help='Name to greet.')
@cli.subcommand('QMK Hello World.')
defhello(cli):
"""Log a friendly greeting.
"""
cli.log.info('Hello, %s!',cli.config.hello.name)
```
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
# User Interaction
MILC and the QMK CLI have several nice tools for interacting with the user. Using these standard tools will allow you to colorize your text for easier interactions, and allow the user to control when and how that information is displayed and stored.
## Printing Text
There are two main methods for outputting text in a subcommand- `cli.log` and `cli.echo()`. They operate in similar ways but you should prefer to use `cli.log.info()` for most general purpose printing.
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
You should never use the format operator (`%`) directly, always pass values as arguments.
### Logging (`cli.log`)
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
Sometimes you simply need to print text outside of the log system. This is appropriate if you are outputting fixed data or writing out something that should never be logged. Most of the time you should prefer `cli.log.info()` over `cli.echo`.
### Colorizing Text
You can colorize the output of your text by including color tokens within text. Use color to highlight, not to convey information. Remember that the user can disable color, and your subcommand should still be usable if they do.
You should generally avoid setting the background color, unless it's integral to what you are doing. Remember that users have a lot of preferences when it comes to their terminal color, so you should pick colors that work well against both black and white backgrounds.
Colors prefixed with 'fg' will affect the foreground (text) color. Colors prefixed with 'bg' will affect the background color.
There are also control sequences that can be used to change the behavior of
ANSI output:
| Control Sequences | Description |
|-------------------|-------------|
| {style_bright} | Make the text brighter |
| {style_dim} | Make the text dimmer |
| {style_normal} | Make the text normal (neither `{style_bright}` nor `{style_dim}`) |
| {style_reset_all} | Reset all text attributes to default. (This is automatically added to the end of every string.) |
| {bg_reset} | Reset the background color to the user's default |
| {fg_reset} | Reset the foreground color to the user's default |
# Arguments and Configuration
QMK handles the details of argument parsing and configuration for you. When you add a new argument it is automatically incorporated into the config tree based on your subcommand's name and the long name of the argument. You can access this configuration in `cli.config`, using either attribute-style access (`cli.config.<subcommand>.<argument>`) or dictionary-style access (`cli.config['<subcommand>']['<argument>']`).
Under the hood QMK uses [ConfigParser](https://docs.python.org/3/library/configparser.html) to store configurations. This gives us an easy and straightforward way to represent the configuration in a human-editable way. We have wrapped access to this configuration to provide some nicities that ConfigParser does not normally have.
## Reading Configuration Values
You can interact with `cli.config` in all the ways you'd normally expect. For example the `qmk compile` command gets the keyboard name from `cli.config.compile.keyboard`. It does not need to know whether that value came from the command line, an environment variable, or the configuration file.
You can set configuration values in the usual ways.
Dictionary style:
```
cli.config['<section>']['<key>'] = <value>
```
Attribute style:
```
cli.config.<section>.<key> = <value>
```
## Deleting Configuration Values
You can delete configuration values in the usual ways.
Dictionary style:
```
del(cli.config['<section>']['<key>'])
```
Attribute style:
```
del(cli.config.<section>.<key>)
```
## Writing The Configuration File
The configuration is not written out when it is changed. Most commands do not need to do this. We prefer to have the user change their configuration deliberitely using `qmk config`.
You can use `cli.save_config()` to write out the configuration.
## Excluding Arguments From Configuration
Some arguments should not be propagated to the configuration file. These can be excluded by adding `arg_only=True` when creating the argument.
Example:
```
@cli.argument('-o', '--output', arg_only=True, help='File to write to')
* key combination that allows the use of magic commands (useful for debugging)
*`#define USB_MAX_POWER_CONSUMPTION`
*`#define USB_MAX_POWER_CONSUMPTION 500`
* sets the maximum power (in mA) over USB for the device (default: 500)
*`#define USB_POLLING_INTERVAL_MS 10`
* sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
*`#define F_SCL 100000L`
* sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above.
QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*.
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the Halfkay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with Msys2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.
## Installation
Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
Alternatively, hold `BOOT` while inserting the USB cable.
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options → List All Devices**.
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
- For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`.
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing.

Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change.
## Recovering from Installation to Wrong Device
If you find that you can no longer type with the keyboard, you may have installed the driver onto the keyboard itself instead of the bootloader. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces:

Open the Device Manager and look for a device that looks like your keyboard.

Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first.

Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
@ -75,14 +75,11 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m
## Unknown Device for DFU Bootloader
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader.
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all.
Re-running the installation script for MSYS2 may help (eg run `util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package.
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, and run it on the system. Then, you will need to reset your board into bootloader mode. After that, locate the device in question. If the device doesn't show up in the list (or nothing shows up in the list), you may need to enable the `List all devices` option in the `Options` menu.
From here, you will need to know what type of controller the board is using. You may see it listed in the Device Manager as `ATmega32U4` device (which is an AVR board), or an `STM32` device (Which is an ARM board). For AVR boards, use `libusb-win32` for the driver. For ARM boards, use the `WinUSB` driver. Once the correct driver type has been selected, click on the `Replace Driver` button, unplug your board, plug it back in, and reset it again.
Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.
If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information.
## WINAVR is Obsolete
It is no longer recommended and may cause some problem.
@ -184,22 +184,15 @@ Pressing any key during sleep should wake host.
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
## Enabling JTAG
## Using PF4-7 Pins of USB AVR?
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
If you would like to keep JTAG enabled, just add the following to your `config.h`:
See this code.
```c
#define NO_JTAG_DISABLE
```
// JTAG disable for PORT F. write JTD bit twice within four cycles.
All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:
@ -119,7 +121,8 @@ The breathing effect is the same as in the hardware PWM implementation.
|`backlight_step()` |Cycle through backlight levels |
|`backlight_increase()` |Increase the backlight level |
|`backlight_decrease()` |Decrease the backlight level |
|`backlight_level(x)` |Sets the backlight level to specified level |
|`backlight_level(x)` |Sets the backlight level, from 0 to |
| |`BACKLIGHT_LEVELS` |
|`get_backlight_level()` |Return the current backlight level |
|`is_backlight_enabled()`|Return whether the backlight is currently on |
Additionally, we support bit mask functions which allow for more complex handling.
```c
voiddip_switch_update_mask_kb(uint32_tstate){
dip_switch_update_mask_user(state);
}
```
or `keymap.c`:
```c
voiddip_switch_update_mask_user(uint32_tstate){
if(state&(1UL<<0)&&state&(1UL<<1)){
layer_on(_ADJUST);// C on esc
}else{
layer_off(_ADJUST);
}
if(state&(1UL<<0)){
layer_on(_TEST_A);// A on ESC
}else{
layer_off(_TEST_A);
}
if(state&(1UL<<1)){
layer_on(_TEST_B);// B on esc
}else{
layer_off(_TEST_B);
}
}
```
## Hardware
One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.