Browse Source

Merge branch 'alico48' of https://github.com/marby3/qmk_firmware into alico48

pull/13051/head
marby3 2 years ago
parent
commit
871501f47c
10963 changed files with 255155 additions and 106454 deletions
  1. +2
    -1
      .github/workflows/api.yml
  2. +2
    -2
      .github/workflows/cli.yml
  3. +2
    -1
      .github/workflows/develop_api.yml
  4. +1
    -1
      .github/workflows/docs.yml
  5. +7
    -7
      .github/workflows/format.yaml
  6. +1
    -1
      .github/workflows/lint.yml
  7. +46
    -40
      .gitignore
  8. +0
    -38
      .travis.yml
  9. +4
    -0
      .vscode/settings.json
  10. +0
    -24
      CODE_OF_CONDUCT.md
  11. +2
    -3
      Dockerfile
  12. +20
    -26
      Makefile
  13. +3
    -3
      Vagrantfile
  14. +1
    -0
      bin/qmk
  15. +28
    -18
      bootloader.mk
  16. +0
    -14
      build_json.mk
  17. +43
    -13
      build_keyboard.mk
  18. +0
    -4
      build_layout.mk
  19. +13
    -2
      build_test.mk
  20. +3
    -0
      common.mk
  21. +111
    -60
      common_features.mk
  22. +54
    -4
      data/mappings/info_config.json
  23. +12
    -2
      data/mappings/info_rules.json
  24. +123
    -2
      data/mappings/keyboard_aliases.json
  25. +16
    -28
      data/schemas/api_keyboard.jsonschema
  26. +107
    -0
      data/schemas/definitions.jsonschema
  27. +243
    -208
      data/schemas/keyboard.jsonschema
  28. +24
    -0
      data/schemas/keymap.jsonschema
  29. +0
    -0
      data/templates/avr/config.h
  30. +27
    -0
      data/templates/avr/readme.md
  31. +21
    -0
      data/templates/avr/rules.mk
  32. +17
    -0
      data/templates/base/info.json
  33. +0
    -0
      data/templates/base/keyboard.c
  34. +0
    -0
      data/templates/base/keyboard.h
  35. +0
    -0
      data/templates/base/keymaps/default/keymap.c
  36. +0
    -0
      data/templates/base/keymaps/default/readme.md
  37. +0
    -0
      data/templates/ps2avrgb/config.h
  38. +28
    -0
      data/templates/ps2avrgb/readme.md
  39. +19
    -0
      data/templates/ps2avrgb/rules.mk
  40. +35
    -0
      docs/ChangeLog/20210529.md
  41. +557
    -0
      docs/ChangeLog/20210828.md
  42. +8
    -1
      docs/_summary.md
  43. +19
    -11
      docs/breaking_changes.md
  44. +1
    -0
      docs/breaking_changes_history.md
  45. +56
    -0
      docs/chibios_upgrade_instructions.md
  46. +38
    -15
      docs/cli_commands.md
  47. +2
    -2
      docs/cli_development.md
  48. +3
    -0
      docs/compatible_microcontrollers.md
  49. +52
    -5
      docs/config_options.md
  50. +61
    -0
      docs/configurator_architecture.md
  51. +1
    -0
      docs/configurator_diagram.drawio
  52. +3
    -0
      docs/configurator_diagram.svg
  53. +1
    -1
      docs/contributing.md
  54. +9
    -1
      docs/custom_quantum_functions.md
  55. +0
    -1
      docs/de/README.md
  56. +4
    -4
      docs/de/cli.md
  57. +54
    -33
      docs/driver_installation_zadig.md
  58. +31
    -0
      docs/easy_maker.md
  59. +3
    -0
      docs/eeprom_driver.md
  60. +0
    -1
      docs/es/README.md
  61. +20
    -18
      docs/es/hardware_avr.md
  62. +1
    -1
      docs/faq_debug.md
  63. +2
    -2
      docs/faq_keymap.md
  64. +21
    -18
      docs/feature_advanced_keycodes.md
  65. +30
    -114
      docs/feature_audio.md
  66. +14
    -129
      docs/feature_bootmagic.md
  67. +259
    -33
      docs/feature_combo.md
  68. +1
    -1
      docs/feature_command.md
  69. +2
    -19
      docs/feature_debounce_type.md
  70. +35
    -0
      docs/feature_digitizer.md
  71. +12
    -7
      docs/feature_dip_switch.md
  72. +6
    -0
      docs/feature_encoders.md
  73. +25
    -1
      docs/feature_haptic_feedback.md
  74. +2
    -3
      docs/feature_joystick.md
  75. +229
    -0
      docs/feature_key_overrides.md
  76. +2
    -0
      docs/feature_led_indicators.md
  77. +5
    -30
      docs/feature_led_matrix.md
  78. +260
    -0
      docs/feature_midi.md
  79. +36
    -18
      docs/feature_oled_driver.md
  80. +36
    -2
      docs/feature_ps2_mouse.md
  81. +179
    -47
      docs/feature_rgb_matrix.md
  82. +28
    -23
      docs/feature_rgblight.md
  83. +140
    -11
      docs/feature_split_keyboard.md
  84. +274
    -0
      docs/feature_st7565.md
  85. +15
    -0
      docs/feature_stenography.md
  86. +3
    -1
      docs/feature_tap_dance.md
  87. +1
    -1
      docs/feature_velocikey.md
  88. +2
    -0
      docs/feature_wpm.md
  89. +51
    -5
      docs/flashing.md
  90. +2
    -2
      docs/flashing_bootloadhid.md
  91. +3
    -4
      docs/fr-fr/README.md
  92. +0
    -1
      docs/fr-fr/breaking_changes.md
  93. +4
    -4
      docs/fr-fr/cli.md
  94. +1
    -1
      docs/fr-fr/contributing.md
  95. +2
    -2
      docs/fr-fr/driver_installation_zadig.md
  96. +1
    -1
      docs/fr-fr/faq_build.md
  97. +4
    -4
      docs/fr-fr/faq_debug.md
  98. +2
    -2
      docs/fr-fr/faq_keymap.md
  99. +30
    -30
      docs/fr-fr/flashing.md
  100. +3
    -3
      docs/fr-fr/newbs_flashing.md

+ 2
- 1
.github/workflows/api.yml View File

@ -7,11 +7,12 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
workflow_dispatch:
jobs:
api_data:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'


+ 2
- 2
.github/workflows/cli.yml View File

@ -16,7 +16,7 @@ jobs:
test:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
steps:
- uses: actions/checkout@v2
@ -25,4 +25,4 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Run tests
run: bin/qmk pytest
run: qmk pytest

+ 2
- 1
.github/workflows/develop_api.yml View File

@ -7,11 +7,12 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
workflow_dispatch:
jobs:
api_data:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
# protect against those who work in their fork on develop
if: github.repository == 'qmk/qmk_firmware'


+ 1
- 1
.github/workflows/docs.yml View File

@ -14,7 +14,7 @@ on:
jobs:
generate:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'


+ 7
- 7
.github/workflows/format.yaml View File

@ -16,7 +16,7 @@ jobs:
lint:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
steps:
- uses: rlespinasse/github-slug-action@v3.x
@ -31,12 +31,12 @@ jobs:
output: ' '
fileOutput: ' '
- name: Run qmk cformat and qmk pyformat
- name: Run qmk format-c and qmk format-python
shell: 'bash {0}'
run: |
qmk cformat --core-only -n $(< ~/files.txt)
cformat_exit=$?
qmk pyformat -n
pyformat_exit=$?
qmk format-c --core-only -n $(< ~/files.txt)
format_c_exit=$?
qmk format-python -n
format_python_exit=$?
exit $((cformat_exit + pyformat_exit))
exit $((format_c_exit + format_python_exit))

+ 1
- 1
.github/workflows/lint.yml View File

@ -9,7 +9,7 @@ jobs:
lint:
runs-on: ubuntu-latest
container: qmkfm/base_container
container: qmkfm/qmk_cli
steps:
- uses: actions/checkout@v2


+ 46
- 40
.gitignore View File

@ -1,36 +1,32 @@
.history/
.dep
*.o
*.bin
*.eep
# Junk files
*.bak
*.swp
*~
.DS_Store
# Build artifacts
.clang_complete
.build/
*.elf
*.hex
*.uf2
*.qmk
!util/bootloader.hex
!quantum/tools/eeprom_reset.hex
*.log
*.lss
*.lst
*.map
*.o
*.stackdump
*.sym
*.swp
tags
*~
# QMK-specific
api_data/v1
build/
.build/
*.bak
.vagrant/
quantum/version.h
.idea/
CMakeLists.txt
cmake-build-debug
.clang_complete
doxygen/
.DS_Store
/util/wsl_downloaded
/util/win_downloaded
quantum/version.h
*.bin
*.eep
*.hex
*.qmk
*.uf2
# Old-style QMK Makefiles
/keyboards/*/Makefile
/keyboards/*/*/Makefile
/keyboards/*/*/*/Makefile
@ -43,39 +39,49 @@ doxygen/
/keyboards/*/*/*/*/*/keymaps/Makefile
# Eclipse/PyCharm/Other IDE Settings
*.iml
.browse.VC.db*
.cproject
.idea
.idea/
.project
.settings/
.idea
*.iml
.browse.VC.db*
*.stackdump
.vagrant/
# ?
.dep
.history/
build/
cmake-build-debug
CMakeLists.txt
# Let these ones be user specific, since we have so many different configurations
*.code-workspace
.stfolder
.tags
.vscode/c_cpp_properties.json
.vscode/ipch/
.vscode/last.sql
.vscode/launch.json
.vscode/tasks.json
.vscode/last.sql
.vscode/temp.sql
.vscode/ipch/
.stfolder
.tags
tags
# ignore image files
*.png
# Ignore image files
*.gif
*.jpg
*.png
# things travis sees
secrets.tar
id_rsa_*
# Things Travis sees
/.vs
id_rsa_*
secrets.tar
# python things
# Python things
__pycache__
.python-version
# prerequisites for updating ChibiOS
# Prerequisites for updating ChibiOS
/util/fmpp*
# Allow to exist but don't include it in the repo


+ 0
- 38
.travis.yml View File

@ -1,38 +0,0 @@
os: linux
dist: trusty
group: edge
language: c
branches:
except:
- /^.*-automated-build$/
- /^[0-9]+\.[0-9]+\.[0-9]+/
env:
global:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
- MAKEFLAGS="-j3 --output-sync"
services:
- docker
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
packages:
- diffutils
- clang-format-7
- libstdc++-7-dev
script:
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
- git rev-parse --short HEAD
- git diff --name-only HEAD $TRAVIS_BRANCH
- bash util/travis_test.sh
- bash util/travis_build.sh
after_script:
bash util/travis_compiled_push.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/afce403d65f143dfac09
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always

+ 4
- 0
.vscode/settings.json View File

@ -22,5 +22,9 @@
"[markdown]": {
"editor.trimAutoWhitespace": false,
"files.trimTrailingWhitespace": false
},
"python.formatting.provider": "yapf",
"[json]": {
"editor.formatOnSave": false
}
}

+ 0
- 24
CODE_OF_CONDUCT.md View File

@ -1,24 +0,0 @@
# Code Of Conduct
QMK strives to be an inclusive, tolerant, and welcoming community. We encourage participation from anyone regardless of age, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, political belief, race, religion, or sexual identity and orientation.
> “A gentle word turns away wrath, but a harsh word stirs up anger."
Our users, contributors, and collaborators are expected to treat each other with kindness and respect, to assume good intentions, and to gently correct, where possible, rather than react with escalation. While our goal is to be as accurate as possible, kindness and understanding are more valuable than correctness. Some examples of behavior we will not tolerate include, but is not limited to:
* 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
# 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.

+ 2
- 3
Dockerfile View File

@ -1,7 +1,6 @@
FROM qmkfm/base_container
FROM qmkfm/qmk_cli
VOLUME /qmk_firmware
WORKDIR /qmk_firmware
COPY . .
CMD make all:default
CMD qmk compile -kb all -km default

+ 20
- 26
Makefile View File

@ -252,11 +252,20 @@ define PARSE_RULE
else
$$(info make: *** No rule to make target '$1'. Stop.)
$$(info |)
$$(info | QMK's make format recently changed to use folder locations and colons:)
$$(info | make project_folder:keymap[:target])
$$(info | Examples:)
$$(info | make dz60:default)
$$(info | make planck/rev6:default:flash)
$$(info | QMK's make format is:)
$$(info | make keyboard_folder:keymap_folder[:target])
$$(info |)
$$(info | Where `keyboard_folder` is the path to the keyboard relative to)
$$(info | `qmk_firmware/keyboards/`, and `keymap_folder` is the name of the)
$$(info | keymap folder under that board's `keymaps/` directory.)
$$(info |)
$$(info | Examples:)
$$(info | keyboards/dz60, keyboards/dz60/keymaps/default)
$$(info | -> make dz60:default)
$$(info | -> qmk compile -kb dz60 -km default)
$$(info | keyboards/planck/rev6, keyboards/planck/keymaps/default)
$$(info | -> make planck/rev6:default:flash)
$$(info | -> qmk flash -kb planck/rev6 -km default)
$$(info |)
endif
endef
@ -548,29 +557,14 @@ git-submodule:
git submodule sync --recursive
git submodule update --init --recursive --progress
ifdef SKIP_VERSION
SKIP_GIT := yes
endif
# Generate the version.h file
ifndef SKIP_GIT
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
else
GIT_VERSION := NA
CHIBIOS_VERSION := NA
CHIBIOS_CONTRIB_VERSION := NA
ifdef SKIP_GIT
VERSION_H_FLAGS := --skip-git
endif
ifndef SKIP_VERSION
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
else
BUILD_DATE := 2020-01-01-00:00:00
ifdef SKIP_VERSION
VERSION_H_FLAGS := --skip-all
SKIP_GIT := yes
endif
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h)
include $(ROOT_DIR)/testlist.mk

+ 3
- 3
Vagrantfile View File

@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
config.vm.box = "generic/debian9"
config.vm.box = "generic/debian10"
config.vm.synced_folder '.', '/vagrant'
@ -68,13 +68,13 @@ Vagrant.configure(2) do |config|
["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type|
config.vm.provider type do |virt, override|
override.vm.provision "docker" do |d|
d.run "qmkfm/base_container",
d.run "qmkfm/qmk_cli",
cmd: "tail -f /dev/null",
args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'"
end
override.vm.provision "shell", inline: <<-SHELL
echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc
echo 'docker restart qmkfm-qmk_cli && exec docker exec -it qmkfm-qmk_cli /bin/bash -l' >> ~vagrant/.bashrc
SHELL
end
end


+ 1
- 0
bin/qmk View File

@ -35,6 +35,7 @@ def main():
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
# Import the subcommands
import milc.subcommand.config # noqa
import qmk.cli # noqa
# Execute


+ 28
- 18
bootloader.mk View File

@ -21,18 +21,19 @@
# Current options:
#
# AVR:
# halfkay PJRC Teensy
# caterina Pro Micro (Sparkfun/generic)
# atmel-dfu Atmel factory DFU
# lufa-dfu LUFA DFU
# qmk-dfu QMK DFU (LUFA + blinkenlight)
# bootloadHID HIDBootFlash compatible (ATmega32A)
# USBasp USBaspLoader (ATmega328P)
# halfkay PJRC Teensy
# caterina Pro Micro (Sparkfun/generic)
# atmel-dfu Atmel factory DFU
# lufa-dfu LUFA DFU
# qmk-dfu QMK DFU (LUFA + blinkenlight)
# qmk-hid QMK HID (LUFA + blinkenlight)
# bootloadhid HIDBootFlash compatible (ATmega32A)
# usbasploader USBaspLoader (ATmega328P)
# ARM:
# kiibohd Input:Club Kiibohd bootloader (only used on their boards)
# stm32duino STM32Duino (STM32F103x8)
# stm32-dfu STM32 USB DFU in ROM
# apm32-dfu APM32 USB DFU in ROM
# kiibohd Input:Club Kiibohd bootloader (only used on their boards)
# stm32duino STM32Duino (STM32F103x8)
# stm32-dfu STM32 USB DFU in ROM
# apm32-dfu APM32 USB DFU in ROM
#
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
# you add any possible configuration to this list
@ -67,6 +68,11 @@ ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
BOOTLOADER_SIZE = 8192
endif
endif
ifeq ($(strip $(BOOTLOADER)), qmk-hid)
OPT_DEFS += -DBOOTLOADER_QMK_HID
OPT_DEFS += -DBOOTLOADER_HID
BOOTLOADER_SIZE = 4096
endif
ifeq ($(strip $(BOOTLOADER)), halfkay)
OPT_DEFS += -DBOOTLOADER_HALFKAY
ifeq ($(strip $(MCU)), atmega32u4)
@ -80,22 +86,26 @@ ifeq ($(strip $(BOOTLOADER)), caterina)
OPT_DEFS += -DBOOTLOADER_CATERINA
BOOTLOADER_SIZE = 4096
endif
ifeq ($(strip $(BOOTLOADER)), bootloadHID)
ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID))
OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
BOOTLOADER_SIZE = 4096
endif
ifeq ($(strip $(BOOTLOADER)), USBasp)
ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp))
OPT_DEFS += -DBOOTLOADER_USBASP
BOOTLOADER_SIZE = 4096
endif
ifeq ($(strip $(BOOTLOADER)), lufa-ms)
OPT_DEFS += -DBOOTLOADER_MS
BOOTLOADER_SIZE = 6144
BOOTLOADER_SIZE ?= 8192
FIRMWARE_FORMAT = bin
$(info LUFA MASS STORAGE Bootloader selected)
$(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!)
$(info It is extremely prone to bricking, and is only included to support existing boards.)
$(info )
cpfirmware: lufa_warning
.INTERMEDIATE: lufa_warning
lufa_warning: $(FIRMWARE_FORMAT)
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
$(info LUFA MASS STORAGE Bootloader selected)
$(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!)
$(info It is extremely prone to bricking, and is only included to support existing boards.)
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
endif
ifdef BOOTLOADER_SIZE
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))


+ 0
- 14
build_json.mk View File

@ -1,31 +1,17 @@
# Look for a json keymap file
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
endif
# Load the keymap-level rules.mk if exists
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
-include $(KEYMAP_PATH)/rules.mk
endif
# Generate the keymap.c
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)

+ 43
- 13
build_keyboard.mk View File

@ -23,6 +23,15 @@ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
# Force expansion
TARGET := $(TARGET)
ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif
# Object files and generated keymap directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
# For split boards we need to set a master half.
MASTER ?= left
ifdef master
@ -100,7 +109,7 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
# Pull in rules from info.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
include $(INFO_RULES_MK)
# Check for keymap.json first, so we can regenerate keymap.c
@ -137,16 +146,35 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "")
endif
endif
# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h
# Load the keymap-level rules.mk if exists
-include $(KEYMAP_PATH)/rules.mk
# Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk)
include $(INFO_RULES_MK)
# Add rules to generate the keymap files - indentation here is important
$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)
generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
endif
ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
endif
ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk
endif
include quantum/mcu_selection.mk
@ -232,6 +260,7 @@ ifdef MCU_FAMILY
PLATFORM=CHIBIOS
PLATFORM_KEY=chibios
FIRMWARE_FORMAT?=bin
OPT_DEFS += -DMCU_$(MCU_FAMILY)
else ifdef ARM_ATSAM
PLATFORM=ARM_ATSAM
PLATFORM_KEY=arm_atsam
@ -327,19 +356,19 @@ endif
# Disable features that a keyboard doesn't support
-include disable_features.mk
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H += $(KEYMAP_PATH)/config.h
endif
ifneq ("$(KEYMAP_H)","")
CONFIG_H += $(KEYMAP_H)
endif
# project specific files
SRC += $(KEYBOARD_SRC) \
SRC += \
$(KEYBOARD_SRC) \
$(KEYMAP_C) \
$(QUANTUM_SRC)
$(QUANTUM_SRC) \
$(QUANTUM_DIR)/main.c \
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
@ -374,6 +403,7 @@ ifneq ($(strip $(PROTOCOL)),)
else
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
endif
-include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk
# TODO: remove this bodge?
PROJECT_DEFS := $(OPT_DEFS)


+ 0
- 4
build_layout.mk View File

@ -7,7 +7,6 @@ define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
@ -31,6 +30,3 @@ ifneq ($(FORCE_LAYOUT),)
endif
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)

+ 13
- 2
build_test.mk View File

@ -24,7 +24,6 @@ GTEST_INTERNAL_INC :=\
$(GTEST_OUTPUT)_SRC :=\
googletest/src/gtest-all.cc\
googletest/src/gtest_main.cc\
googlemock/src/gmock-all.cc
$(GTEST_OUTPUT)_DEFS :=
@ -35,7 +34,8 @@ CREATE_MAP := no
VPATH +=\
$(LIB_PATH)/googletest\
$(LIB_PATH)/googlemock
$(LIB_PATH)/googlemock\
$(LIB_PATH)/printf
all: elf
@ -43,18 +43,29 @@ VPATH += $(COMMON_VPATH)
PLATFORM:=TEST
PLATFORM_KEY:=test
ifeq ($(strip $(DEBUG)), 1)
CONSOLE_ENABLE = yes
endif
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include tests/$(TEST)/rules.mk
endif
include common_features.mk
include $(TMK_PATH)/common.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
include $(TMK_PATH)/common/test/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include build_full_test.mk
endif
$(TEST)_SRC += \
tests/test_common/main.c \
$(LIB_PATH)/printf/printf.c \
$(QUANTUM_PATH)/logging/print.c
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)


+ 3
- 0
common.mk View File

@ -12,6 +12,9 @@ QUANTUM_PATH = $(QUANTUM_DIR)
DRIVER_DIR = drivers
DRIVER_PATH = $(DRIVER_DIR)
PLATFORM_DIR = platforms
PLATFORM_PATH = $(PLATFORM_DIR)
BUILD_DIR := .build
COMMON_VPATH := $(TOP_DIR)


+ 111
- 60
common_features.mk View File

@ -20,8 +20,23 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/send_string.c \
$(QUANTUM_DIR)/bitwise.c \
$(QUANTUM_DIR)/led.c \
$(QUANTUM_DIR)/action.c \
$(QUANTUM_DIR)/action_layer.c \
$(QUANTUM_DIR)/action_macro.c \
$(QUANTUM_DIR)/action_tapping.c \
$(QUANTUM_DIR)/action_util.c \
$(QUANTUM_DIR)/eeconfig.c \
$(QUANTUM_DIR)/keyboard.c \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c
$(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/logging/debug.c \
$(QUANTUM_DIR)/logging/sendchar.c \
VPATH += $(QUANTUM_DIR)/logging
# Fall back to lib/printf if there is no platform provided print
ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","")
include $(QUANTUM_PATH)/logging/print.mk
endif
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
@ -102,13 +117,13 @@ endif
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
OPT_DEFS += -DMOUSEKEY_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/mousekey.c
endif
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/pointing_device.c
endif
@ -170,6 +185,7 @@ else
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom
SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
else
# This will effectively work the same as "transient" if not supported by the chip
@ -196,10 +212,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
$(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
else
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
COMMON_VPATH += $(QUANTUM_DIR)/rgblight
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
@ -230,21 +247,25 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731-simple.c
QUANTUM_LIB_SRC += i2c_master.c
endif
endif
RGB_MATRIX_ENABLE ?= no
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
@ -255,36 +276,47 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
COMMON_VPATH += $(DRIVER_PATH)/led
SRC += aw20216.c
QUANTUM_LIB_SRC += spi_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3737.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3741.c
QUANTUM_LIB_SRC += i2c_master.c
endif
@ -342,11 +374,6 @@ ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE := yes
endif
# backward compat
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
BACKLIGHT_DRIVER := custom
endif
VALID_BACKLIGHT_TYPES := pwm timer software custom
BACKLIGHT_ENABLE ?= no
@ -406,7 +433,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
endif
ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
COMMON_VPATH += $(DRIVER_PATH)/apa102
COMMON_VPATH += $(DRIVER_PATH)/led
SRC += apa102.c
endif
@ -462,18 +489,15 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/dip_switch.c
endif
VALID_MAGIC_TYPES := yes full lite
VALID_MAGIC_TYPES := yes lite
BOOTMAGIC_ENABLE ?= no
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
$(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
endif
ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
OPT_DEFS += -DBOOTMAGIC_LITE
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
else
OPT_DEFS += -DBOOTMAGIC_ENABLE
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
endif
endif
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
@ -494,42 +518,31 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
# if 'lite' then skip the actual matrix implementation
ifneq ($(strip $(CUSTOM_MATRIX)), lite)
# Include the standard or split matrix code if needed
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
else
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
endif
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
endif
endif
# Support for translating old names to new names:
ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g)
DEBOUNCE_TYPE:=sym_defer_g
else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk)
DEBOUNCE_TYPE:=sym_eager_pk
else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk)
DEBOUNCE_TYPE:=sym_defer_pk
else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr)
DEBOUNCE_TYPE:=sym_eager_pr
endif
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
DEBOUNCE_TYPE?= sym_defer_g
DEBOUNCE_TYPE ?= sym_defer_g
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c
endif
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
OPT_DEFS += -DSPLIT_KEYBOARD
CRC_ENABLE := yes
# Include files used by all split keyboards
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
$(QUANTUM_DIR)/split_common/transactions.c
OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
ifeq ($(PLATFORM),AVR)
@ -550,11 +563,17 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
ifeq ($(strip $(CRC_ENABLE)), yes)
OPT_DEFS += -DCRC_ENABLE
SRC += crc.c
endif
HAPTIC_ENABLE ?= no
ifneq ($(strip $(HAPTIC_ENABLE)),no)
COMMON_VPATH += $(DRIVER_PATH)/haptic
SRC += haptic.c
OPT_DEFS += -DHAPTIC_ENABLE
SRC += $(QUANTUM_DIR)/haptic.c
SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c
endif
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
@ -569,15 +588,33 @@ ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
endif
ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += drivers/avr/hd44780.c
SRC += platforms/avr/drivers/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
OPT_DEFS += -DOLED_DRIVER_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled
QUANTUM_LIB_SRC += i2c_master.c
SRC += oled_driver.c
VALID_OLED_DRIVER_TYPES := SSD1306 custom
OLED_DRIVER ?= SSD1306
ifeq ($(strip $(OLED_ENABLE)), yes)
ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),)
$(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver)
else
OPT_DEFS += -DOLED_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled
OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifeq ($(strip $(OLED_DRIVER)), SSD1306)
SRC += ssd1306_sh1106.c
QUANTUM_LIB_SRC += i2c_master.c
endif
endif
endif
ifeq ($(strip $(ST7565_ENABLE)), yes)
OPT_DEFS += -DST7565_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
COMMON_VPATH += $(DRIVER_PATH)/lcd
QUANTUM_LIB_SRC += spi_master.c
SRC += st7565.c
endif
include $(DRIVER_PATH)/qwiic/qwiic.mk
@ -632,6 +669,11 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
OPT_DEFS += -DCOMBO_ENABLE
endif
ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c
OPT_DEFS += -DKEY_OVERRIDE_ENABLE
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
OPT_DEFS += -DTAP_DANCE_ENABLE
@ -656,19 +698,28 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
endif
JOYSTICK_ENABLE ?= no
ifneq ($(strip $(JOYSTICK_ENABLE)), no)
VALID_JOYSTICK_TYPES := analog digital
JOYSTICK_DRIVER ?= analog
ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
ifeq ($(filter $(JOYSTICK_DRIVER),$(VALID_JOYSTICK_TYPES)),)
$(error "$(JOYSTICK_DRIVER)" is not a valid joystick driver)
endif
OPT_DEFS += -DJOYSTICK_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
SRC += $(QUANTUM_DIR)/joystick.c
endif
ifeq ($(strip $(JOYSTICK_ENABLE)), analog)
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
SRC += analog.c
ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
SRC += analog.c
endif
ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif
endif
ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
DIGITIZER_ENABLE ?= no
ifneq ($(strip $(DIGITIZER_ENABLE)), no)
SRC += $(QUANTUM_DIR)/digitizer.c
endif
USBPD_ENABLE ?= no


+ 54
- 4
data/mappings/info_config.json View File

@ -1,21 +1,48 @@
# This file maps keys between `config.h` and `info.json`. It is used by QMK
# This file maps keys between `config.h` and `info.json`. It is used by QMK
# to correctly and consistently map back and forth between the two systems.
{
# Format:
# <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
# value_type: one of "array", "array.int", "int", "hex", "list", "mapping"
# value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from config.h
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"}
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
"BACKLIGHT_PIN": {"info_key": "backlight.pin"},
"COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
"DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false},
"DIODE_DIRECTION": {"info_key": "diode_direction"},
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
"DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"},
"DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"},
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "tapping.ignore_mod_tap_interrupt", "value_type": "bool"},
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"},
"LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"},
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"},
"LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"},
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
"LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"},
"MANUFACTURER": {"info_key": "manufacturer"},
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"},
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
"MOUSEKEY_INTERVAL": {"info_key": "mousekey.interval", "value_type": "int"},
"MOUSEKEY_MAX_SPEED": {"info_key": "mousekey.max_speed", "value_type": "int"},
"MOUSEKEY_TIME_TO_MAX": {"info_key": "mousekey.time_to_max", "value_type": "int"},
"MOUSEKEY_WHEEL_DELAY": {"info_key": "mousekey.wheel_delay", "value_type": "int"},
"ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"},
"ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"},
"PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"},
"PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"},
"RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"},
"RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"},
"RGB_DI_PIN": {"info_key": "rgblight.pin"},
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
@ -30,17 +57,40 @@
"RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"},
"RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"},
"RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"},
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"},
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
"RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"},
"RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"},
"RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"},
"RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"},
"RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"},
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
"RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"},
"PRODUCT": {"info_key": "keyboard_folder", "to_json": false},
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"},
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"},
"QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"},
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"},
"QMK_LED": {"info_key": "qmk_lufa_bootloader.led"},
"QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}
"QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"},
"SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"},
"SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"},
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"},
"SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"},
"SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"},
"SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
"TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"},
"TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"},
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool"},
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool"},
"TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"},
"TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "bool"},
"TAPPING_TOGGLE": {"info_key": "tapping.toggle", "value_type": "int"},
"USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"},
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"},
"USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},
}

+ 12
- 2
data/mappings/info_rules.json View File

@ -1,15 +1,25 @@
# This file maps keys between `rules.mk` and `info.json`. It is used by QMK
# This file maps keys between `rules.mk` and `info.json`. It is used by QMK
# to correctly and consistently map back and forth between the two systems.
{
# Format:
# <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
# value_type: one of "array", "array.int", "int", "list", "hex", "mapping"
# value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
"BOARD": {"info_key": "board"},
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BLUETOOTH": {"info_key": "bluetooth.driver"},
"FIRMWARE_FORMAT": {"info_key": "build.firmware_format"},
"KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"},
"MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"},
"LAYOUTS": {"info_key": "community_layouts", "value_type": "list"},
"LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"},
"LTO_ENABLE": {"info_key": "build.lto", "value_type": "bool"},
"MCU": {"info_key": "processor", "warn_duplicate": false},
"MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"},
"NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "value_type": "str", "to_c": false},
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}
}

+ 123
- 2
data/mappings/keyboard_aliases.json View File

@ -11,6 +11,9 @@
'2_milk': {
target: 'spaceman/2_milk'
},
'aeboards/constellation': {
target: 'aeboards/constellation/rev1'
},
'aeboards/ext65': {
target: 'aeboards/ext65/rev1'
},
@ -38,9 +41,36 @@
'atom47/rev3': {
target: 'maartenwut/atom47/rev3'
},
bakeneko65: {
target: 'bakeneko65/rev2'
},
bear_face: {
target: 'bear_face/v1'
},
bm16a: {
target: 'kprepublic/bm16a'
},
bm16s: {
target: 'kprepublic/bm16s'
},
bm40hsrgb: {
target: 'kprepublic/bm40hsrgb'
},
bm43a: {
target: 'kprepublic/bm43a'
},
bm60poker: {
target: 'kprepublic/bm60poker'
},
bm60rgb: {
target: 'kprepublic/bm60rgb'
},
bm60rgb_iso: {
target: 'kprepublic/bm60rgb_iso'
},
bm68rgb: {
target: 'kprepublic/bm68rgb'
},
'bpiphany/pegasushoof': {
target: 'bpiphany/pegasushoof/2013'
},
@ -56,11 +86,26 @@
canoe: {
target: 'percent/canoe'
},
'clawsome/gamebuddy': {
target: 'clawsome/gamebuddy/v1_0'
},
'cmm_studio/saka68': {
target: 'cmm_studio/saka68/solder'
},
'crkbd/rev1': {
target: 'crkbd/rev1/legacy'
'cospad': {
target: 'kprepublic/cospad'
},
'crkbd/rev1/legacy': {
target: 'crkbd/rev1'
},
'crkbd/rev1/common': {
target: 'crkbd/rev1'
},
'custommk/genesis': {
target: 'custommk/genesis/rev1'
},
'daisy': {
target: 'ktec/daisy'
},
'doro67/multi': {
layouts: {
@ -80,6 +125,9 @@
drakon: {
target: 'jagdpietr/drakon'
},
'durgod/k320': {
target: 'durgod/k3x0/k320'
},
'dztech/dz60rgb': {
target: 'dztech/dz60rgb/v1'
},
@ -92,9 +140,15 @@
'dztech/dz65rgb': {
target: 'dztech/dz65rgb/v1'
},
'dztech/volcano660': {
target: 'ilumkb/volcano660'
},
eek: {
target: 'eek/silk_down'
},
'ergodone': {
target: 'ktec/ergodone'
},
ergoinu: {
target: 'dm9records/ergoinu'
},
@ -104,9 +158,15 @@
gh60: {
target: 'gh60/revc'
},
'gmmk/pro': {
target: 'gmmk/pro/ansi'
},
'handwired/ferris': {
target: 'ferris/0_1'
},
'handwired/p1800fl': {
target: 'team0110/p1800fl'
},
'helix/pico/sc/back': {
target: 'helix/pico/sc'
},
@ -155,6 +215,15 @@
LAYOUT: 'LAYOUT_all'
}
},
'jj40': {
target: 'kprepublic/jj40'
},
'jj4x4': {
target: 'kprepublic/jj4x4'
},
'jj50': {
target: 'kprepublic/jj50'
},
jones: {
target: 'jones/v03_1'
},
@ -179,6 +248,12 @@
kudox: {
target: 'kudox/rev1'
},
'kyria': {
target: 'splitkb/kyria'
},
'lazydesigners/the60': {
target: 'lazydesigners/the60/rev1'
},
'lfkeyboards/lfk78': {
target: 'lfkeyboards/lfk78/revj'
},
@ -248,6 +323,9 @@
'maartenwut/wonderland': {
target: 'evyd13/wonderland'
},
'matrix/m12og': {
target: 'matrix/m12og/rev1'
},
'mechlovin/hannah910': {
target: 'mechlovin/hannah910/rev1'
},
@ -263,6 +341,9 @@
'mechlovin/hannah60rgb': {
target: 'mechlovin/hannah60rgb/rev1'
},
'mechlovin/hannah65/mechlovin9': {
target: 'mechlovin/mechlovin9/rev1'
},
'melgeek/z70ultra': {
target: 'melgeek/z70ultra/rev1'
},
@ -301,6 +382,9 @@
'pancake/promicro': {
target: 'spaceman/pancake/promicro'
},
'peiorisboards/ixora': {
target: 'coarse/ixora'
},
'percent/canoe': {
layouts: {
LAYOUT_iso: 'LAYOUT_65_iso_blocker'
@ -363,6 +447,9 @@
'ramonimbao/herringbone': {
target: 'ramonimbao/herringbone/v1'
},
'ramonimbao/mona': {
target: 'ramonimbao/mona/v1'
},
'rgbkb/pan': {
target: 'rgbkb/pan/rev1/32a'
},
@ -384,6 +471,9 @@
speedo: {
target: 'cozykeys/speedo/v2'
},
'staryu': {
target: 'ktec/staryu'
},
stoutgat: {
target: 'tkw/stoutgat/v1'
},
@ -402,10 +492,14 @@
'tkw/stoutgat/v2': {
target: 'tkw/stoutgat/v2/f411'
},
'tokyo60': {
target: 'tokyokeyboard/tokyo60'
},
underscore33: {
target: 'underscore33/rev1'
},
vinta: {
target: 'coarse/vinta',
layouts: {
LAYOUT_67_ansi: 'LAYOUT_65_ansi_blocker'
}
@ -419,6 +513,33 @@
'whale/sk': {
target: 'whale/sk/v3'
},
'xd002': {
target: 'xiudi/xd002'
},
'xd004': {
target: 'xiudi/xd004'
},
'xd60': {
target: 'xiudi/xd60'
},
'xd68': {
target: 'xiudi/xd68'
},
'xd75': {
target: 'xiudi/xd75'
},
'xd84': {
target: 'xiudi/xd84'
},
'xd84pro': {
target: 'xiudi/xd84pro'
},
'xd87': {
target: 'xiudi/xd87'
},
'xd96': {
target: 'xiudi/xd96'
},
'xelus/dawn60': {
target: 'xelus/dawn60/rev1'
},


+ 16
- 28
data/schemas/api_keyboard.jsonschema View File

@ -1,34 +1,22 @@
{
"$id": "qmk.api.keyboard.v1",
"allOf": [
{ "$ref": "qmk.keyboard.v1" },
{"$ref": "qmk.keyboard.v1"},
{
"$id": "qmk.api.keyboard.v1",
"keymaps": {
"type": "string"
},
"parse_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"parse_warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"processor_type": {
"type": "string"
},
"protocol": {
"type": "string"
},
"keyboard_folder": {
"type": "string"
},
"platform": {
"type": "string"
"properties": {
"keymaps": {
"type": "object",
"properties": {
"url": {"type": "string"}
}
},
"parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
"parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
"processor_type": {"type": "string"},
"protocol": {"type": "string"},
"keyboard_folder": {"type": "string"},
"platform": {"type": "string"}
}
}
]


+ 107
- 0
data/schemas/definitions.jsonschema View File

@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "qmk.definitions.v1",
"title": "Common definitions used across QMK's jsonschemas.",
"type": "object",
"boolean_array": {
"type": "object",
"additionalProperties": {"type": "boolean"}
},
"filename": {
"type": "string",
"minLength": 1,
"pattern": "^[0-9a-z_]*$"
},
"hex_number_2d": {
"type": "string",
"pattern": "^0x[0-9A-F]{2}$"
},
"hex_number_4d": {
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
"text_identifier": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"layout_macro": {
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
},
{
"type": "string",
"pattern": "^LAYOUT_[0-9a-z_]*$"
}
]
},
"key_unit": {
"type": "number",
"min": 0.25
},
"mcu_pin_array": {
"type": "array",
"items": {"$ref": "#/mcu_pin"}
},
"mcu_pin": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "string",
"pattern": "^LINE_PIN\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
},
"signed_decimal": {
"type": "number"
},
"signed_int": {
"type": "number",
"multipleOf": 1
}
"signed_int_8": {
"type": "number",
"min": -127,
"max": 127,
"multipleOf": 1
}
"string_array": {
"type": "array",
"items": {
"type": "string"
}
},
"string_object": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"unsigned_decimal": {
"type": "number",
"min": 0
},
"unsigned_int": {
"type": "number",
"min": 0,
"multipleOf": 1
}
"unsigned_int_8": {
"type": "number",
"min": 0,
"max": 255,
"multipleOf": 1
}
}

+ 243
- 208
data/schemas/keyboard.jsonschema View File

@ -1,31 +1,53 @@
{
"$schema": "http://json-schema.org/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "qmk.keyboard.v1",
"title": "Keyboard Information",
"type": "object",
"properties": {
"keyboard_name": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"maintainer": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"manufacturer": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"url": {
"type": "string",
"format": "uri"
},
"processor": {
"type": "string",
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"audio": {
"type": "object",
"additionalProperties": false,
"properties": {
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"voices": {"type": "boolean"}
}
},
"backlight": {
"type": "object",
"additionalProperties": false,
"properties": {
"breathing": {"type": "boolean"},
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"levels": {
"type": "number",
"min": 1,
"max": 31,
"multipleOf": 1
},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
},
"bluetooth": {
"type": "object",
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": ["AdafruitBLE", "RN42"]
},
"lto": {"type": "boolean"},
}
},
"board": {
"type": "string",
@ -34,68 +56,55 @@
},
"bootloader": {
"type": "string",
"enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"]
"enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "unknown", "usbasploader", "USBasp", "tinyuf2"],
},
"diode_direction": {
"bootloader_instructions": {
"type": "string",
"enum": ["COL2ROW", "ROW2COL"]
"description": "Instructions for putting the keyboard into a mode that allows for firmware flashing."
},
"debounce": {
"type": "number",
"min": 0,
"multipleOf": 1
"build": {
"type": "object",
"additionalProperties": false,
"properties": {
"debounce_type": {
"type": "string",
"enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_eager_pk"]
},
"firmware_format": {
"type": "string",
"enum": ["bin", "hex", "uf2"]
},
"lto": {"type": "boolean"},
}
},
"height": {
"type": "number",
"min": 0.25
"diode_direction": {
"type": "string",
"enum": ["COL2ROW", "ROW2COL"]
},
"width": {
"type": "number",
"min": 0.25
"debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"combo": {
"type": "object",
"properties": {
"count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"term": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
},
"community_layouts": {
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"pattern": "^[0-9a-z_]*$"
}
},
"features": {
"type": "object",
"additionalProperties": {"type": "boolean"}
"items": {"$ref": "qmk.definitions.v1#/filename"}
},
"features": {"$ref": "qmk.definitions.v1#/boolean_array"},
"indicators": {
"type": "object",
"properties": {
"caps_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"num_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"scroll_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
}
"caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
},
"layout_aliases": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
},
{
"type": "string",
"pattern": "^LAYOUT_[0-9a-z_]*$"
}
]
}
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
},
"layouts": {
"type": "object",
@ -109,11 +118,6 @@
"c_macro": {
"type": "boolean"
},
"key_count": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"layout": {
"type": "array",
"items": {
@ -131,101 +135,60 @@
"multipleOf": 1
}
},
"h": {
"type": "number",
"min": 0.25
},
"r": {
"type": "number",
"min": 0
},
"rx": {
"type": "number",
"min": 0
},
"ry": {
"type": "number",
"min": 0
},
"w": {
"type": "number",
"min": 0.25
},
"x": {
"type": "number",
"min": 0
},
"y": {
"type": "number",
"min": 0
}
"r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
"y": {"$ref": "qmk.definitions.v1#/key_unit"}
}
}
}
}
}
},
"leader_key": {
"type": "object",
"properties": {
"timing": {"type": "boolean"},
"strict_processing": {"type": "boolean"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
},
"matrix_pins": {
"type": "object",
"additionalProperties": false,
"properties": {
"custom": {"type": "boolean"},
"custom_lite": {"type": "boolean"},
"ghost": {"type": "boolean"},
"io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"direct": {
"type": "array",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
}
},
"cols": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
"items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
},
"rows": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
}
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
}
},
"mouse_key": {
"type": "object",
"properties": {
"enabled": {"type": "boolean"},
"delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
"interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
"max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
"time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
"wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
}
},
"oneshot": {
"type": "object",
"properties": {
"tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
},
"rgblight": {
@ -238,88 +201,160 @@
"type": "boolean"
}
},
"brightness_steps": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"hue_steps": {
"type": "number",
"min": 0,
"multipleOf": 1
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"layers": {
"type": "object",
"additionalProperties": false,
"properties": {
"blink": {"type": "boolean"},
"enabled": {"type": "boolean"},
"max": {
"type": "number",
"min": 1,
"max": 32,
"multipleOf": 1
},
"override_rgb": {"type": "boolean"}
}
},
"led_count": {
"type": "number",
"min": 0,
"multipleOf": 1
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"rgbw": {"type": "boolean"},
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sleep": {"type": "boolean"},
"split": {"type": "boolean"},
"split_count": {
"type": "array",
"minLength": 2,
"maxLength": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
}
},
"split": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {"type": "boolean"},
"matrix_grid": {
"type": "array",
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"}
},
"max_brightness": {
"type": "number",
"min": 0,
"max": 255,
"multipleOf": 1
"matrix_pins": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "object",
"additionalProperties": false,
"properties": {
"direct": {
"type": "array",
"items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
},
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
}
}
}
},
"pin": {
"main": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
"enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
},
"saturation_steps": {
"soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"soft_serial_speed": {
"type": "number",
"min": 0,
"max": 5,
"multipleOf": 1
},
"sleep": {"type": "boolean"},
"split": {"type": "boolean"},
"split_count": {
"type": "array",
"minLength": 2,
"maxLength": 2,
"items": {
"type": "number",
"min": 0,
"multipleOf": 1
"transport": {
"type": "object",
"additionalProperties": false,
"properties": {
"protocol": {
"type": "string",
"enum": ["custom", "i2c", "serial", "serial_usart"]
},
"sync_matrix_state": {"type": "boolean"},
"sync_modifiers": {"type": "boolean"}
}
},
"usb_detect": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {"type": "boolean"},
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
}
}
},
"tags": {
"type": "array",
"items": {"type": "string"}
},
"tapping": {
"type": "object",
"properties": {
"force_hold": {"type": "boolean"},
"force_hold_per_key": {"type": "boolean"},
"ignore_mod_tap_interrupt": {"type": "boolean"},
"ignore_mod_tap_interrupt_per_key": {"type": "boolean"},
"permissive_hold": {"type": "boolean"},
"permissive_hold_per_key": {"type": "boolean"},
"retro": {"type": "boolean"},
"retro_per_key": {"type": "boolean"},
"term": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"term_per_key": {"type": "boolean"},
"toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"},
}
},
"usb": {
"type": "object",
"additionalProperties": false,
"properties": {
"device_ver": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
},
"pid": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
"device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"force_nkro": {"type": "boolean"},
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"no_startup_check": {"type": "boolean"},
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"shared_endpoint": {
"type": "object",
"additionalProperties": false,
"properties": {
"keyboard": {"type": "boolean"},
"mouse": {"type": "boolean"}
}
},
"vid": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
}
"suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"wait_for": {"type": "boolean"},
}
},
"qmk": {
"type": "object",
"additionalProperties": false,
"properties": {
"keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
}
},
"qmk_lufa_bootloader": {
"type": "object",
"additionalProperties": false,
"properties": {
"esc_output": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"esc_input": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"led": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"speaker": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
}
"esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
}
}


+ 24
- 0
data/schemas/keymap.jsonschema View File

@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "qmk.keymap.v1",
"title": "Keymap Information",
"type": "object",
"properties": {
"author": {"type": "string"},
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
"layers": {
"type": "array",
"items": {
"type": "array",
"items": {"type": "string"}
}
},
"config": {"$ref": "qmk.keyboard.v1"},
"notes": {
"type": "string",
"description": "asdf"
}
}
}

quantum/template/avr/config.h → data/templates/avr/config.h View File


+ 27
- 0
data/templates/avr/readme.md View File

@ -0,0 +1,27 @@
# %KEYBOARD%
![%KEYBOARD%](imgur.com image replace me!)
*A short description of the keyboard/project*
* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername)
* Hardware Supported: *The PCBs, controllers supported*
* Hardware Availability: *Links to where you can find this hardware*
Make example for this keyboard (after setting up your build environment):
make %KEYBOARD%:default
Flashing example for this keyboard:
make %KEYBOARD%:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

+ 21
- 0
data/templates/avr/rules.mk View File

@ -0,0 +1,21 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

+ 17
- 0
data/templates/base/info.json View File

@ -0,0 +1,17 @@
{
"keyboard_name": "%KEYBOARD%",
"url": "",
"maintainer": "%YOUR_NAME%",
"layouts": {
"LAYOUT": {
"layout": [
{"label": "k00", "x": 0, "y": 0},
{"label": "k01", "x": 1, "y": 0},
{"label": "k02", "x": 2, "y": 0},
{"label": "k10", "x": 0, "y": 1, "w": 1.5},
{"label": "k12", "x": 1.5, "y": 1, "w": 1.5}
]
}
}
}

quantum/template/base/keyboard.c → data/templates/base/keyboard.c View File


quantum/template/base/keyboard.h → data/templates/base/keyboard.h View File


quantum/template/base/keymaps/default/keymap.c → data/templates/base/keymaps/default/keymap.c View File


quantum/template/base/keymaps/default/readme.md → data/templates/base/keymaps/default/readme.md View File


quantum/template/ps2avrgb/config.h → data/templates/ps2avrgb/config.h View File


+ 28
- 0
data/templates/ps2avrgb/readme.md View File

@ -0,0 +1,28 @@
# %KEYBOARD%
![%KEYBOARD%](imgur.com image replace me!)
*A short description of the keyboard/project*
* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername)
* Hardware Supported: *The PCBs, controllers supported*
* Hardware Availability: *Links to where you can find this hardware*
Make example for this keyboard (after setting up your build environment):
make %KEYBOARD%:default
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
make %KEYBOARD%:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **BootloadHID reset**: Hold down the key connected to the `A0` and `B0` pins on the MCU if it is known (often top left or bottom left) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

+ 19
- 0
data/templates/ps2avrgb/rules.mk View File

@ -0,0 +1,19 @@
# MCU name
MCU = atmega32a
# Bootloader selection
BOOTLOADER = bootloadhid
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
WS2812_DRIVER = i2c

+ 35
- 0
docs/ChangeLog/20210529.md View File

@ -82,6 +82,22 @@ Example code before change:
void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise);
}
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_DOWN);
} else {
tap_code(KC_UP);
}
}
}
```
Example code after change:
@ -90,6 +106,25 @@ Example code after change:
bool encoder_update_kb(uint8_t index, bool clockwise) {
return encoder_update_user(index, clockwise);
}
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_DOWN);
} else {
tap_code(KC_UP);
}
}
return true;
// If you return true, this will allow the keyboard level code to run, as well.
//Returning false will override the keyboard level code. Depending on how the keyboard level function is set up.
}
```
## Core Changes :id=core-changes


+ 557
- 0
docs/ChangeLog/20210828.md View File

@ -0,0 +1,557 @@
# QMK Breaking Changes - 2021 August 28 Changelog
## Notable Features :id=notable-features
### Combo processing improvements ([#8591](https://github.com/qmk/qmk_firmware/pull/8591)) :id=combo-processing-improvements
Combo processing has been reordered with respect to keypress handling, allowing for much better compatibility with mod taps.
It is also now possible to define combos that have keys overlapping with other combos, triggering only one. For example, a combo of `A`, `B` can coexist with a longer combo of `A`, `B`, `C` -- previous functionality would trigger both combos if all three keys were pressed.
### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) :id=key-overrides
QMK now has a new feature: [key overrides](https://docs.qmk.fm/#/feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
To illustrate, it's now possible to use the key overrides feature to translate <kbd>Shift + Backspace</kbd> into <kbd>Delete</kbd> -- an often-requested example of where this functionality comes in handy.
There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](https://docs.qmk.fm/#/feature_key_overrides) for more examples and info.
### Digitizer support ([#12851](https://github.com/qmk/qmk_firmware/pull/12851))
QMK gained the ability to pretend to be a digitizer device -- much like a tablet device. A mouse uses delta-coordinates -- move up, move right -- but a digitizer works with absolute coordinates -- top left, bottom right.
## Changes Requiring User Action :id=changes-requiring-user-action
### Updated Keyboard Codebases :id=updated-keyboard-codebases
The following keyboards have had their source moved within QMK:
Old Keyboard Name | New Keyboard Name
------------------------------|---------------------------------------------------------
aeboards/constellation | aeboards/constellation/rev1, aeboards/constellation/rev2
bakeneko65 | bakeneko65/rev2, bakeneko65/rev3
bm16a | kprepublic/bm16a
bm16s | kprepublic/bm16s
bm40hsrgb | kprepublic/bm40hsrgb
bm43a | kprepublic/bm43a
bm60poker | kprepublic/bm60poker
bm60rgb | kprepublic/bm60rgb
bm60rgb_iso | kprepublic/bm60rgb_iso
bm68rgb | kprepublic/bm68rgb
clawsome/gamebuddy | clawsome/gamebuddy/v1_0, clawsome/gamebuddy/v1_m
cospad | kprepublic/cospad
custommk/genesis | custommk/genesis/rev1, custommk/genesis/rev2
daisy | ktec/daisy
durgod/k320 | durgod/k3x0/k320
dztech/volcano660 | ilumkb/volcano660
ergodone | ktec/ergodone
gmmk/pro | gmmk/pro/ansi, gmmk/pro/iso
handwired/p1800fl | team0110/p1800fl
jj40 | kprepublic/jj40
jj4x4 | kprepublic/jj4x4
jj50 | kprepublic/jj50
kyria | splitkb/kyria
lazydesigners/the60 | lazydesigners/the60/rev1, lazydesigners/the60/rev2
matrix/m12og | matrix/m12og/rev1, matrix/m12og/rev2
mechlovin/hannah65/mechlovin9 | mechlovin/mechlovin9/rev1, mechlovin/mechlovin9/rev2
peiorisboards/ixora | coarse/ixora
ramonimbao/mona | ramonimbao/mona/v1, ramonimbao/mona/v1_1
staryu | ktec/staryu
tokyo60 | tokyokeyboard/tokyo60
vinta | coarse/vinta
xd002 | xiudi/xd002
xd004 | xiudi/xd004
xd60 | xiudi/xd60
xd68 | xiudi/xd68
xd75 | xiudi/xd75
xd84 | xiudi/xd84
xd84pro | xiudi/xd84pro
xd87 | xiudi/xd87
xd96 | xiudi/xd96
### Bootmagic Full Removal ([#13846](https://github.com/qmk/qmk_firmware/pull/13846)) :id=bootmagic-full-removal
As noted during last breaking changes cycle, QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `full` results in an error, allowing only `no`, `yes`, or `lite`.
Currently `lite` is the equivalent of `yes` in `rules.mk`. Next cycle the use of the `lite` keyword will be prevented in favour of `yes` -- any new submissions should now be using `yes` or `no` to minimise disruption.
#### Bootmagic Full Deprecation Schedule
This is the current roadmap for the behavior of `BOOTMAGIC_ENABLE`:
- (done) From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic.
- (now) From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
- (next) From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
### DIP switch callbacks are now boolean ([#13399](https://github.com/qmk/qmk_firmware/pull/13399)) :id=dip-switch-boolean
To match the encoder change last breaking changes cycle, DIP switch callbacks now return `bool`, too.
Example code before change:
```c
void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
}
void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
break;
}
}
void dip_switch_update_mask_kb(uint32_t state) {
dip_switch_update_mask_user(state);
}
void dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
layer_off(_ADJUST);
}
}
```
Example code after change:
```c
bool dip_switch_update_kb(uint8_t index, bool active) {
if !(dip_switch_update_user(index, active)) { return false; }
return true;
}
bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
break;
}
return true; // Returning true allows keyboard code to execute, false will tell the keyboard code "I've already handled it".
}
bool dip_switch_update_mask_kb(uint32_t state) {
if (!dip_switch_update_mask_user(state)) { return false; }
return true;
}
bool dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
layer_off(_ADJUST);
}
return true; // Returning true allows keyboard code to execute, false will tell the keyboard code "I've already handled it".
}
```
## Notable core changes :id=notable-core
### Split transport improvements :id=split-transport-improvements
Split keyboards gained a significant amount of improvements during this breaking changes cycle, specifically:
* Extensible split data sync ([#11930](https://github.com/qmk/qmk_firmware/pull/11930)) -- rewritten data sharing between sides, allowing for data transfer only when required, as well as enabling keyboards and keymaps to define their own shared data.
* Full-duplex ARM USART split ([#13081](https://github.com/qmk/qmk_firmware/pull/13081)) -- adds to the previous half-duplex driver and now allows for full-duplex support on ARM.
* Make solo half of split keyboards (more) usable. ([#13523](https://github.com/qmk/qmk_firmware/pull/13523)) -- allows the slave to be disconnected, enabling one-handed use.
* Switch split_common to CRC subsystem ([#13418](https://github.com/qmk/qmk_firmware/pull/13418))
!> If you're updating your split keyboard, you will need to flash both sides of the split with the your firmware.
### Teensy 4.x support ([#13056](https://github.com/qmk/qmk_firmware/pull/13056), [#13076](https://github.com/qmk/qmk_firmware/pull/13076), [#13077](https://github.com/qmk/qmk_firmware/pull/13077)) :id=teensy-4-x-support
Updated ChibiOS and ChibiOS-Contrib, which brought in support for Teensy 4.x dev boards, running NXP i.MX1062.
### Data Driven Improvements ([#13366](https://github.com/qmk/qmk_firmware/pull/13366))
QMK's pursuit of data-driven keyboards has progressed, allowing substantially more configurable options to be specified in `info.json`.
#### Tags
Tags will let you categorize your keyboard, and will be used in the future to allow browsing and sorting through keyboards in QMK. Tags are free-form text identifiers that identify attributes about your keyboard. To add tags you simply add a `tags` key to your `info.json`:
"tags": ["tkl", "backlight", "encoder"]
#### Dot Notation
With this release we are moving towards using JSON dot notation in more places. For example, when using `qmk info -f text`:
```
$ qmk info -f text -kb clueboard/card
bootloader: atmel-dfu
debounce: 20
diode_direction: ROW2COL
features.audio: True
features.backlight: True
features.bluetooth: False
features.bootmagic: False
features.command: True
features.console: True
features.extrakey: True
features.lto: True
features.midi: False
features.mousekey: True
features.nkro: False
features.rgblight: True
features.unicode: False
height: 8
keyboard_folder: clueboard/card
keyboard_name: Cluecard
layout_aliases.LAYOUT: LAYOUT_all
layouts: LAYOUT_all
maintainer: skullydazed
manufacturer: Clueboard
matrix_pins.cols: F1, F6, F7
matrix_pins.rows: B4, F0, F4, F5
platform: unknown
processor: atmega32u4
processor_type: avr
protocol: LUFA
rgblight.brightness_steps: 17
rgblight.hue_steps: 10
rgblight.led_count: 4
rgblight.pin: E6
rgblight.saturation_steps: 17
split.transport.protocol: serial
usb.device_ver: 0x0001
usb.pid: 0x2330
usb.vid: 0xC1ED
width: 10
```
#### New configuration keys
We've added dozens of new keys to `info.json` so that you can configure more than ever without writing a single line of code. A quick overview of the new items you can configure:
* `audio.pins`, `audio.voices`
* `backlight.breathing`, `backlight.breathing_period`, `backlight.levels`, `backlight.pin`,
* `bluetooth.driver`, `bluetooth.lto`
* `bootloader_instructions`
* `build.debounce_type`, `build.firmware_format`, `build.lto`
* `combo.count`, `combo.term`
* `leader_key.timing`, `leader_key.strict_processing`, `leader_key.timeout`
* `matrix.custom`, `matrix.custom_lite`, `matrix.ghost`, `matrix.io_delay`
* `mouse_key.enabled`, `mouse_key.delay`, `mouse_key.interval`, `mouse_key.max_speed`, `mouse_key.time_to_max`, `mouse_key.wheel_delay`
* `oneshot.tap_toggle`, `oneshot.timeout`
* `rgblight.layers.blink`, `rgblight.layers.enabled`, `rgblight.layers.max`, `rgblight.layers.override_rgb`, `rgblight.rgbw`
* `split.enabled`, `split.matrix_grid`, `split.matrix_pins`, `split.main`, `split.soft_serial_pin`, `split.soft_serial_speed`, `split.transport.protocol`, `split.transport.sync_matrix_state`, `split.transport.sync_modifiers`, `split.usb_detect`
* `tapping.force_hold`, `tapping.force_hold_per_key`, `tapping.ignore_mod_tap_interrupt`, `tapping.ignore_mod_tap_interrupt_per_key`, `tapping.permissive_hold`, `tapping.permissive_hold_per_key`, `tapping.retro`, `tapping.retro_per_key`, `tapping.term`, `tapping.term_per_key`, `tapping.toggle`
* `usb.force_nkro`, `usb.max_power`, `usb.no_startup_check`, `usb.polling_interval`, `usb.shared_endpoint.keyboard`, `usb.shared_endpoint.mouse`, `usb.suspend_wakeup_delay`, `usb.wait_for`
* `qmk.keys_per_scan`, `qmk.tap_keycode_delay`, `qmk.tap_capslock_delay`
### Codebase restructure and cleanup :id=codebase-restructure
QMK was originally based on TMK, and has grown in size considerably since its first inception. To keep moving things forward, restructure of some of the core areas of the code is needed to support new concepts and new hardware, and progress is happening along those lines:
* Move RGBLight code into its own folder ([#13312](https://github.com/qmk/qmk_firmware/pull/13312))
* Migrate platform independent code from tmk_core -> quantum ([#13673](https://github.com/qmk/qmk_firmware/pull/13673))
* matrix_scan_x -> x_task ([#13748](https://github.com/qmk/qmk_firmware/pull/13748))
* Move some led drivers to common folder ([#13749](https://github.com/qmk/qmk_firmware/pull/13749))
* Move chibios board files to allow tmk_core platform migration ([#13777](https://github.com/qmk/qmk_firmware/pull/13777))
* Begin to carve out platform/protocol API - Single main loop ([#13843](https://github.com/qmk/qmk_firmware/pull/13843))
* Relocate platform specific drivers ([#13894](https://github.com/qmk/qmk_firmware/pull/13894))
* Move all the flash logic from tmk_core ([#13927](https://github.com/qmk/qmk_firmware/pull/13927))
* Move USB Host Shield and Arduino core to `lib/` ([#13973](https://github.com/qmk/qmk_firmware/pull/13973))
* Unify behaviour of wait on AVR ([#14025](https://github.com/qmk/qmk_firmware/pull/14025))
* Move nix folder alongside vagrant ([#14132](https://github.com/qmk/qmk_firmware/pull/14132))
* Align some quantum sub-directories ([#14134](https://github.com/qmk/qmk_firmware/pull/14134))
---
## Full changelist
Core:
* Arm ps2 mouse interrupt ([#6490](https://github.com/qmk/qmk_firmware/pull/6490))
* Process combos earlier & overlapping combos ([#8591](https://github.com/qmk/qmk_firmware/pull/8591))
* Swap buttons on PS2 Mouse/Trackball ([#9205](https://github.com/qmk/qmk_firmware/pull/9205))
* Add HOLD_ON_OTHER_KEY_PRESS option for dual-role keys ([#9404](https://github.com/qmk/qmk_firmware/pull/9404))
* add yaml_build_options target ([#10533](https://github.com/qmk/qmk_firmware/pull/10533))
* Warn when building a board that uses arm_atsam ([#10904](https://github.com/qmk/qmk_firmware/pull/10904))
* Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422))
* Refactor `quantum/command.{c,h}` for code size & {read,maintain}ability ([#11842](https://github.com/qmk/qmk_firmware/pull/11842))
* Extensible split data sync ([#11930](https://github.com/qmk/qmk_firmware/pull/11930))
* Move print/debug files to quantum ([#12069](https://github.com/qmk/qmk_firmware/pull/12069))
* Unconditionally call led_init_ports ([#12116](https://github.com/qmk/qmk_firmware/pull/12116))
* Support using a timer for wait_us() on ChibiOS-based boards ([#12211](https://github.com/qmk/qmk_firmware/pull/12211))
* Add support for NO_PIN to all matrix types ([#12238](https://github.com/qmk/qmk_firmware/pull/12238))
* Avoid 8-bit timer overflows in debounce algorithms ([#12240](https://github.com/qmk/qmk_firmware/pull/12240))
* Add Per Key exclusions for Haptic Feedback ([#12386](https://github.com/qmk/qmk_firmware/pull/12386))
* Steno combinedkeys ([#12538](https://github.com/qmk/qmk_firmware/pull/12538))
* eeprom_stm32: implement high density wear leveling ([#12567](https://github.com/qmk/qmk_firmware/pull/12567))
* eeprom_i2c driver: added EXTERNAL_EEPROM_WP_PIN configuration option. ([#12617](https://github.com/qmk/qmk_firmware/pull/12617))
* Add CRC8 calculation subsystem to quantum ([#12641](https://github.com/qmk/qmk_firmware/pull/12641))
* Limit saturation for RGB_MATRIX_JELLYBEAN_RAINDROPS ([#12669](https://github.com/qmk/qmk_firmware/pull/12669))
* Add asym_eager_defer_pk debounce type ([#12689](https://github.com/qmk/qmk_firmware/pull/12689))
* Include lib8tion.c into RGB/LED matrix build list ([#12699](https://github.com/qmk/qmk_firmware/pull/12699))
* Add readPort() and some API to 'tmk_core/common/*/gpio.h' ([#12754](https://github.com/qmk/qmk_firmware/pull/12754))
* add wait_cpuclock() macro for AVR and CPU_CLOCK macro ([#12755](https://github.com/qmk/qmk_firmware/pull/12755))
* Trigger a wakeup after USB Reset on ChibiOS. ([#12831](https://github.com/qmk/qmk_firmware/pull/12831))
* Add sync_timer support over serial_link (i.e. Ergodox Infinity) ([#12845](https://github.com/qmk/qmk_firmware/pull/12845))
* Digitizer HID interface : absolute coordinates for mouse cursor ([#12851](https://github.com/qmk/qmk_firmware/pull/12851))
* Add config.h and rules.mk support for data driven keymaps ([#12859](https://github.com/qmk/qmk_firmware/pull/12859))
* Add alternate ldscript for STM32duino (F103xB) ([#12914](https://github.com/qmk/qmk_firmware/pull/12914))
* `keymap_extras`: Remove deprecated defines ([#12949](https://github.com/qmk/qmk_firmware/pull/12949))
* Retain brightness with lighting layers ([#13025](https://github.com/qmk/qmk_firmware/pull/13025))
* Move optical sensor code to drivers folder ([#13044](https://github.com/qmk/qmk_firmware/pull/13044))
* Change the prototype of matrix_output_unselect_delay() ([#13045](https://github.com/qmk/qmk_firmware/pull/13045))
* Add weak refs on reading rows/cols. ([#13062](https://github.com/qmk/qmk_firmware/pull/13062))
* Use single memcmp to determine if matrix changed. ([#13064](https://github.com/qmk/qmk_firmware/pull/13064))
* Improve layer mask handling ([#13065](https://github.com/qmk/qmk_firmware/pull/13065))
* mousekey: expose current report to users ([#13069](https://github.com/qmk/qmk_firmware/pull/13069))
* ChibiOS SVN mirror script. ([#13070](https://github.com/qmk/qmk_firmware/pull/13070))
* Added right vs left specific pin assignments for dip switch ([#13074](https://github.com/qmk/qmk_firmware/pull/13074))
* make RESET key work with Teensy 4.x ([#13076](https://github.com/qmk/qmk_firmware/pull/13076))
* wire up flash make target for Teensy 4.x ([#13077](https://github.com/qmk/qmk_firmware/pull/13077))
* bump USB spec version in device descriptor to 2.0 ([#13078](https://github.com/qmk/qmk_firmware/pull/13078))
* Unite half-duplex and full-duplex serial drivers ([#13081](https://github.com/qmk/qmk_firmware/pull/13081))
* Add ST7565 LCD driver ([#13089](https://github.com/qmk/qmk_firmware/pull/13089))
* `spi_master` Kinetis support ([#13098](https://github.com/qmk/qmk_firmware/pull/13098))
* GMMK Pro RGB Support ([#13147](https://github.com/qmk/qmk_firmware/pull/13147))
* Remove dfu-util arguments from mcu_selection ([#13150](https://github.com/qmk/qmk_firmware/pull/13150))
* Add subcommand to generate version.h ([#13151](https://github.com/qmk/qmk_firmware/pull/13151))
* Add oled_invert ([#13172](https://github.com/qmk/qmk_firmware/pull/13172))
* ST7565 invert ([#13237](https://github.com/qmk/qmk_firmware/pull/13237))
* RGB Matrix eeprom write limiting ([#13238](https://github.com/qmk/qmk_firmware/pull/13238))
* Temporary disable of CRC ([#13252](https://github.com/qmk/qmk_firmware/pull/13252))
* Move LED/RGB Matrix code into their own directories ([#13257](https://github.com/qmk/qmk_firmware/pull/13257))
* Skip EEPROM writes once done. ([#13293](https://github.com/qmk/qmk_firmware/pull/13293))
* Remove rgblight stubs ([#13302](https://github.com/qmk/qmk_firmware/pull/13302))
* Allow settable SPI divisor for AW20216 driver, set default to 4 ([#13309](https://github.com/qmk/qmk_firmware/pull/13309))
* Move RGBLight code into its own folder ([#13312](https://github.com/qmk/qmk_firmware/pull/13312))
* Unify matrix for split common and regular matrix ([#13330](https://github.com/qmk/qmk_firmware/pull/13330))
* Relocate RGB/HSV color defs to a more fitting place ([#13377](https://github.com/qmk/qmk_firmware/pull/13377))
* Adds support for STM32L412xB, STM32L422xB. ([#13383](https://github.com/qmk/qmk_firmware/pull/13383))
* Convert Dip Switch callbacks to boolean functions ([#13399](https://github.com/qmk/qmk_firmware/pull/13399))
* Use string literals for `SERIAL_NUMBER` ([#13403](https://github.com/qmk/qmk_firmware/pull/13403))
* Switch split_common to CRC subsystem ([#13418](https://github.com/qmk/qmk_firmware/pull/13418))
* Improve 'show_build_options' target ([#13425](https://github.com/qmk/qmk_firmware/pull/13425))
* AW20216 use register increment for framebuffer flushes ([#13430](https://github.com/qmk/qmk_firmware/pull/13430))
* Allow invert of SPLIT_HAND_PIN logic ([#13433](https://github.com/qmk/qmk_firmware/pull/13433))
* chibios: bootloader: use integer pointers as volatile ([#13450](https://github.com/qmk/qmk_firmware/pull/13450))
* Refactor OLED to allow easy addition of other types ([#13454](https://github.com/qmk/qmk_firmware/pull/13454))
* Dual RGB Matrix IS31FL3737 driver support to address #13442 ([#13457](https://github.com/qmk/qmk_firmware/pull/13457))
* Enable g_is31_leds PROGMEM for RGB Matrix IS31FL3737 driver ([#13480](https://github.com/qmk/qmk_firmware/pull/13480))
* Switch Ergodox Infinity over to split_common ([#13481](https://github.com/qmk/qmk_firmware/pull/13481))
* Make solo half of split keyboards (more) usable. ([#13523](https://github.com/qmk/qmk_firmware/pull/13523))
* Enable sync of OLED/ST7565 display on/off state on Splits ([#13542](https://github.com/qmk/qmk_firmware/pull/13542))
* Revert "Add rgblight to RGB Matrix VPATH" ([#13559](https://github.com/qmk/qmk_firmware/pull/13559))
* Move `SENDSTRING_BELL` code to `send_string.h` ([#13566](https://github.com/qmk/qmk_firmware/pull/13566))
* Migrate platform independent code from tmk_core -> quantum ([#13673](https://github.com/qmk/qmk_firmware/pull/13673))
* Avoid LTO conficts on arm_atsam ([#13676](https://github.com/qmk/qmk_firmware/pull/13676))
* Allow for removal of hysteresis on 4x encoders ([#13698](https://github.com/qmk/qmk_firmware/pull/13698))
* Port new_keyboard.sh to CLI ([#13706](https://github.com/qmk/qmk_firmware/pull/13706))
* Align AW20216 driver ([#13712](https://github.com/qmk/qmk_firmware/pull/13712))
* Haptic: driver-> feature ([#13713](https://github.com/qmk/qmk_firmware/pull/13713))
* Add support for STM32F407x MCUs. ([#13718](https://github.com/qmk/qmk_firmware/pull/13718))
* Remove legacy BACKLIGHT_CUSTOM_DRIVER option ([#13731](https://github.com/qmk/qmk_firmware/pull/13731))
* Minor tidy up of key overrides ([#13747](https://github.com/qmk/qmk_firmware/pull/13747))
* matrix_scan_x -> x_task ([#13748](https://github.com/qmk/qmk_firmware/pull/13748))
* Move some led drivers to common folder ([#13749](https://github.com/qmk/qmk_firmware/pull/13749))
* Allow for higher USB Polling rate on ATSAM boards ([#13755](https://github.com/qmk/qmk_firmware/pull/13755))
* Rgb matrix/enable modes explicitly ([#13758](https://github.com/qmk/qmk_firmware/pull/13758))
* Move chibios board files to allow tmk_core platform migration ([#13777](https://github.com/qmk/qmk_firmware/pull/13777))
* __flash? ([#13799](https://github.com/qmk/qmk_firmware/pull/13799))
* `--parallel` improvements ([#13800](https://github.com/qmk/qmk_firmware/pull/13800))
* Speed up pimoroni trackball driver ([#13823](https://github.com/qmk/qmk_firmware/pull/13823))
* Add a toggle key for GUI On/Off in Magic feature ([#13830](https://github.com/qmk/qmk_firmware/pull/13830))
* Begin to carve out platform/protocol API - Single main loop ([#13843](https://github.com/qmk/qmk_firmware/pull/13843))
* Remove Full Bootmagic ([#13846](https://github.com/qmk/qmk_firmware/pull/13846))
* Remove backwards compatibility of debounce names ([#13877](https://github.com/qmk/qmk_firmware/pull/13877))
* Relocate platform specific drivers ([#13894](https://github.com/qmk/qmk_firmware/pull/13894))
* Remove ONEHAND_ENABLE ([#13920](https://github.com/qmk/qmk_firmware/pull/13920))
* Move all the flash logic from tmk_core ([#13927](https://github.com/qmk/qmk_firmware/pull/13927))
* adding uf2 flash support for blackpill 401 ([#13968](https://github.com/qmk/qmk_firmware/pull/13968))
* Unify behaviour of wait on AVR ([#14025](https://github.com/qmk/qmk_firmware/pull/14025))
* Add qmk-hid bootloader detection support to `qmk console` ([#14038](https://github.com/qmk/qmk_firmware/pull/14038))
* Align DIP_SWITCH_PINS_RIGHT implementation with encoders ([#14079](https://github.com/qmk/qmk_firmware/pull/14079))
* Tidy up quantum.c now some of tmk_core has been merged ([#14083](https://github.com/qmk/qmk_firmware/pull/14083))
* Improve pmw3360 sensor and make it more hardware agnostic ([#14097](https://github.com/qmk/qmk_firmware/pull/14097))
* Move nix folder alongside vagrant ([#14132](https://github.com/qmk/qmk_firmware/pull/14132))
* Align some quantum sub-directories ([#14134](https://github.com/qmk/qmk_firmware/pull/14134))
* Revert 14083 && 14144 ([#14150](https://github.com/qmk/qmk_firmware/pull/14150))
CLI:
* allow LINE_PINxx for Teensy 4.x pins ([#13247](https://github.com/qmk/qmk_firmware/pull/13247))
* Remove the redundant pin name validation ([#13251](https://github.com/qmk/qmk_firmware/pull/13251))
* Move all our CLI file formatters to the format dir ([#13296](https://github.com/qmk/qmk_firmware/pull/13296))
* Refactor doctor.py into a directory ([#13298](https://github.com/qmk/qmk_firmware/pull/13298))
* Add git and venv info to doctor's output ([#13405](https://github.com/qmk/qmk_firmware/pull/13405))
* Matrix consistency check ([#13470](https://github.com/qmk/qmk_firmware/pull/13470))
* Remove references to info.json `width` and `height` in CLI ([#13728](https://github.com/qmk/qmk_firmware/pull/13728))
* Make `qmk doctor` more lenient about system config ([#13804](https://github.com/qmk/qmk_firmware/pull/13804))
* Defer the expensive search for layout macros until info.json has been processed ([#14007](https://github.com/qmk/qmk_firmware/pull/14007))
Submodule updates:
* Update ChibiOS, ChibiOS-Contrib. ([#13056](https://github.com/qmk/qmk_firmware/pull/13056))
* Update LUFA (18-07-2021) and add QMK-HID Bootloader support ([#13588](https://github.com/qmk/qmk_firmware/pull/13588))
* Update LUFA Submodule (2021-07-30) ([#13819](https://github.com/qmk/qmk_firmware/pull/13819))
* Bump gtest ([#13885](https://github.com/qmk/qmk_firmware/pull/13885))
* Update ChibiOS-Contrib, mirroring script. ([#13896](https://github.com/qmk/qmk_firmware/pull/13896))
* Move USB Host Shield and Arduino core to `lib/` ([#13973](https://github.com/qmk/qmk_firmware/pull/13973))
Keyboards:
* Migrate keyboards using uGFX to LED_MATRIX ([#9657](https://github.com/qmk/qmk_firmware/pull/9657))
* Remove MIDI Configuration boilerplate ([#11151](https://github.com/qmk/qmk_firmware/pull/11151))
* manyboard macro ([#11896](https://github.com/qmk/qmk_firmware/pull/11896))
* Moved tokyo60/ into tokyokeyboard/tokyo60/. ([#12023](https://github.com/qmk/qmk_firmware/pull/12023))
* Organize KPrepublic, K.T.E.C, xiudi boards into directories ([#12159](https://github.com/qmk/qmk_firmware/pull/12159))
* Add Durgod Taurus K310 keyboard ([#12314](https://github.com/qmk/qmk_firmware/pull/12314))
* add support for m65 and simple 5x13 ortholinear ([#12315](https://github.com/qmk/qmk_firmware/pull/12315))
* Relocalize and Update p1800fl ([#12425](https://github.com/qmk/qmk_firmware/pull/12425))
* GameBuddy v1.M ([#12637](https://github.com/qmk/qmk_firmware/pull/12637))
* Add mechlovin9 rev2 PCB ([#12767](https://github.com/qmk/qmk_firmware/pull/12767))
* Add RGB matrix support for Kyria ([#12789](https://github.com/qmk/qmk_firmware/pull/12789))
* RGB Matrix working for Sofle RGB ([#12861](https://github.com/qmk/qmk_firmware/pull/12861))
* Add Durgod Hades, Galaxy and Venus Keyboards ([#12893](https://github.com/qmk/qmk_firmware/pull/12893))
* kint36: set correct EEPROM size ([#12946](https://github.com/qmk/qmk_firmware/pull/12946))
* Updated encoder_update_user on my keymap to follow the new signature on quantum ([#13152](https://github.com/qmk/qmk_firmware/pull/13152))
* Add Creator Pro by SergioPoverony ([#13154](https://github.com/qmk/qmk_firmware/pull/13154))
* Use the new ST7565 driver on Ergodox Infinity ([#13165](https://github.com/qmk/qmk_firmware/pull/13165))
* Refactor atom47 and add rev4 and rev5 ([#13201](https://github.com/qmk/qmk_firmware/pull/13201))
* Add Bakeneko65 V3 and revision folders ([#13228](https://github.com/qmk/qmk_firmware/pull/13228))
* Keyboards/RGBKB/Mün ([#13239](https://github.com/qmk/qmk_firmware/pull/13239))
* Optimize our jsonschema by using refs ([#13271](https://github.com/qmk/qmk_firmware/pull/13271))
* Handwired/Stream_Cheap/2x4: Add via support ([#13297](https://github.com/qmk/qmk_firmware/pull/13297))
* ez_maker/directpins for easy one-offs in qmk_configurator ([#13321](https://github.com/qmk/qmk_firmware/pull/13321))
* add kinT kinesis keyboard controller (kint41 variant) ([#13333](https://github.com/qmk/qmk_firmware/pull/13333))
* Error log cleanup ([#13349](https://github.com/qmk/qmk_firmware/pull/13349))
* Drashna's split updates ([#13350](https://github.com/qmk/qmk_firmware/pull/13350))
* Migrate SHIFT_ESC and RGB `fn_actions` to Grave Escape and RGB keycodes ([#13360](https://github.com/qmk/qmk_firmware/pull/13360))
* Add a lot more data to info.json ([#13366](https://github.com/qmk/qmk_firmware/pull/13366))
* Remove `API_SYSEX_ENABLE`s from rules.mk ([#13389](https://github.com/qmk/qmk_firmware/pull/13389))
* gmmk/pro/mike1808 keymap ([#13398](https://github.com/qmk/qmk_firmware/pull/13398))
* Remove deprecated callbacks for encoders and dip switches ([#13404](https://github.com/qmk/qmk_firmware/pull/13404))
* first pass: matrix consistency improvements ([#13471](https://github.com/qmk/qmk_firmware/pull/13471))
* Migrate more `fn_actions` stuff ([#13502](https://github.com/qmk/qmk_firmware/pull/13502))
* add simple gmmk pro macos keymap with rgb ([#13504](https://github.com/qmk/qmk_firmware/pull/13504))
* move volcano660 to ilumkb folder ([#13550](https://github.com/qmk/qmk_firmware/pull/13550))
* Valor Rev 2 ([#13551](https://github.com/qmk/qmk_firmware/pull/13551))
* Split GMMK Pro PCBs into separate revisions ([#13570](https://github.com/qmk/qmk_firmware/pull/13570))
* Remove the vision_division keyboard ([#13571](https://github.com/qmk/qmk_firmware/pull/13571))
* Develop - Change uint32_t to layer_state_t ([#13596](https://github.com/qmk/qmk_firmware/pull/13596))
* Develop - DC01 left ([#13597](https://github.com/qmk/qmk_firmware/pull/13597))
* Created "paddlegame" keymap ([#13629](https://github.com/qmk/qmk_firmware/pull/13629))
* Add timer_avr to includes for broken builds ([#13641](https://github.com/qmk/qmk_firmware/pull/13641))
* Disable console by default on all Keebio boards ([#13649](https://github.com/qmk/qmk_firmware/pull/13649))
* Enable LTO by default on BastardKB Scylla ([#13664](https://github.com/qmk/qmk_firmware/pull/13664))
* Reduce compile size for dz60rgb v2.1 ([#13680](https://github.com/qmk/qmk_firmware/pull/13680))
* Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines ([#13689](https://github.com/qmk/qmk_firmware/pull/13689))
* Remove some legacy files ([#13715](https://github.com/qmk/qmk_firmware/pull/13715))
* [Keyboard Update] Change to L422 ([#13717](https://github.com/qmk/qmk_firmware/pull/13717))
* Update kyria make path example ([#13720](https://github.com/qmk/qmk_firmware/pull/13720))
* Drashna's Defaults cleanup ([#13722](https://github.com/qmk/qmk_firmware/pull/13722))
* Reduce firmware size in prep for #12670 ([#13724](https://github.com/qmk/qmk_firmware/pull/13724))
* Tidy up rgbkb/mun ([#13801](https://github.com/qmk/qmk_firmware/pull/13801))
* Make default keymap for GMMK Pro reflect stock ([#13850](https://github.com/qmk/qmk_firmware/pull/13850))
* Rework as per 9824 ([#13898](https://github.com/qmk/qmk_firmware/pull/13898))
* Remove console from keebio via keyboards ([#13901](https://github.com/qmk/qmk_firmware/pull/13901))
* Drashna split transport improvement ([#13905](https://github.com/qmk/qmk_firmware/pull/13905))
* Copy GMMK Pro screw specs to ISO readme ([#13908](https://github.com/qmk/qmk_firmware/pull/13908))
* Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines Part 2 ([#13912](https://github.com/qmk/qmk_firmware/pull/13912))
* Add andrebrait layout for GMMK Pro ([#13932](https://github.com/qmk/qmk_firmware/pull/13932))
* Updated RGB Matrix suspend define part 3 ([#13954](https://github.com/qmk/qmk_firmware/pull/13954))
* Improve andrebrait keymap ([#13985](https://github.com/qmk/qmk_firmware/pull/13985))
* Drashna's Improve OLEDs and custom Split code ([#14063](https://github.com/qmk/qmk_firmware/pull/14063))
* Kyria default reformat ([#14080](https://github.com/qmk/qmk_firmware/pull/14080))
* Feature rich keymap for GMMK Pro (ANSI) ([#14120](https://github.com/qmk/qmk_firmware/pull/14120))
Keyboard fixes:
* Fix LED mapping for GMMK Pro ([#13189](https://github.com/qmk/qmk_firmware/pull/13189))
* Fix up SplitKB keyboards ([#13511](https://github.com/qmk/qmk_firmware/pull/13511))
* Keyboards/sol rev2 fix ([#13533](https://github.com/qmk/qmk_firmware/pull/13533))
* Fix MATRIX_COLS for aeboards/constellation/rev2 ([#13633](https://github.com/qmk/qmk_firmware/pull/13633))
* Fix errors with matrix_output_unselect_delay function calls ([#13645](https://github.com/qmk/qmk_firmware/pull/13645))
* Fix default keymap for 0xCB 1337 keyboard ([#13646](https://github.com/qmk/qmk_firmware/pull/13646))
* Fix Matrix Row number for ggkeyboards/genisis ([#13647](https://github.com/qmk/qmk_firmware/pull/13647))
* Fix matrix issues with Promethium ([#13648](https://github.com/qmk/qmk_firmware/pull/13648))
* Fix dc01/left so that it doesn't throw a warning ([#13653](https://github.com/qmk/qmk_firmware/pull/13653))
* Remove broken, unmaintained converter/ibm_5291 ([#13658](https://github.com/qmk/qmk_firmware/pull/13658))
* Quick hack to fix Astro65 board ([#13665](https://github.com/qmk/qmk_firmware/pull/13665))
* Fix symmetric70_proto build break on develop branch ([#13667](https://github.com/qmk/qmk_firmware/pull/13667))
* Fix matrix delay on Drop boards ([#13671](https://github.com/qmk/qmk_firmware/pull/13671))
* Fix split matrix for sekigon grs 70ec ([#13672](https://github.com/qmk/qmk_firmware/pull/13672))
* Fix type on pandora via keymap ([#13681](https://github.com/qmk/qmk_firmware/pull/13681))
* Fix & clean up tronguylabs/m122_3270 ([#13684](https://github.com/qmk/qmk_firmware/pull/13684))
* Fix up xd002 rgb keymaps ([#13685](https://github.com/qmk/qmk_firmware/pull/13685))
* Dactyl Manuform cleanup ([#13686](https://github.com/qmk/qmk_firmware/pull/13686))
* Fix Q1 change dip switch to bool ([#13687](https://github.com/qmk/qmk_firmware/pull/13687))
* Fix compile size for the Merge UM70 via keymap ([#13690](https://github.com/qmk/qmk_firmware/pull/13690))
* Fix compile size for the Lets Split Sockets via keymap ([#13691](https://github.com/qmk/qmk_firmware/pull/13691))
* Fix Compile size on ungodly Launch Pad ([#13692](https://github.com/qmk/qmk_firmware/pull/13692))
* dirty fix ([#13695](https://github.com/qmk/qmk_firmware/pull/13695))
* Fix compile size for the Vitamins Included via keymap ([#13696](https://github.com/qmk/qmk_firmware/pull/13696))
* Fix typo in Dactyl Manuform ([#13740](https://github.com/qmk/qmk_firmware/pull/13740))
* Fix compile issues due to LED changes ([#13821](https://github.com/qmk/qmk_firmware/pull/13821))
* Fix SRC include for matrix/m20add issi driver ([#13826](https://github.com/qmk/qmk_firmware/pull/13826))
* fix develop branch move file ([#13832](https://github.com/qmk/qmk_firmware/pull/13832))
* Fix knops keymaps ([#13872](https://github.com/qmk/qmk_firmware/pull/13872))
* Switch Draculad to using WPM char hack ([#13886](https://github.com/qmk/qmk_firmware/pull/13886))
* Fix up builds after #8591 ([#13900](https://github.com/qmk/qmk_firmware/pull/13900))
* Fix matrix_output_unselect_delay for handwired/xealousbrown ([#13913](https://github.com/qmk/qmk_firmware/pull/13913))
* Fixup rgb matrix config for KBD67 mkII boards ([#13931](https://github.com/qmk/qmk_firmware/pull/13931))
* Fix compliation for ferris 0.2 bling ([#13937](https://github.com/qmk/qmk_firmware/pull/13937))
* Fix some additional bootmagic settings ([#13979](https://github.com/qmk/qmk_firmware/pull/13979))
* Fix default keymap for GMMK Pro Iso ([#13980](https://github.com/qmk/qmk_firmware/pull/13980))
* Fixup Ungodly Launch Pad config ([#13992](https://github.com/qmk/qmk_firmware/pull/13992))
* Fix errors that have cropped up in develop ([#14005](https://github.com/qmk/qmk_firmware/pull/14005))
* Fix wait_us overflow in matrix for dactyl based boards ([#14039](https://github.com/qmk/qmk_firmware/pull/14039))
* Fixup Neson Design N6 ISSI includes ([#14045](https://github.com/qmk/qmk_firmware/pull/14045))
* Fixup `massdrop/alt`, `cest73/tkm`. ([#14048](https://github.com/qmk/qmk_firmware/pull/14048))
* fix helix:fraanrosi compile error caused by #13677. ([#14061](https://github.com/qmk/qmk_firmware/pull/14061))
* Fix compile issues for Tractyl Manuform ([#14105](https://github.com/qmk/qmk_firmware/pull/14105))
* Disable Console on Keebio Quefrency ([#14108](https://github.com/qmk/qmk_firmware/pull/14108))
* Fixed GMMK Pro -> stickandgum keymap readme.md ([#14123](https://github.com/qmk/qmk_firmware/pull/14123))
* Drashna keymap fixups ([#14140](https://github.com/qmk/qmk_firmware/pull/14140))
* fix ([#14142](https://github.com/qmk/qmk_firmware/pull/14142))
* Fix merge artifacts ([#14146](https://github.com/qmk/qmk_firmware/pull/14146))
* Update readme files ([#14172](https://github.com/qmk/qmk_firmware/pull/14172))
Others:
* Add examples to RGB Matrix Indicators docs ([#12797](https://github.com/qmk/qmk_firmware/pull/12797))
Bugs:
* Fix Indicator LED issues ([#12097](https://github.com/qmk/qmk_firmware/pull/12097))
* Fixing incorrect keymap build when switching between multiple keymap.jsons ([#12632](https://github.com/qmk/qmk_firmware/pull/12632))
* Fix LED Hit Counter for LED/RGB Matrix ([#12674](https://github.com/qmk/qmk_firmware/pull/12674))
* ChibiOS fix O3 and LTO breakage of extra keys and joystick ([#12819](https://github.com/qmk/qmk_firmware/pull/12819))
* Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards ([#12870](https://github.com/qmk/qmk_firmware/pull/12870))
* Fix firmware size check with avr-libc 1:2.0.0+Atmel3.6.2-1.1 (Debian bullseye) ([#12951](https://github.com/qmk/qmk_firmware/pull/12951))
* Fix RGB/LED Suspend defines ([#13146](https://github.com/qmk/qmk_firmware/pull/13146))
* Fix overrun in st7565_write_raw when not at (0, 0) ([#13209](https://github.com/qmk/qmk_firmware/pull/13209))
* Upgrades Vagrant box to Debian 10 to fix Docker build error on Debian 9. ([#13236](https://github.com/qmk/qmk_firmware/pull/13236))
* Fix issues with VIA EEPROM init and bring in line with eeconfig functionality ([#13243](https://github.com/qmk/qmk_firmware/pull/13243))
* Fix CRC for AVR and enable again. ([#13253](https://github.com/qmk/qmk_firmware/pull/13253))
* Fix linker error when rgblight and RGB Matrix are both enabled ([#13304](https://github.com/qmk/qmk_firmware/pull/13304))
* Fix building layouts from JSON ([#13310](https://github.com/qmk/qmk_firmware/pull/13310))
* Add rgblight to RGB Matrix VPATH ([#13371](https://github.com/qmk/qmk_firmware/pull/13371))
* Fix two out of bounds accesses from #13330. ([#13525](https://github.com/qmk/qmk_firmware/pull/13525))
* Fixes for clang not being able to run unit tests ([#13546](https://github.com/qmk/qmk_firmware/pull/13546))
* Fixup Audio startup and add to documents ([#13606](https://github.com/qmk/qmk_firmware/pull/13606))
* CLI/Docs: Fix the format commands' name ([#13668](https://github.com/qmk/qmk_firmware/pull/13668))
* Disables rgblight twinkle by default. ([#13677](https://github.com/qmk/qmk_firmware/pull/13677))
* Fix typo in dip switch example ([#13688](https://github.com/qmk/qmk_firmware/pull/13688))
* docs/cli_commands: fix typo ([#13697](https://github.com/qmk/qmk_firmware/pull/13697))
* Include gpio.h in solenoid driver for GPIO Control functions ([#13716](https://github.com/qmk/qmk_firmware/pull/13716))
* Fix pimoroni trackball read address ([#13810](https://github.com/qmk/qmk_firmware/pull/13810))
* Fix Key Override includes ([#13831](https://github.com/qmk/qmk_firmware/pull/13831))
* Fix alignment of USB out report buffer 2 -> 4 ([#13838](https://github.com/qmk/qmk_firmware/pull/13838))
* Fix compilation issue. ([#13926](https://github.com/qmk/qmk_firmware/pull/13926))
* Fix `combo_disable` ([#13988](https://github.com/qmk/qmk_firmware/pull/13988))
* Fix pmw3360 code to only output debug info if mouse debugging is enabled ([#13993](https://github.com/qmk/qmk_firmware/pull/13993))
* Fix ifdefs for OLED split sync code ([#14017](https://github.com/qmk/qmk_firmware/pull/14017))
* Various fixes from reorg of files ([#14051](https://github.com/qmk/qmk_firmware/pull/14051))
* Fixup atsam builds. ([#14052](https://github.com/qmk/qmk_firmware/pull/14052))
* Fix RGB/LED Matrix Suspend code ([#14084](https://github.com/qmk/qmk_firmware/pull/14084))
* Fix issues with recent keymap.json changes ([#14089](https://github.com/qmk/qmk_firmware/pull/14089))
* Fix LED Matrix suspend code ([#14090](https://github.com/qmk/qmk_firmware/pull/14090))
* Fix up compilation issues. ([#14095](https://github.com/qmk/qmk_firmware/pull/14095))
* Fix copypasta issue with pmw3360 sensor config ([#14106](https://github.com/qmk/qmk_firmware/pull/14106))
* Fix typo ([#14118](https://github.com/qmk/qmk_firmware/pull/14118))
* Fix bootloadHID comments breaking :flash ([#14133](https://github.com/qmk/qmk_firmware/pull/14133))
* Fix Mouse Shared EP functionality ([#14136](https://github.com/qmk/qmk_firmware/pull/14136))
* Short term bodge for firmware size bloat ([#14144](https://github.com/qmk/qmk_firmware/pull/14144))
* Move to correct location ([#14171](https://github.com/qmk/qmk_firmware/pull/14171))

+ 8
- 1
docs/_summary.md View File

@ -19,6 +19,7 @@
* [Overview](newbs_building_firmware_configurator.md)
* [Step by Step](configurator_step_by_step.md)
* [Troubleshooting](configurator_troubleshooting.md)
* [Architecture](configurator_architecture.md)
* QMK API
* [Overview](api_overview.md)
* [API Documentation](api_docs.md)
@ -35,6 +36,7 @@
* Guides
* [Customizing Functionality](custom_quantum_functions.md)
* [Driver Installation with Zadig](driver_installation_zadig.md)
* [Easy Maker for One Offs](easy_maker.md)
* [Keymap Overview](keymap.md)
* Development Environments
* [Docker Guide](getting_started_docker.md)
@ -60,6 +62,7 @@
* [Language-Specific Keycodes](reference_keymap_extras.md)
* [Modifier Keys](feature_advanced_keycodes.md)
* [Quantum Keycodes](quantum_keycodes.md)
* [Magic Keycodes](keycodes_magic.md)
* Advanced Keycodes
* [Command](feature_command.md)
@ -77,6 +80,7 @@
* [Combos](feature_combo.md)
* [Debounce API](feature_debounce_type.md)
* [Key Lock](feature_key_lock.md)
* [Key Overrides](feature_key_overrides.md)
* [Layers](feature_layers.md)
* [One Shot Keys](one_shot_keys.md)
* [Pointing Device](feature_pointing_device.md)
@ -93,6 +97,7 @@
* Hardware Features
* Displays
* [HD44780 LCD Controller](feature_hd44780.md)
* [ST7565 LCD Driver](feature_st7565.md)
* [OLED Driver](feature_oled_driver.md)
* Lighting
* [Backlight](feature_backlight.md)
@ -101,13 +106,15 @@
* [RGB Matrix](feature_rgb_matrix.md)
* [Audio](feature_audio.md)
* [Bluetooth](feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md)
* [Bootmagic Lite](feature_bootmagic.md)
* [Custom Matrix](custom_matrix.md)
* [Digitizer](feature_digitizer.md)
* [DIP Switch](feature_dip_switch.md)
* [Encoders](feature_encoders.md)
* [Haptic Feedback](feature_haptic_feedback.md)
* [Joystick](feature_joystick.md)
* [LED Indicators](feature_led_indicators.md)
* [MIDI](feature_midi.md)
* [Proton C Conversion](proton_c_conversion.md)
* [PS/2 Mouse](feature_ps2_mouse.md)
* [Split Keyboard](feature_split_keyboard.md)


+ 19
- 11
docs/breaking_changes.md View File

@ -6,6 +6,7 @@ The breaking change period is when we will merge PR's that change QMK in dangero
## What has been included in past Breaking Changes?
* [2021 Aug 28](ChangeLog/20210828.md)
* [2021 May 29](ChangeLog/20210529.md)
* [2021 Feb 27](ChangeLog/20210227.md)
* [2020 Nov 28](ChangeLog/20201128.md)
@ -20,12 +21,12 @@ The next Breaking Change is scheduled for August 28, 2021.
### Important Dates
* [x] 2021 May 29 - `develop` is created. Each push to `master` is subsequently merged to `develop`
* [ ] 2021 Jul 31 - `develop` closed to new PR's.
* [ ] 2021 Jul 31 - Call for testers.
* [ ] 2021 Aug 26 - `master` is locked, no PR's merged.
* [ ] 2021 Aug 28 - Merge `develop` to `master`.
* [ ] 2021 Aug 28 - `master` is unlocked. PR's can be merged again.
* [x] 2021 Aug 29 - `develop` is created. Each push to `master` is subsequently merged to `develop`
* [ ] 2021 Oct 31 - `develop` closed to new PR's.
* [ ] 2021 Oct 31 - Call for testers.
* [ ] 2021 Nov 26 - `master` is locked, no PR's merged.
* [ ] 2021 Nov 28 - Merge `develop` to `master`.
* [ ] 2021 Nov 28 - `master` is unlocked. PR's can be merged again.
## What changes will be included?
@ -56,7 +57,7 @@ This happens immediately after the previous `develop` branch is merged.
* [ ] `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 develop`
* [ ] `git push upstream develop`
* [ ] `git push --tags`
## 4 Weeks Before Merge
@ -86,13 +87,20 @@ This happens immediately after the previous `develop` branch is merged.
* `qmk_firmware` git commands
* [ ] `git checkout develop`
* [ ] `git pull --ff-only`
* [ ] `git rebase origin/master`
* [ ] Edit `readme.md`
* [ ] Remove the notes about `develop`
* [ ] Roll up the ChangeLog into one file.
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
* [ ] `git push origin develop`
* [ ] `git push upstream develop`
* GitHub Actions
* [ ] Create a PR for `develop`
* [ ] Make sure travis comes back clean
* [ ] Merge `develop` PR
* [ ] **Turn off 'Automatically delete head branches' for the repository** -- confirm with @qmk/directors that it is done before continuing
* `qmk_firmware` git commands
* [ ] `git checkout master`
* [ ] `git pull --ff-only`
* [ ] `git merge --no-ff develop`
* [ ] `git push upstream master`
## Post-merge operations
* (Optional) [update ChibiOS + ChibiOS-Contrib on `develop`](chibios_upgrade_instructions.md)

+ 1
- 0
docs/breaking_changes_history.md View File

@ -2,6 +2,7 @@
This page links to all previous changelogs from the QMK Breaking Changes process.
* [2021 Aug 28](ChangeLog/20210828.md) - version 0.14.0
* [2021 May 29](ChangeLog/20210529.md) - version 0.13.0
* [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0
* [2020 Nov 28](ChangeLog/20201128.md) - version 0.11.0


+ 56
- 0
docs/chibios_upgrade_instructions.md View File

@ -0,0 +1,56 @@
# ChibiOS Upgrade Procedure
ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions.
## Getting ChibiOS
* `svn` Initialisation:
* Only needed to be done once
* You might need to separately install `git-svn` package in your OS's package manager
* `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
* `git remote add qmk git@github.com:qmk/ChibiOS.git`
* Updating:
* `git svn fetch`
* First time around this will take several hours
* Subsequent updates will be incremental only
* Tagging example (work out which version first!):
* `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3`
* `git push qmk ver20.3.3`
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3`
* `git push qmk breaking_YYYY_qN`
## Getting ChibiOS-Contrib
* `git` Initialisation:
* `git clone git@github.com:qmk/ChibiOS-Contrib`
* `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
* `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
* Updating:
* `git fetch --all --tags --prune`
* `git checkout chibios-20.3.x`
* `git pull --ff-only`
* `git push origin chibios-20.3.x`
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x`
* `git push origin breaking_YYYY_qN`
## Updating submodules
* Update the submodules
* `cd $QMK_FIRMWARE`
* `git checkout develop`
* `git pull --ff-only`
* `git checkout -b chibios-version-bump`
* `cd lib/chibios`
* `git fetch --all --tags --prune`
* `git checkout breaking_YYYY_qN`
* `cd ../chibios-contrib`
* `git fetch --all --tags --prune`
* `git checkout breaking_YYYY_qN`
* Build everything
* `cd $QMK_FIRMWARE`
* `qmk multibuild -j4`
* Make sure there are no errors
* Push to the repo
* `git commit -am 'Update ChibiOS to XXXXXXXXX'`
* `git push --set-upstream origin chibios-version-bump`
* Make a PR to qmk_firmware with the new branch

+ 38
- 15
docs/cli_commands.md View File

@ -17,7 +17,7 @@ qmk compile [-c] <configuratorExport.json>
**Usage for Keymaps**:
```
qmk compile [-c] [-e <var>=<value>] -kb <keyboard_name> -km <keymap_name>
qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] -kb <keyboard_name> -km <keymap_name>
```
**Usage in Keyboard Directory**:
@ -73,6 +73,17 @@ $ qmk compile -kb dz60
...
```
**Parallel Compilation**:
It is possible to speed up compilation by adding the `-j`/`--parallel` flag.
```
qmk compile -j <num_jobs> -kb <keyboard_name>
```
The `num_jobs` argument determines the maximum number of jobs that can be used. Setting it to zero will enable parallel compilation without limiting the maximum number of jobs.
```
qmk compile -j 0 -kb <keyboard_name>
```
## `qmk flash`
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
@ -82,13 +93,13 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
**Usage for Configurator Exports**:
```
qmk flash [-bl <bootloader>] [-c] [-e <var>=<value>] <configuratorExport.json>
qmk flash [-bl <bootloader>] [-c] [-e <var>=<value>] [-j <num_jobs>] <configuratorExport.json>
```
**Usage for Keymaps**:
```
qmk flash -kb <keyboard_name> -km <keymap_name> [-bl <bootloader>] [-c] [-e <var>=<value>]
qmk flash -kb <keyboard_name> -km <keymap_name> [-bl <bootloader>] [-c] [-e <var>=<value>] [-j <num_jobs>]
```
**Listing the Bootloaders**
@ -109,7 +120,7 @@ qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
## `qmk console`
This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLED=yes`.
This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`.
**Usage**:
@ -280,12 +291,12 @@ qmk list-keymaps -kb planck/ez
This command creates a new keyboard based on available templates.
This command will prompt for input to guide you though the generation process.
Any arguments that are not provided will prompt for input. If `-u` is not passed and `user.name` is set in .gitconfig, it will be used as the default username in the prompt.
**Usage**:
```
qmk new-keyboard
qmk new-keyboard [-kb KEYBOARD] [-t {avr,ps2avrgb}] -u USERNAME
```
## `qmk new-keymap`
@ -314,7 +325,18 @@ qmk clean [-a]
# Developer Commands
## `qmk cformat`
## `qmk format-text`
This command formats text files to have proper line endings.
Every text file in the repository needs to have Unix (LF) line ending.
If you are working on **Windows**, you must ensure that line endings are corrected in order to get your PRs merged.
```
qmk format-text
```
## `qmk format-c`
This command formats C code using clang-format.
@ -325,35 +347,36 @@ Run it with `-a` to format all core code, or pass filenames on the command line
**Usage for specified files**:
```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```
**Usage for all core files**:
```
qmk cformat -a
qmk format-c -a
```
**Usage for only changed files against origin/master**:
```
qmk cformat
qmk format-c
```
**Usage for only changed files against branch_name**:
```
qmk cformat -b branch_name
qmk format-c -b branch_name
```
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
Use the `-b`/`--browser` flag to automatically open the local webserver in your default browser.
**Usage**:
```
qmk docs [-p PORT]
qmk docs [-b] [-p PORT]
```
## `qmk generate-docs`
@ -368,7 +391,7 @@ qmk generate-docs
## `qmk generate-rgb-breathe-table`
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`.
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
**Usage**:
@ -398,14 +421,14 @@ $ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```
## `qmk pyformat`
## `qmk format-python`
This command formats python code in `qmk_firmware`.
**Usage**:
```
qmk pyformat
qmk format-python
```
## `qmk pytest`


+ 2
- 2
docs/cli_development.md View File

@ -188,7 +188,7 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou
# Testing, and Linting, and Formatting (oh my!)
We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `pyformat` subcommands to run these tests:
We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `format-py` subcommands to run these tests:
### Testing and Linting
@ -196,7 +196,7 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the `
### Formatting
qmk pyformat
qmk format-py
## Formatting Details


+ 3
- 0
docs/compatible_microcontrollers.md View File

@ -27,10 +27,13 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
* [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html)
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
* [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)


+ 52
- 5
docs/config_options.md View File

@ -51,8 +51,10 @@ This is a C header file that is one of the first things included, and will persi
* the number of columns in your keyboard's matrix
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
* pins of the rows, from top to bottom
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
* pins of the columns, from left to right
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_IO_DELAY 30`
* the delay in microseconds when between changing matrix pin state and reading values
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
@ -186,13 +188,27 @@ If you define these options you will enable the associated feature, which may in
few ms of delay from this. But if you're doing chording on something with 3-4ms
scan times? You probably want this.
* `#define COMBO_COUNT 2`
* Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature.
* Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature. Or leave it undefined and programmatically set the count.
* `#define COMBO_TERM 200`
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
* `#define COMBO_MUST_HOLD_MODS`
* Flag for enabling extending timeout on Combos containing modifers
* `#define COMBO_MOD_TERM 200`
* Allows for extending COMBO_TERM for mod keys while mid-combo.
* `#define COMBO_MUST_HOLD_PER_COMBO`
* Flag to enable per-combo COMBO_TERM extension and `get_combo_must_hold()` function
* `#define COMBO_TERM_PER_COMBO`
* Flag to enable per-combo COMBO_TERM extension and `get_combo_term()` function
* `#define COMBO_STRICT_TIMER`
* Only start the combo timer on the first key press instead of on all key presses.
* `#define COMBO_NO_TIMER`
* Disable the combo timer completely for relaxed combos.
* `#define TAP_CODE_DELAY 100`
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
* `#define TAP_HOLD_CAPS_DELAY 80`
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
* `#define KEY_OVERRIDE_REPEAT_DELAY 500`
* Sets the key repeat interval for [key overrides](feature_key_overrides.md).
## RGB Light Configuration
@ -272,7 +288,7 @@ There are a few different ways to set handedness for split keyboards (listed in
### Other Options
* `#define USE_I2C`
* For using I2C instead of Serial (defaults to serial)
* For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
* `#define SOFT_SERIAL_PIN D0`
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
@ -280,6 +296,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
@ -300,7 +317,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_DETECT`
* Detect (with timeout) USB connection when delegating master/slave
* Default behavior for ARM
* Required for AVR Teensy
* Required for AVR Teensy (without hardware mods)
* `#define SPLIT_USB_TIMEOUT 2000`
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
@ -308,6 +325,34 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_TIMEOUT_POLL 10`
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
* `#define FORCED_SYNC_THROTTLE_MS 100`
* Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
* `#define SPLIT_TRANSPORT_MIRROR`
* Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
* `#define SPLIT_LAYER_STATE_ENABLE`
* Ensures the current layer state is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_LED_STATE_ENABLE`
* Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_MODS_ENABLE`
* Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_WPM_ENABLE`
* Ensures the current WPM is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_OLED_ENABLE`
* Syncs the on/off state of the OLED between the halves.
* `#define SPLIT_ST7565_ENABLE`
* Syncs the on/off state of the ST7565 screen between the halves.
* `#define SPLIT_TRANSACTION_IDS_KB .....`
* `#define SPLIT_TRANSACTION_IDS_USER .....`
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
# The `rules.mk` File
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
@ -352,8 +397,8 @@ However, this will automatically disable the legacy TMK Macros and Functions fea
* `qmk-dfu`
* `halfkay`
* `caterina`
* `bootloadHID`
* `USBasp`
* `bootloadhid`
* `usbasploader`
## Feature Options :id=feature-options
@ -375,6 +420,8 @@ Use these to enable or disable building certain features. The more you have enab
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
* `AUDIO_ENABLE`
* Enable the audio subsystem.
* `KEY_OVERRIDE_ENABLE`
* Enable the key override feature
* `RGBLIGHT_ENABLE`
* Enable keyboard underlight functionality
* `LEADER_ENABLE`


+ 61
- 0
docs/configurator_architecture.md View File

@ -0,0 +1,61 @@
# QMK Configurator Architecture
This page describes the web architecture behind QMK Configurator at a high level. If you are interested in the architecture of the QMK Configurator code itself you should start at the [qmk_configurator](https://github.com/qmk/qmk_configurator) repository.
# Overview
![QMK Configurator Architecture Diagram](configurator_diagram.svg)
# Detailed Description
QMK Configurator is a [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application) that allows users to create custom keymaps for their QMK-compatible keyboard. They can export JSON representation of their keymaps and compile firmware binaries that can be flashed to their keyboard using a tool like [QMK Toolbox](https://github.com/qmk/qmk_toolbox).
Configurator gets metadata about keyboards from the Keyboard Metadata store and submits compile requests to the QMK API. The results of those compile requests will be made available on [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces/), an S3-compatible data store.
## Configurator Frontend
Address: <https://config.qmk.fm>
The [Configurator Frontend](https://config.qmk.fm) is compiled into a set of static files that are served by Github Pages. This action happens every time a commit is pushed to the [qmk_configurator `master`](https://github.com/qmk/qmk_configurator) branch. You can view the status of these jobs on the [qmk_configurator actions tab](https://github.com/qmk/qmk_configurator/actions/workflows/build.yml).
## Keyboard Metadata
Address: <https://keyboards.qmk.fm>
The Keyboard Metadata is generated every time a keyboard in [qmk_firmware](https://github.com/qmk/qmk_firmware) changes. The resulting JSON files are uploaded to Spaces and used by Configurator to generate UI for each keyboard. You can view the status of this job on the [qmk_firmware actions tab](https://github.com/qmk/qmk_firmware/actions/workflows/api.yml). If you are a QMK Collaborator you can manually run this job using the `workflow_dispatch` event trigger.
## QMK API
Address: <http://api.qmk.fm>
The QMK API accepts `keymap.json` files for compilation. These are the same files you can use directly with `qmk compile` and `qmk flash`. When a `keymap.json` is submitted the browser will poll the status of the job periodically (every 2 seconds or longer, preferably) until the job has completed. The final status JSON will contain pointers to source and binary downloads for the keymap.
QMK API always presents the source and binary downloads side-by-side to comply with the GPL.
There are 3 non-error status responses from the API-
1. Compile Job Queued
2. Compile Job Running
3. Compile Job Finished
### Compile Job Queued
This status indicates that the job has not yet been picked up by a [QMK Compiler](#qmk-compiler) node. Configurator shows this status as "Waiting for an oven".
### Compile Job Running
This status indicates that the job has started compiling. Configurator shows this status as "Baking".
### Compile Job Finished
This status indicates that the job has completed. There will be keys in the status JSON for source and binary downloads.
## Redis/RQ
QMK API uses RQ to distribute jobs to the available [QMK Compiler](#qmk-compiler) nodes. When a `keymap.json` is received it's put into the RQ queue, where a `qmk_compiler` node will pick it up from.
## QMK Compiler
[QMK Compiler](https://github.com/qmk/qmk_compiler) is what actually performs the compilation of the `keymap.json`. It does so by checking out the requested `qmk_firmware` branch, running `qmk compile keymap.json`, and then uploading the resulting source and binary to Digital Ocean Spaces.
When users download their source/binary, API will redirect them to the authenticated Spaces download URL.

+ 1
- 0
docs/configurator_diagram.drawio View File

@ -0,0 +1 @@
<mxfile host="Electron" modified="2021-08-09T19:46:29.036Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.6.13 Chrome/89.0.4389.128 Electron/12.0.7 Safari/537.36" etag="PQ2r34UrZa0TfW4Fw0EV" version="14.6.13" type="device"><diagram id="NEtccoSKIy4HskWlhJpu" name="Page-1">5VvbcqM4EP2a1O4+hOLqy2Ni5zKX1CTxzszOU0oG2dZEIBZEYu/XbwuEDQg7csZ2vFlXjQca0RLdR+eohXPiDML5VYLi2Q0LMD2xzWB+4gxPbNvqezb8JywLaTFtr7BMExJI28owIv/gsqG0ZiTAaa0hZ4xyEteNPosi7POaDSUJe643mzBa7zVGU6wYRj6iqvU7CfissPY8c2W/xmQ6K3u2THklRGVjaUhnKGDPFZNzceIMEsZ4cRTOB5iK6JVxKe67XHN1ObAER1znhgfT76Zzxxp3Z49j5+7zjw/z+NSS+XlCNJNPLEfLF2UIcAARkacs4TM2ZRGiFyvrecKyKMCiHxPOVm0+MxaD0QLjT8z5QqYXZZyBacZDKq/iKDgTyYLTiEW4sFwSSqXLAKWz3L9orD64jEXKssTHG57WlQBCyRTzTVGRDsWTV3qQcb3CLMQ8WUCDBFPEyVMdK0hCbrpst8oKHMjEbJEk9+UckTDHcTWm0jQk4RR6pWQM3z4l8QNKuDhkYZxxnKRw/J0ljymHJ2HRg2X35vDPiKPp2kA/4YTj+cbIyKunjmv0zMpHeljSQXH6XJla0jSrzKrStvPIei9Hdgm9HNoZpyTCgyXZmPWYI0qmERz7EDGcgIGiMaa3LCUittULIoQEaOZzo8GYcc7CSoMz6ZKLqXQOJBKLgYXzqSBc4xmPKcy11JgSPsvG0GLCIn6JQkJFiK8xfcLCjbwgJyDM+uJ8wChL8ud0ivSILnjCHnHblQlMyIp9kn/ADkMJCK55G14OL4YXmybrFhhyOzXQtKEGdMVwVeBUzDvHTjmKjdS54jWfojQlfpP3YCR/CRwZXnn6o3ptOJcgK84W8gwma8JVz7lZ0qZVI9Ff401PkzddTdqsJM5rme6lTZtdZQ+3jMCTLXFjlRkqyaZJI8Vzy7uqytl01Gk4chqOisAojnJYLR/7F5BWTpkV0gZUTDjgbnOUxTEorqCosxO7QyGG5+MEjqbiaDBLoPsTGzo2L0mCJ2yuNhri9FHQi21+iehCAfHzjHA8ilEOkWegnTqGm0QVkiDIVwU5950j/3Garw9Kdsjd7YYZlmurkhlUYrDNFoB19qUnltPCCUW40xhFZcBnnIvl65noTChxNCFT4+/w0ZiEZXOwV+9Qk9bmd0SiKYTeNm+F9AM2RKTX3tno4iN6QiM/IbFYHXz7eqHeOJI8AeM2YbTQDL4fiuFnCeIs0RvmNUt54eWqUK1iwOnaZ28Asr7cfC0894E/q2PYehDs7w2CGqtFdbndqklVRaoI1BpN2tEaXVdryql2JGKzTKiEgvdasXHchqNDi01XAz/vpiK0tOHW0YTbYUpC6/1ULj9TuH0XlWZ93riOuhjotsz/rmf09pWkjpKkuvI/4sWYoSRIG+K/ks9PsgV4ucEcBYgjXV2ekCR8hoiq7a+uoeGZX+RN3PQ1BsdiwXB2+wG+h629rFR7SKDaRPSLj4VIm7n2ptsuG2voPKRIu7Zt9N9apHtbiXRr7VirASVHVgtAc4cFoDZNekclypZnWK5p9Tp9y+v1up1y73nRQMbWBWHdz3LP90ASbav14HuW6L4m9spsHotE95Us3d18Kkm2mS5KSZziik76lGXBy+XNLpTTq8O5Y6rKadkts3Rv27JlZ2uFE8VkrWTeX4z+nGS0DLSeWILDTYp3jyJ/Bqsf2xRrFXP4Bb6+3fy2tegdUuc6pqenct29pVFjkfryDulhtzDLWXskCnbarCtd75WadaoUlpqqBelBi0qzWDRINwzZanTkOObmkTVv8Pq1G+CgGMNuRVSl53csonZXV0R7RyWitrobIasPMMoCRGF4WY807b+PnD+OS3idXh347fuHrdrbt8qWu4+5WpzU1RcE81QocLTwHcMPIiMoUsJEPtI8+obPWqRZRlNK7+kLoqskejut3UWCeg1msh3L6PYrn54qsf2WbO3thYOjrpTeTGK1Oea4ikSQ/EaSX7t1qwiZfeC9W6ft9dO71TSn/D3YS3hz7KPSNEct3+/vlDyVciS2/FLOEnwYSWpskXS7ai3YOSjB2WqwcEDEm+9cjEwRuqaGfGTineJdhrOW3c/2AjApnO6/BNxBkpqVXrfz1pWes91Lx73KkPZ+UTkP31qHyiw26zFt2fEacGiWiPtWHXWNXvwuIIwpETNmDbPhuZhhAcvG+RWrJj3Wm2x99Vt+QXLYrS9XXdAVu4YDCCehIpztbHefRVH+a07dX22sc/efoLy+/daU5+pswh+I8vRXQt3joDyZVbeW015ztaxLgHU3/eZbnT3Tn6uuULYGwoF/z+lo7wYdF16AHes00GuuO/V3Qxui2bP0ULP1bqjTYK5yS2Gvm5vu/6sQ1IVzKa67KwTXEJK3GVu6KLWd14H0ZRjB6eovj4rmqz/gci7+BQ==</diagram></mxfile>

+ 3
- 0
docs/configurator_diagram.svg
File diff suppressed because it is too large
View File


+ 1
- 1
docs/contributing.md View File

@ -148,7 +148,7 @@ Feature and Bug Fix PR's affect all keyboards. We are also in the process of res
Here are some things to keep in mind when working on your feature or bug fix.
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! You should always make sure your changes compile before opening a pull request.
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.


+ 9
- 1
docs/custom_quantum_functions.md View File

@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`
### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides
* GPIO pin initialisation: `void matrix_init_pins(void)`
* This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override.
* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)`
* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
* These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override.
## Keyboard Post Initialization code
@ -374,7 +382,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
```
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic Lite](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
```c
void eeconfig_init_user(void) { // EEPROM is getting reset!


+ 0
- 1
docs/de/README.md View File

@ -1,7 +1,6 @@
# Quantum Mechanical Keyboard Firmware
[![Aktuelle Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)


+ 4
- 4
docs/de/cli.md View File

@ -88,14 +88,14 @@ qmk compile <configuratorExport.json>
qmk compile -kb <keyboard_name> -km <keymap_name>
```
## `qmk cformat`
## `qmk format-c`
Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden.
**Anwendung**:
```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```
## `qmk config`
@ -148,14 +148,14 @@ Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standa
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```
## `qmk pyformat`
## `qmk format-py`
Dieser Befehl formatiert Python-Code in `qmk_firmware`.
**Anwendung**:
```
qmk pyformat
qmk format-py
```
## `qmk pytest`


+ 54
- 33
docs/driver_installation_zadig.md View File

@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have
## 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.
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 Lite](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) 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.
@ -30,48 +30,69 @@ If you find that you can no longer type with the keyboard, you may have accident
![A healthy keyboard as seen by Zadig](https://i.imgur.com/Hx0E5kC.png)
Open the Device Manager and look for a device that looks like your keyboard.
Open the Device Manager, select **View → Devices by container**, and look for an entry with your keyboard's name.
![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/L3wvX8f.png)
![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/o7WLvBl.png)
Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first.
Right-click each entry and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first if it appears.
![The Device Uninstall dialog, with the "delete driver" checkbox ticked](https://i.imgur.com/aEs2RuA.png)
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! Otherwise, repeat the process until Zadig reports the correct driver.
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! Otherwise, repeat this process until Zadig reports the correct driver.
?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver.
## Uninstallation
Uninstallation of bootloader devices is a little more involved than installation.
Open the Device Manager, select **View → Devices by container**, and look for the bootloader device. Match up the USB VID and PID in Zadig with one from [the table below](#list-of-known-bootloaders).
Find the `Inf name` value in the Details tab of the device properties. This should generally be something like `oemXX.inf`:
![Device properties showing the Inf name value](https://i.imgur.com/Bu4mk9m.png)
Then, open a new Command Prompt window as an Administrator (type in `cmd` into the Start menu and press Ctrl+Shift+Enter). Run `pnputil /enum-drivers` to verify the `Inf name` matches the `Published Name` field of one of the entries:
![pnputil output with matching driver highlighted](https://i.imgur.com/3RrSjzW.png)
Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver and remove it from any devices using it. Note that this will not uninstall the device itself.
As with the previous section, this process may need to be repeated multiple times, as multiple drivers can be applicable to the same device.
!> **WARNING:** Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
## List of Known Bootloaders
This is a list of known bootloader devices and their USB vendor and product IDs, as well as the correct driver to assign for flashing with QMK. Note that the usbser and HidUsb drivers are built in to Windows, and cannot be assigned with Zadig - if your device has an incorrect driver, you must use the Device Manager to uninstall it as described in the previous section.
The device name here is the name that appears in Zadig, and may not be what the Device Manager or QMK Toolbox displays.
|Bootloader |Device Name |VID/PID |Driver |
|-------------|------------------------------|--------------|-------|
|`atmel-dfu` |ATmega16u2 DFU |`03EB:2FEF` |libusb0|
|`atmel-dfu` |ATmega32U2 DFU |`03EB:2FF0` |libusb0|
|`atmel-dfu` |ATm16U4 DFU V1.0.2 |`03EB:2FF3` |libusb0|
|`atmel-dfu` |ATm32U4DFU |`03EB:2FF4` |libusb0|
|`atmel-dfu` |*none* (AT90USB64) |`03EB:2FF9` |libusb0|
|`atmel-dfu` |AT90USB128 DFU |`03EB:2FFB` |libusb0|
|`qmk-dfu` |(keyboard name) Bootloader |As `atmel-dfu`|libusb0|
|`halfkay` |*none* |`16C0:0478` |HidUsb |
|`caterina` |Pro Micro 3.3V |`1B4F:9203` |usbser |
|`caterina` |Pro Micro 5V |`1B4F:9205` |usbser |
|`caterina` |LilyPadUSB |`1B4F:9207` |usbser |
|`caterina` |Pololu A-Star 32U4 Bootloader |`1FFB:0101` |usbser |
|`caterina` |Arduino Leonardo |`2341:0036` |usbser |
|`caterina` |Arduino Micro |`2341:0037` |usbser |
|`caterina` |Adafruit Feather 32u4 |`239A:000C` |usbser |
|`caterina` |Adafruit ItsyBitsy 32u4 3V |`239A:000D` |usbser |
|`caterina` |Adafruit ItsyBitsy 32u4 5V |`239A:000E` |usbser |
|`caterina` |Arduino Leonardo |`2A03:0036` |usbser |
|`caterina` |Arduino Micro |`2A03:0037` |usbser |
|`bootloadHID`|HIDBoot |`16C0:05DF` |HidUsb |
|`USBasp` |USBasp |`16C0:05DC` |libusbK|
|`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB |
|`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB |
|`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB |
|`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB |
|Bootloader |Device Name |VID/PID |Driver |
|--------------|------------------------------|--------------|-------|
|`atmel-dfu` |ATmega16u2 DFU |`03EB:2FEF` |libusb0|
|`atmel-dfu` |ATmega32U2 DFU |`03EB:2FF0` |libusb0|
|`atmel-dfu` |ATm16U4 DFU V1.0.2 |`03EB:2FF3` |libusb0|
|`atmel-dfu` |ATm32U4DFU |`03EB:2FF4` |libusb0|
|`atmel-dfu` |*none* (AT90USB64) |`03EB:2FF9` |libusb0|
|`atmel-dfu` |AT90USB128 DFU |`03EB:2FFB` |libusb0|
|`qmk-dfu` |(keyboard name) Bootloader |As `atmel-dfu`|libusb0|
|`halfkay` |*none* |`16C0:0478` |HidUsb |
|`caterina` |Pro Micro 3.3V |`1B4F:9203` |usbser |
|`caterina` |Pro Micro 5V |`1B4F:9205` |usbser |
|`caterina` |LilyPadUSB |`1B4F:9207` |usbser |
|`caterina` |Pololu A-Star 32U4 Bootloader |`1FFB:0101` |usbser |
|`caterina` |Arduino Leonardo |`2341:0036` |usbser |
|`caterina` |Arduino Micro |`2341:0037` |usbser |
|`caterina` |Adafruit Feather 32u4 |`239A:000C` |usbser |
|`caterina` |Adafruit ItsyBitsy 32u4 3V |`239A:000D` |usbser |
|`caterina` |Adafruit ItsyBitsy 32u4 5V |`239A:000E` |usbser |
|`caterina` |Arduino Leonardo |`2A03:0036` |usbser |
|`caterina` |Arduino Micro |`2A03:0037` |usbser |
|`bootloadhid` |HIDBoot |`16C0:05DF` |HidUsb |
|`usbasploader`|USBasp |`16C0:05DC` |libusbK|
|`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB |
|`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB |
|`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB |
|`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB |
|`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb |

+ 31
- 0
docs/easy_maker.md View File

@ -0,0 +1,31 @@
# Easy Maker - Build One-Off Projects In Configurator
Have you ever needed an easy way to program a controller, such as a Proton C or Teensy 2.0, for a one-off project you're building? QMK has you covered with the Easy Maker. Now you can create a firmware in minutes using QMK Configurator.
There are different styles of Easy Maker available depending on your needs:
* [Direct Pin](https://config.qmk.fm/#/?filter=ez_maker/direct) - Connect a single switch to a single pin
* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](feature_backlight.md) control
* Direct Pin + Numlock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED
* Direct Pin + Capslock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED
* Direct Pin + Encoder (Coming Soon) - Like Direct Pin but uses 2 pins to add a single rotary encoder
## Quickstart
The easiest way to get started is with the Direct Pin boards. This will assign a single key to each pin and you can short that pin to ground to activate it. Select your MCU from the Keyboard dropdown here:
* <https://config.qmk.fm/#/?filter=ez_maker/direct>
For more details see the [Direct Pin](#direct-pin) section.
# Direct Pin
As its name implies Direct Pin works by connecting one switch per pin. The other side of the switch should be connected to ground (VSS or GND.) You don't need any other components, your MCU has internal pull-up resistors so that the switch sensing can work.
Here is a schematic showing how we connect a single button to pin A3 on a ProMicro:
![Schematic diagram showing a ProMicro with a wire coming out of A3, connecting to the left side of a switch. Another wire comes out of the right side of the switch to connect to the Ground Plane.](https://i.imgur.com/JcDhZll.png)
Once you have wired your switches you can assign keycodes to each pin and build a firmware by selecting the MCU you are using from the Keyboard dropdown. Use this link to show only Easy Maker Direct Pin:
* <https://config.qmk.fm/#/?filter=ez_maker/direct>

+ 3
- 0
docs/eeprom_driver.md View File

@ -31,6 +31,9 @@ Currently QMK supports 24xx-series chips over I2C. As such, requires a working i
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5
`#define EXTERNAL_EEPROM_WP_PIN` | If defined the WP pin will be toggled appropriately when writing to the EEPROM. | _none_
Some I2C EEPROM manufacturers explicitly recommend against hardcoding the WP pin to ground. This is in order to protect the eeprom memory content during power-up/power-down/brown-out conditions at low voltage where the eeprom is still operational, but the i2c master output might be unpredictable. If a WP pin is configured, then having an external pull-up on the WP pin is recommended.
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`.


+ 0
- 1
docs/es/README.md View File

@ -1,7 +1,6 @@
# Firmware Quantum Mechanical Keyboard
[![Versión actual](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
[![Estado de Build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
[![Estado de la documentación](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![Contribuyentes en GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)


+ 20
- 18
docs/es/hardware_avr.md View File

@ -6,26 +6,28 @@ Si aún no lo has hecho, debes leer las [Pautas de teclados](hardware_keyboard_g
## Añadir tu Teclado AVR a QMK
QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta el archivo `util/new_keyboard.sh`:
QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta `qmk new-keyboard`:
```
$ ./util/new_keyboard.sh
Generating a new QMK keyboard directory
Keyboard Name: mycoolkb
Keyboard Type [avr]:
Your Name [John Smith]:
Copying base template files... done
Copying avr template files... done
Renaming keyboard files... done
Replacing %KEYBOARD% with mycoolkb... done
Replacing %YOUR_NAME% with John Smith... done
Created a new keyboard called mycoolkb.
To start working on things, cd into keyboards/mycoolkb,
or open the directory in your favourite text editor.
$ qmk new-keyboard
Ψ Generating a new QMK keyboard directory
Keyboard Name: mycoolkeeb
Keyboard Type:
1. avr
2. ps2avrgb
Please enter your choice: [1]
Your Name: [John Smith]
Ψ Copying base template files...
Ψ Copying avr template files...
Ψ Renaming keyboard.[ch] to mycoolkeeb.[ch]...
Ψ Replacing %YEAR% with 2021...
Ψ Replacing %KEYBOARD% with mycoolkeeb...
Ψ Replacing %YOUR_NAME% with John Smith...
Ψ Created a new keyboard called mycoolkeeb.
Ψ To start working on things, `cd` into keyboards/mycoolkeeb,
Ψ or open the directory in your preferred text editor.
```
Esto creará todos los archivos necesarios para tu nuevo teclado, y rellenará la configuración con valores predeterminados. Ahora sólo tienes que personalizarlo para tu teclado.


+ 1
- 1
docs/faq_debug.md View File

@ -28,7 +28,7 @@ For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can
Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
## Sending Your Own Debug Messages
## Sending Your Own Debug Messages :id=debug-api
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:


+ 2
- 2
docs/faq_keymap.md View File

@ -5,7 +5,7 @@ This page covers questions people often have about keymaps. If you haven't you s
## What Keycodes Can I Use?
See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available.
Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
Keycodes are actually defined in [quantum/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h).
## What Are the Default Keycodes?
@ -31,7 +31,7 @@ QMK has two features, Bootmagic and Command, which allow you to change the behav
As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here:
* [Bootmagic](feature_bootmagic.md)
* [Bootmagic Lite](feature_bootmagic.md)
* [Command](feature_command.md)
## The Menu Key Isn't Working


+ 21
- 18
docs/feature_advanced_keycodes.md View File

@ -2,24 +2,27 @@
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|Key |Aliases |Description |
|----------|-------------------------------|------------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|Key |Aliases |Description |
|----------|----------------------------------|------------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.


+ 30
- 114
docs/feature_audio.md View File

@ -131,12 +131,14 @@ You can override the default songs by doing something like this in your `config.
```c
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(STARTUP_SOUND)
# define STARTUP_SONG SONG(STARTUP_SOUND)
#endif
```
A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
Additionally, if you with to maintain your own list of songs (such as ones that may be copyrighted) and not have them added to the repo, you can create a `user_song_list.h` file and place it in your keymap (or userspace) folder. This file will be automatically included, it just needs to exist.
To play a custom sound at a particular time, you can define a song like this (near the top of the file):
```c
@ -165,6 +167,32 @@ The available keycodes for audio are:
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
## Audio Config
| Settings | Default | Description |
|---------------------------------|----------------------|-------------------------------------------------------------------------------|
|`AUDIO_PIN` | *Not defined* |Configures the pin that the speaker is connected to. |
|`AUDIO_PIN_ALT` | *Not defined* |Configures the pin for a second speaker or second pin connected to one speaker.|
|`AUDIO_PIN_ALT_AS_NEGATIVE` | *Not defined* |Enables support for one speaker connected to two pins. |
|`AUDIO_INIT_DELAY` | *Not defined* |Enables delay during startup song to accomidate for USB startup issues. |
|`AUDIO_ENABLE_TONE_MULTIPLEXING` | *Not defined* |Enables time splicing/multiplexing to create multiple tones simutaneously. |
|`STARTUP_SONG` | `STARTUP_SOUND` |Plays when the keyboard starts up (audio.c) |
|`GOODBYE_SONG` | `GOODBYE_SOUND` |Plays when you press the RESET key (quantum.c) |
|`AG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press AG_NORM (process_magic.c) |
|`AG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press AG_SWAP (process_magic.c) |
|`CG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press CG_NORM (process_magic.c) |
|`CG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press CG_SWAP (process_magic.c) |
|`MUSIC_ON_SONG` | `MUSIC_ON_SOUND` |Plays when music mode is activated (process_music.c) |
|`MUSIC_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when music mode is deactivated (process_music.c) |
|`MIDI_ON_SONG` | `MUSIC_ON_SOUND` |Plays when midi mode is activated (process_music.c) |
|`MIDI_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when midi mode is deactivated (process_music.c) |
|`CHROMATIC_SONG` | `CHROMATIC_SOUND` |Plays when the chromatic music mode is selected (process_music.c) |
|`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) |
|`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) |
|`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) |
|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c) |
|`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) |
## Tempo
the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that.
The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`.
@ -301,8 +329,7 @@ You can configure the default, min and max frequencies, the stepping and built i
## MIDI Functionality
This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to see what's happening. Enable from the Makefile.
See [MIDI](feature_midi.md)
## Audio Keycodes
@ -319,114 +346,3 @@ This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to s
|`MU_OFF` | |Turns off Music Mode |
|`MU_TOG` | |Toggles Music Mode |
|`MU_MOD` | |Cycles through the music modes |
<!-- FIXME: this formatting needs work
## Audio
```c
#ifdef AUDIO_ENABLE
AU_ON,
AU_OFF,
AU_TOG,
// Music mode on/off/toggle
MU_ON,
MU_OFF,
MU_TOG,
// Music voice iterate
MUV_IN,
MUV_DE,
#endif
```
### Midi
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
MI_ON, // send midi notes when music mode is enabled
MI_OFF, // don't send midi notes when music mode is enabled
#endif
MIDI_TONE_MIN,
MIDI_TONE_MAX
MI_C = MIDI_TONE_MIN,
MI_Cs,
MI_Db = MI_Cs,
MI_D,
MI_Ds,
MI_Eb = MI_Ds,
MI_E,
MI_F,
MI_Fs,
MI_Gb = MI_Fs,
MI_G,
MI_Gs,
MI_Ab = MI_Gs,
MI_A,
MI_As,
MI_Bb = MI_As,
MI_B,
MIDI_TONE_KEYCODE_OCTAVES > 1
where x = 1-5:
MI_C_x,
MI_Cs_x,
MI_Db_x = MI_Cs_x,
MI_D_x,
MI_Ds_x,
MI_Eb_x = MI_Ds_x,
MI_E_x,
MI_F_x,
MI_Fs_x,
MI_Gb_x = MI_Fs_x,
MI_G_x,
MI_Gs_x,
MI_Ab_x = MI_Gs_x,
MI_A_x,
MI_As_x,
MI_Bb_x = MI_As_x,
MI_B_x,
MI_OCT_Nx 1-2
MI_OCT_x 0-7
MIDI_OCTAVE_MIN = MI_OCT_N2,
MIDI_OCTAVE_MAX = MI_OCT_7,
MI_OCTD, // octave down
MI_OCTU, // octave up
MI_TRNS_Nx 1-6
MI_TRNS_x 0-6
MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
MIDI_TRANSPOSE_MAX = MI_TRNS_6,
MI_TRNSD, // transpose down
MI_TRNSU, // transpose up
MI_VEL_x 1-10
MIDI_VELOCITY_MIN = MI_VEL_1,
MIDI_VELOCITY_MAX = MI_VEL_9,
MI_VELD, // velocity down
MI_VELU, // velocity up
MI_CHx 1-16
MIDI_CHANNEL_MIN = MI_CH1
MIDI_CHANNEL_MAX = MI_CH16,
MI_CHD, // previous channel
MI_CHU, // next channel
MI_ALLOFF, // all notes off
MI_SUS, // sustain
MI_PORT, // portamento
MI_SOST, // sostenuto
MI_SOFT, // soft pedal
MI_LEG, // legato
MI_MOD, // modulation
MI_MODSD, // decrease modulation speed
MI_MODSU, // increase modulation speed
#endif // MIDI_ADVANCED
-->

+ 14
- 129
docs/feature_bootmagic.md View File

@ -1,136 +1,15 @@
# Bootmagic
There are three separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality, it is accessed in different ways depending on how your keyboard is configured.
**Bootmagic** is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command, hold down the Bootmagic key and one or more command keys.
**Bootmagic Keycodes** are prefixed with `MAGIC_`, and allow you to access the Bootmagic functionality *after* your keyboard has initialized. To use the keycodes, assign them to your keymap as you would any other keycode.
**Command**, formerly known as **Magic**, is another feature that allows you to control different aspects of your keyboard. While it shares some functionality with Bootmagic, it also allows you to do things that Bootmagic does not, such as printing version information to the console. For more information, see [Command](feature_command.md).
On some keyboards Bootmagic is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with:
```make
BOOTMAGIC_ENABLE = full
```
?> You may see `yes` being used in place of `full`, and this is okay. However, `yes` is deprecated, and ideally `full` (or `lite`) should be used instead.
Additionally, you can use [Bootmagic Lite](#bootmagic-lite) (a scaled down, very basic version of Bootmagic) by adding the following to your `rules.mk` file:
```make
BOOTMAGIC_ENABLE = lite
```
## Hotkeys
Hold down the Bootmagic key (Space by default) and the desired hotkey while plugging in your keyboard. For example, holding Space+`B` should cause it to enter the bootloader.
|Hotkey |Description |
|------------------|---------------------------------------------|
|Escape |Ignore Bootmagic configuration in EEPROM |
|`B` |Enter the bootloader |
|`D` |Toggle debugging over serial |
|`X` |Toggle key matrix debugging |
|`K` |Toggle keyboard debugging |
|`M` |Toggle mouse debugging |
|`L` |Set "Left Hand" for EE_HANDS handedness |
|`R` |Set "Right Hand" for EE_HANDS handedness |
|Backspace |Clear the EEPROM |
|Caps Lock |Toggle treating Caps Lock as Left Control |
|Left Control |Toggle swapping Caps Lock and Left Control |
|Left Alt |Toggle swapping Left Alt and Left GUI |
|Right Alt |Toggle swapping Right Alt and Right GUI |
|Left GUI |Toggle the GUI keys (useful when gaming) |
|<code>&#96;</code>|Toggle swapping <code>&#96;</code> and Escape|
|`\` |Toggle swapping `\` and Backspace |
|`N` |Toggle N-Key Rollover (NKRO) |
|`0` |Make layer 0 the default layer |
|`1` |Make layer 1 the default layer |
|`2` |Make layer 2 the default layer |
|`3` |Make layer 3 the default layer |
|`4` |Make layer 4 the default layer |
|`5` |Make layer 5 the default layer |
|`6` |Make layer 6 the default layer |
|`7` |Make layer 7 the default layer |
## Keycodes :id=keycodes
|Key |Aliases |Description |
|----------------------------------|---------|--------------------------------------------------------------------------|
|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control |
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control |
|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control |
|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control |
|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI |
|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI |
|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI |
|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI |
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides |
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides |
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides |
|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI |
|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI |
|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI |
|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI |
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys |
|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys |
|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap <code>&#96;</code> and Escape |
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <code>&#96;</code> and Escape |
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) |
|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)|
## Configuration
If you would like to change the hotkey assignments for Bootmagic, `#define` these in your `config.h` at either the keyboard or keymap level.
|Define |Default |Description |
|----------------------------------------|-------------|---------------------------------------------------|
|`BOOTMAGIC_KEY_SALT` |`KC_SPACE` |The Bootmagic key |
|`BOOTMAGIC_KEY_SKIP` |`KC_ESC` |Ignore Bootmagic configuration in EEPROM |
|`BOOTMAGIC_KEY_EEPROM_CLEAR` |`KC_BSPACE` |Clear the EEPROM configuration |
|`BOOTMAGIC_KEY_BOOTLOADER` |`KC_B` |Enter the bootloader |
|`BOOTMAGIC_KEY_DEBUG_ENABLE` |`KC_D` |Toggle debugging over serial |
|`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging |
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging |
|`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging |
|`BOOTMAGIC_KEY_EE_HANDS_LEFT` |`KC_L` |Set "Left Hand" for EE_HANDS handedness |
|`BOOTMAGIC_KEY_EE_HANDS_RIGHT` |`KC_R` |Set "Right Hand" for EE_HANDS handedness |
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock |
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control |
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) |
|`BOOTMAGIC_KEY_SWAP_RALT_RGUI` |`KC_RALT` |Toggle swapping Right Alt and Right GUI (for macOS)|
|`BOOTMAGIC_KEY_NO_GUI` |`KC_LGUI` |Toggle the GUI keys (useful when gaming) |
|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC` |`KC_GRAVE` |Toggle swapping <code>&#96;</code> and Escape |
|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH` |Toggle swapping `\` and Backspace |
|`BOOTMAGIC_HOST_NKRO` |`KC_N` |Toggle N-Key Rollover (NKRO) |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_0` |`KC_0` |Make layer 0 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_1` |`KC_1` |Make layer 1 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_2` |`KC_2` |Make layer 2 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_3` |`KC_3` |Make layer 3 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_4` |`KC_4` |Make layer 4 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_5` |`KC_5` |Make layer 5 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_6` |`KC_6` |Make layer 6 the default layer |
|`BOOTMAGIC_KEY_DEFAULT_LAYER_7` |`KC_7` |Make layer 7 the default layer |
# Bootmagic Lite :id=bootmagic-lite
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
The Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button, giving you a way to jump into the bootloader
To enable this version of Bootmagic, you need to enable it in your `rules.mk` with:
On some keyboards Bootmagic Lite is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with:
```make
BOOTMAGIC_ENABLE = lite
BOOTMAGIC_ENABLE = yes
```
?> You may see `lite` being used in place of `yes`.
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
```c
@ -142,11 +21,11 @@ By default, these are set to 0 and 0, which is usually the "ESC" key on a majori
And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key.
!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
!> Using Bootmagic Lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
## Split Keyboards
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. This To do so, add these entries to your `config.h` file:
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. To do so, add these entries to your `config.h` file:
```c
#define BOOTMAGIC_LITE_ROW_RIGHT 4
@ -174,4 +53,10 @@ void bootmagic_lite(void) {
}
```
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
You can additional feature here. For instance, resetting the EEPROM or requiring additional keys to be pressed to trigger Bootmagic Lite. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
## Addenda
To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](keycodes_magic.md).
The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](feature_command.md).

+ 259
- 33
docs/feature_combo.md View File

@ -1,24 +1,39 @@
# Combos
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the combo term would hit `ESC` instead, or have it perform even more complex tasks.
To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`.
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
<!-- At this time, this is necessary -->
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using). It is also possible to not define this and instead set the variable `COMBO_LEN` yourself. There's a trick where we don't need to think about this variable at all. More on this later.
Also, by default, the tapping term for the Combos is set to the same value as `TAPPING_TERM` (200 by default on most boards). But you can specify a different value by defining it in your `config.h`. For instance: `#define COMBO_TERM 300` would set the time out period for combos to 300ms.
Then, your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and it's resulting action.
Then, in your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and its resulting action.
```c
const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
const uint16_t PROGMEM test_combo1[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM test_combo2[] = {KC_C, KC_D, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
COMBO(test_combo1, KC_ESC),
COMBO(test_combo2, LCTL(KC_Z)), // keycodes with modifiers are possible too!
};
```
This will send "Escape" if you hit the A and B keys.
This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys.
As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to fire combos from ModTap keys and LayerTap keys. So in the above example you could have keys `LSFT_T(KC_A)` and `LT(_LAYER, KC_B)` and it would work. So Home Row Mods and Home Row Combos at same time is now a thing!
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
It is also now possible to overlap combos. Before, with the example below both combos would activate when all three keys were pressed. Now only the three key combo will activate.
```c
const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), COMBO_END};
const uint16_t PROGMEM test_combo2[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), KC_C, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
COMBO(test_combo1, KC_ESC)
COMBO(test_combo2, KC_TAB)
};
```
Executing more complex keycodes like ModTaps and LayerTaps is now also possible.
## Examples
@ -27,63 +42,68 @@ If you want to add a list, then you'd use something like this:
```c
enum combos {
AB_ESC,
JK_TAB
JK_TAB,
QW_SFT,
SD_LAYER,
};
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
[AB_ESC] = COMBO(ab_combo, KC_ESC),
[JK_TAB] = COMBO(jk_combo, KC_TAB)
[JK_TAB] = COMBO(jk_combo, KC_TAB),
[QW_SFT] = COMBO(qw_combo, KC_LSFT)
[SD_LAYER] = COMBO(layer_combo, MO(_LAYER)),
};
```
For a more complicated implementation, you can use the `process_combo_event` function to add custom handling.
Additionally, this example shows how you can leave `COMBO_COUNT` undefined.
```c
enum combo_events {
ZC_COPY,
XV_PASTE
EM_EMAIL,
BSPC_LSFT_CLEAR,
COMBO_LENGTH
};
uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead!
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
const uint16_t PROGMEM email_combo[] = {KC_E, KC_M, COMBO_END};
const uint16_t PROGMEM clear_line_combo[] = {KC_BSPC, KC_LSFT, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
[ZC_COPY] = COMBO_ACTION(copy_combo),
[XV_PASTE] = COMBO_ACTION(paste_combo),
combo_t key_combos[] = {
[EM_EMAIL] = COMBO_ACTION(email_combo),
[BSPC_LSFT_CLEAR] = COMBO_ACTION(clear_line_combo),
};
/* COMBO_ACTION(x) is same as COMBO(x, KC_NO) */
void process_combo_event(uint16_t combo_index, bool pressed) {
switch(combo_index) {
case ZC_COPY:
case EM_EMAIL:
if (pressed) {
tap_code16(LCTL(KC_C));
SEND_STRING("john.doe@example.com");
}
break;
case XV_PASTE:
case BSPC_LSFT_CLEAR:
if (pressed) {
tap_code16(LCTL(KC_V));
tap_code16(KC_END);
tap_code16(S(KC_HOME));
tap_code16(KC_BSPC);
}
break;
}
}
```
This will send Ctrl+C if you hit Z and C, and Ctrl+V if you hit X and V. But you could change this to do stuff like change layers, play sounds, or change settings.
## Additional Configuration
This will send "john.doe@example.com" if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings.
If you're using long combos, or even longer combos, you may run into issues with this, as the structure may not be large enough to accommodate what you're doing.
It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(<key_array>, <your_custom_keycode>)`.
In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file.
You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`.
## Keycodes
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game.
## Keycodes
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your `keymap.c`
|Keycode |Description |
|----------|---------------------------------|
@ -91,6 +111,187 @@ You can enable, disable and toggle the Combo feature on the fly. This is useful
|`CMB_OFF` |Turns off Combo feature |
|`CMB_TOG` |Toggles Combo feature on and off |
# Advanced Configuration
These configuration settings can be set in your `config.h` file.
## Combo Term
By default, the timeout for the Combos to be recognized is set to 50ms. This can be changed if accidental combo misfires are happening or if you're having difficulties pressing keys at the same time. For instance, `#define COMBO_TERM 40` would set the timeout period for combos to 40ms.
## Buffer and state sizes
If you're using long combos, or you have a lot of overlapping combos, you may run into issues with this, as the buffers may not be large enough to accommodate what you're doing. In this case, you can configure the sizes of the buffers used. Be aware, larger combo sizes and larger buffers will increase memory usage!
To configure the amount of keys a combo can be composed of, change the following:
| Keys | Define to be set |
|------|-----------------------------------|
| 6 | `#define EXTRA_SHORT_COMBOS` |
| 8 | QMK Default |
| 16 | `#define EXTRA_LONG_COMBOS` |
| 32 | `#define EXTRA_EXTRA_LONG_COMBOS` |
Defining `EXTRA_SHORT_COMBOS` combines a combo's internal state into just one byte. This can, in some cases, save some memory. If it doesn't, no point using it. If you do, you also have to make sure you don't define combos with more than 6 keys.
Processing combos has two buffers, one for the key presses, another for the combos being activated. Use the following options to configure the sizes of these buffers:
| Define | Default |
|-------------------------------------|------------------------------------------------------|
| `#define COMBO_KEY_BUFFER_LENGTH 8` | 8 (the key amount `(EXTRA_)EXTRA_LONG_COMBOS` gives) |
| `#define COMBO_BUFFER_LENGTH 4` | 4 |
## Modifier Combos
If a combo resolves to a Modifier, the window for processing the combo can be extended independently from normal combos. By default, this is disabled but can be enabled with `#define COMBO_MUST_HOLD_MODS`, and the time window can be configured with `#define COMBO_HOLD_TERM 150` (default: `TAPPING_TERM`). With `COMBO_MUST_HOLD_MODS`, you cannot tap the combo any more which makes the combo less prone to misfires.
## Per Combo Timing, Holding and Tapping
For each combo, it is possible to configure the time window it has to pressed in, if it needs to be held down, or if it needs to be tapped.
For example, tap-only combos are useful if any (or all) of the underlying keys is a Mod-Tap or a Layer-Tap key. When you tap the combo, you get the combo result. When you press the combo and hold it down, the combo doesn't actually activate. Instead the keys are processed separately as if the combo wasn't even there.
In order to use these features, the following configuration options and functions need to be defined. Coming up with useful timings and configuration is left as an exercise for the reader.
| Config Flag | Function | Description |
|-----------------------------|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| `COMBO_TERM_PER_COMBO` | uint16_t get_combo_term(uint16_t index, combo_t \*combo) | Optional per-combo timeout window. (default: `COMBO_TERM`) |
| `COMBO_MUST_HOLD_PER_COMBO` | bool get_combo_must_hold(uint16_t index, combo_t \*combo) | Controls if a given combo should fire immediately on tap or if it needs to be held. (default: `false`) |
| `COMBO_MUST_TAP_PER_COMBO` | bool get_combo_must_tap(uint16_t index, combo_t \*combo) | Controls if a given combo should fire only if tapped within `COMBO_HOLD_TERM`. (default: `false`) |
Examples:
```c
uint16_t get_combo_term(uint16_t index, combo_t *combo) {
// decide by combo->keycode
switch (combo->keycode) {
case KC_X:
return 50;
}
// or with combo index, i.e. its name from enum.
switch (index) {
case COMBO_NAME_HERE:
return 9001;
}
// And if you're feeling adventurous, you can even decide by the keys in the chord,
// i.e. the exact array of keys you defined for the combo.
// This can be useful if your combos have a common key and you want to apply the
// same combo term for all of them.
if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER
return 150;
}
return COMBO_TERM;
}
bool get_combo_must_hold(uint16_t index, combo_t *combo) {
// Same as above, decide by keycode, the combo index, or by the keys in the chord.
if (KEYCODE_IS_MOD(combo->keycode) ||
(combo->keycode >= QK_MOMENTARY && combo->keycode <= QK_MOMENTARY_MAX) // MO(kc) keycodes
) {
return true;
}
switch (index) {
case COMBO_NAME_HERE:
return true;
}
return false;
}
bool get_combo_must_tap(uint16_t index, combo_t *combo) {
// If you want all combos to be tap-only, just uncomment the next line
// return true
// If you want *all* combos, that have Mod-Tap/Layer-Tap/Momentary keys in its chord, to be tap-only, this is for you:
uint16_t key;
uint8_t idx = 0;
while ((key = pgm_read_word(&combo->keys[idx])) != COMBO_END) {
switch (key) {
case QK_MOD_TAP...QK_MOD_TAP_MAX:
case QK_LAYER_TAP...QK_LAYER_TAP_MAX:
case QK_MOMENTARY...QK_MOMENTARY_MAX:
return true;
}
idx += 1;
}
return false;
}
```
## Variable Length Combos
If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such:
```c
enum myCombos {
...,
COMBO_LENGTH
};
uint16_t COMBO_LEN = COMBO_LENGTH;
```
Regardless of the method used to declare `COMBO_LEN`, this also requires to convert the `combo_t key_combos[COMBO_COUNT] = {...};` line to `combo_t key_combos[] = {...};`.
## Combo timer
Normally, the timer is started on the first key press and then reset on every subsequent key press within the `COMBO_TERM`.
Inputting combos is relaxed like this, but also slightly more prone to accidental misfires.
The next two options alter the behaviour of the timer.
### `#define COMBO_STRICT_TIMER`
With `COMBO_STRICT_TIMER`, the timer is started only on the first key press.
Inputting combos is now less relaxed; you need to make sure the full chord is pressed within the `COMBO_TERM`.
Misfires are less common but if you type multiple combos fast, there is a
chance that the latter ones might not activate properly.
### `#define COMBO_NO_TIMER`
By defining `COMBO_NO_TIMER`, the timer is disabled completely and combos are activated on the first key release.
This also disables the "must hold" functionalities as they just wouldn't work at all.
## Customizable key releases
By defining `COMBO_PROCESS_KEY_RELEASE` and implementing the function `bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode)`, you can run your custom code on each key release after a combo was activated. For example you could change the RGB colors, activate haptics, or alter the modifiers.
You can also release a combo early by returning `true` from the function.
Here's an example where a combo resolves to two modifiers, and on key releases the modifiers are unregistered one by one, depending on which key was released.
```c
enum combos {
AB_MODS,
COMBO_LENGTH
};
uint16_t COMBO_LEN = COMBO_LENGTH;
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
combo_t key_combos[] = {
[AB_MODS] = COMBO(ab_combo, LCTL(KC_LSFT)),
};
bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) {
switch (combo_index) {
case AB_MODS:
switch(keycode) {
case KC_A:
unregister_mods(MOD_MASK_CTRL);
break;
case KC_B:
unregister_mods(MOD_MASK_SHIFT);
break;
}
return false; // do not release combo
}
return false;
}
```
## Layer independent combos
If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer.
With `#define COMBO_ONLY_FROM_LAYER _LAYER_A` the combos' keys are always checked from layer `_LAYER_A` even though the active layer would be `_LAYER_B`.
## User callbacks
In addition to the keycodes, there are a few functions that you can use to set the status, or check it:
@ -101,3 +302,28 @@ In addition to the keycodes, there are a few functions that you can use to set t
| `combo_disable()` | Disables the combo feature, and clears the combo buffer |
| `combo_toggle()` | Toggles the state of the combo feature |
| `is_combo_enabled()` | Returns the status of the combo feature state (true or false) |
# Dictionary Management
Having 3 places to update when adding new combos or altering old ones does become cumbersome when you have a lot of combos. We can alleviate this with some magic! ... If you consider C macros magic.
First, you need to add `VPATH += keyboards/gboards` to your `rules.mk`. Next, include the file `g/keymap_combo.h` in your `keymap.c`.
!> This functionality uses the same `process_combo_event` function as `COMBO_ACTION` macros do, so you cannot use the function yourself in your keymap. Instead, you have to define the `case`s of the `switch` statement by themselves within `inject.h`, which `g/keymap_combo.h` will then include into the function.
Then, write your combos in `combos.def` file in the following manner:
```c
// name result chord keys
COMB(AB_ESC, KC_ESC, KC_A, KC_B)
COMB(JK_TAB, KC_TAB, KC_J, KC_K)
COMB(JKL_SPC, KC_SPC, KC_J, KC_K, KC_L)
COMB(BSSL_CLR, KC_NO, KC_BSPC, KC_LSFT) // using KC_NO as the resulting keycode is the same as COMBO_ACTION before.
COMB(QW_UNDO, C(KC_Z), KC_Q, KC_W)
SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the given string.
...
```
Now, you can update only one place to add or alter combos. You don't even need to remember to update the `COMBO_COUNT` or the `COMBO_LEN` variables at all. Everything is taken care of. Magic!
For small to huge ready made dictionaries of combos, you can check out http://combos.gboards.ca/.

+ 1
- 1
docs/feature_command.md View File

@ -1,6 +1,6 @@
# Command
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md#keycodes). Wherever possible we encourage you to use that feature instead of Command.
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Magic Keycodes](keycodes_magic.md). Wherever possible we encourage you to use that feature instead of Command.
On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`:


+ 2
- 19
docs/feature_debounce_type.md View File

@ -92,15 +92,6 @@ susceptible to noise, you must choose a debounce method that will also mitigate
## Debounce algorithms supported by QMK
QMK supports multiple debounce algorithms through its debounce API.
The logic for which debounce method called is below. It checks various defines that you have set in ```rules.mk```
```
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
DEBOUNCE_TYPE?= sym_defer_g
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
endif
```
### Debounce selection
@ -121,16 +112,16 @@ DEBOUNCE_TYPE = <name of algorithm>
Where name of algorithm is one of:
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
### A couple algorithms that could be implemented in the future:
* ```sym_defer_pr```
* ```sym_eager_g```
* ```asym_eager_defer_pk```
### Use your own debouncing code
You have the option to implement you own debouncing algorithm. To do this:
@ -140,11 +131,3 @@ You have the option to implement you own debouncing algorithm. To do this:
* Debouncing occurs after every raw matrix scan.
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce```
### Old names
The following old names for existing algorithms will continue to be supported, however it is recommended to use the new names instead.
* sym_g - old name for sym_defer_g
* eager_pk - old name for sym_eager_pk
* sym_pk - old name for sym_defer_pk
* eager_pr - old name for sym_eager_pr

+ 35
- 0
docs/feature_digitizer.md View File

@ -0,0 +1,35 @@
## Digitizer
The digitizer HID interface allows setting the mouse cursor position at absolute coordinates, unlike the Pointing Device feature that applies relative displacements.
To enable the digitizer interface, add the following line to your rules.mk:
```makefile
DIGITIZER_ENABLE = yes
```
In order to change the mouse cursor position from your keymap.c file, include the digitizer header :
```c
#include "digitizer.h"
```
This gives you access to the `digitizer` structure which members allow you to change the cursor position.
The coordinates are normalized, meaning there value must be set between 0 and 1. For the `x` coordinate, the value `0` is the leftmost position, whereas the value `1` is the rightmost position.
For the `y` coordinate, `0` is at the top and `1` at the bottom.
Here is an example setting the cursor in the middle of the screen:
```c
digitizer_t digitizer;
digitizer.x = 0.5;
digitizer.y = 0.5;
digitizer.tipswitch = 0;
digitizer.inrange = 1;
digitizer_set_report(digitizer);
```
The `tipswitch` member triggers what equates to a click when set to `1`. The `inrange` member is required for the change in coordinates to be taken. It can then be set to `0` in a new report to signal the end of the digitizer interaction, but it is not strictly required.
Once all members are set to the desired value, the `status` member needs its bitmask `DZ_UPDATED` to be set so the report is sent during the next main loop iteration.

+ 12
- 7
docs/feature_dip_switch.md View File

@ -9,6 +9,8 @@ and this to your `config.h`:
```c
// Connects each switch in the dip switch to the GPIO pin of the MCU
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
// For split keyboards, you can separately define the right side pins
#define DIP_SWITCH_PINS_RIGHT { ... }
```
or
@ -23,8 +25,9 @@ or
The callback functions can be inserted into your `<keyboard>.c`:
```c
void dip_switch_update_kb(uint8_t index, bool active) {
dip_switch_update_user(index, active);
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) { return false; }
return true;
}
```
@ -32,7 +35,7 @@ void dip_switch_update_kb(uint8_t index, bool active) {
or `keymap.c`:
```c
void dip_switch_update_user(uint8_t index, bool active) {
bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) { audio_on(); } else { audio_off(); }
@ -57,6 +60,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
return true;
}
```
@ -64,8 +68,9 @@ Additionally, we support bit mask functions which allow for more complex handlin
```c
void dip_switch_update_mask_kb(uint32_t state) {
dip_switch_update_mask_user(state);
bool dip_switch_update_mask_kb(uint32_t state) {
if (!dip_switch_update_mask_user(state)) { return false; }
return true;
}
```
@ -73,7 +78,7 @@ void dip_switch_update_mask_kb(uint32_t state) {
or `keymap.c`:
```c
void dip_switch_update_mask_user(uint32_t state) {
bool dip_switch_update_mask_user(uint32_t state) {
if (state & (1UL<<0) && state & (1UL<<1)) {
layer_on(_ADJUST); // C on esc
} else {
@ -89,10 +94,10 @@ void dip_switch_update_mask_user(uint32_t state) {
} else {
layer_off(_TEST_B);
}
return true;
}
```
## Hardware
### Connects each switch in the dip switch to the GPIO pin of the MCU


+ 6
- 0
docs/feature_encoders.md View File

@ -38,6 +38,12 @@ It can also be defined per-encoder, by instead defining:
#define ENCODER_RESOLUTIONS { 4, 2 }
```
For 4× encoders you also can assign default position if encoder skips pulses when it changes direction. For example, if your encoder send high level on both pins by default, define this:
```c
#define ENCODER_DEFAULT_POS 0x3
```
## Split Keyboards
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this:


+ 25
- 1
docs/feature_haptic_feedback.md View File

@ -162,4 +162,28 @@ This will set what sequence HPT_RST will set as the active mode. If not defined,
### DRV2605L Continuous Haptic Mode
This mode sets continuous haptic feedback with the option to increase or decrease strength.
This mode sets continuous haptic feedback with the option to increase or decrease strength.
## Haptic Key Exclusion
The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record)` in haptic.c. This allows a re-definition at the required level with the specific requirement / exclusion.
### NO_HAPTIC_MOD
With the entry of `#define NO_HAPTIC_MOD` in config.h, modifiers from Left Control to Right GUI will not trigger a feedback. This also includes modifiers in a Mod Tap configuration.
### NO_HAPTIC_FN
With the entry of `#define NO_HAPTIC_FN` in config.h, layer keys will not rigger a feedback.
### NO_HAPTIC_ALPHA
With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback.
### NO_HAPTIC_PUNCTUATION
With the entry of `#define NO_HAPTIC_PUNCTUATION` in config.h, none of the following keys will trigger a feedback: Enter, ESC, Backspace, Space, Minus, Equal, Left Bracket, Right Bracket, Backslash, Non-US Hash, Semicolon, Quote, Grave, Comma, Slash, Dot, Non-US Backslash.
### NO_HAPTIC_LOCKKEYS
With the entry of `#define NO_HAPTIC_LOCKKEYS` in config.h, none of the following keys will trigger a feedback: Caps Lock, Scroll Lock, Num Lock.
### NO_HAPTIC_NAV
With the entry of `#define NO_HAPTIC_NAV` in config.h, none of the following keys will trigger a feedback: Print Screen, Pause, Insert, Delete, Page Down, Page Up, Left Arrow, Up Arrow, Right Arrow, Down Arrow, End, Home.
### NO_HAPTIC_NUMERIC
With the entry of `#define NO_HAPTIC_NUMERIC` in config.h, none of the following keys between 0 and 9 (KC_1 ... KC_0) will trigger a feedback.

+ 2
- 3
docs/feature_joystick.md View File

@ -2,8 +2,6 @@
The keyboard can be made to be recognized as a joystick HID device by the operating system.
This is enabled by adding `JOYSTICK_ENABLE` to `rules.mk`. You can set this value to `analog`, `digital`, or `no`.
!> Joystick support is not currently available on V-USB devices.
The joystick feature provides two services:
@ -18,7 +16,8 @@ or send gamepad reports based on values computed by the keyboard.
To use analog input you must first enable it in `rules.mk`:
```makefile
JOYSTICK_ENABLE = analog
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog # or 'digital'
```
An analog device such as a potentiometer found on a gamepad's analog axes is based on a [voltage divider](https://en.wikipedia.org/wiki/Voltage_divider).


+ 229
- 0
docs/feature_key_overrides.md View File

@ -0,0 +1,229 @@
# Key Overrides
Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report.
You can use key overrides in a similar way to momentary layer/fn keys to activate custom keycodes/shortcuts, with a number of benefits: You completely keep the original use of the modifier keys, while being able to save space by removing fn keys from your keyboard. You can also easily configure _combinations of modifiers_ to trigger different actions than individual modifiers, and much more. The possibilities are quite vast and this documentation contains a few examples for inspiration throughout.
##### A few more examples to get started: You could use key overrides to...
- Send `brightness up/down` when pressing `ctrl` + `volume up/down`.
- Send `delete` when pressing `shift` + `backspace`.
- Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed.
- Run custom code when `ctrl` + `alt` + `esc` is pressed.
## Setup
To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`.
Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`).
## Creating Key Overrides
The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers:
#### `ko_make_basic(modifiers, key, replacement)`
Returns a `key_override_t`, which sends `replacement` (can be a key-modifer combination), when `key` and `modifiers` are all pressed down. This override still activates if any additional modifiers not specified in `modifiers` are also pressed down. See `ko_make_with_layers_and_negmods` to customize this behavior.
#### `ko_make_with_layers(modifiers, key, replacement, layers)`
Additionally takes a bitmask `layers` that defines on which layers the override is used.
#### `ko_make_with_layers_and_negmods(modifiers, key, replacement, layers, negative_mods)`
Additionally takes a bitmask `negative_mods` that defines which modifiers may not be pressed for this override to activate.
#### `ko_make_with_layers_negmods_and_options(modifiers, key, replacement, layers, negative_mods, options)`
Additionally takes a bitmask `options` that specifies additional options. See `ko_option_t` for available options.
For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples.
## Simple Example
This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized:
```c
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE);
// This globally defines all key overrides to be used
const key_override_t **key_overrides = (const key_override_t *[]){
&delete_key_override,
NULL // Null terminate the array of overrides!
};
```
## Intermediate Difficulty Examples
### Media Controls & Screen Brightness
In this example a single key is configured to control media, volume and screen brightness by using key overrides.
- The key is set to send `play/pause` in the keymap.
The following key overrides will be configured:
- `Ctrl` + `play/pause` will send `next track`.
- `Ctrl` + `Shift` + `play/pause` will send `previous track`.
- `Alt` + `play/pause` will send `volume up`.
- `Alt` + `Shift` + `play/pause` will send `volume down`.
- `Ctrl` + `Alt` + `play/pause` will send `brightness up`.
- `Ctrl` + `Alt` + `Shift` + `play/pause` will send `brightness down`.
```c
const key_override_t next_track_override =
ko_make_with_layers_negmods_and_options(
MOD_MASK_CTRL, // Trigger modifiers: ctrl
KC_MPLY, // Trigger key: play/pause
KC_MNXT, // Replacement key
~0, // Activate on all layers
MOD_MASK_SA, // Do not activate when shift or alt are pressed
ko_option_no_reregister_trigger); // Specifies that the play key is not registered again after lifting ctrl
const key_override_t prev_track_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CS, KC_MPLY,
KC_MPRV, ~0, MOD_MASK_ALT, ko_option_no_reregister_trigger);
const key_override_t vol_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_ALT, KC_MPLY,
KC_VOLU, ~0, MOD_MASK_CS, ko_option_no_reregister_trigger);
const key_override_t vol_down_override = ko_make_with_layers_negmods_and_options(MOD_MASK_SA, KC_MPLY,
KC_VOLD, ~0, MOD_MASK_CTRL, ko_option_no_reregister_trigger);
const key_override_t brightness_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CA, KC_MPLY,
KC_BRIU, ~0, MOD_MASK_SHIFT, ko_option_no_reregister_trigger);
const key_override_t brightness_down_override = ko_make_basic(MOD_MASK_CSA, KC_MPLY, KC_BRID);
// This globally defines all key overrides to be used
const key_override_t **key_overrides = (const key_override_t *[]){
&next_track_override,
&prev_track_override,
&vol_up_override,
&vol_down_override,
&brightness_up_override,
&brightness_down_override,
NULL
};
```
### Flexible macOS-friendly Grave Escape
The [Grave Escape feature](feature_grave_esc.md) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc.md#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS.
```c
// Shift + esc = ~
const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE));
// GUI + esc = `
const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE);
const key_override_t **key_overrides = (const key_override_t *[]){
&tilde_esc_override,
&grave_esc_override,
NULL
};
```
In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``.
## Advanced Examples
### Modifiers as Layer Keys
Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here.
```c
// This is called when the override activates and deactivates. Enable the fn layer on activation and disable on deactivation
bool momentary_layer(bool key_down, void *layer) {
if (key_down) {
layer_on((uint8_t)(uintptr_t)layer);
} else {
layer_off((uint8_t)(uintptr_t)layer);
}
return false;
}
const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
.layers = ~(1 << LAYER_FN), //
.suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
.options = ko_option_no_unregister_on_other_key_down, //
.negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL)), //
.custom_action = momentary_layer, //
.context = (void *)LAYER_FN, //
.trigger = KC_NO, //
.replacement = KC_NO, //
.enabled = NULL};
```
## Keycodes
You can enable, disable and toggle all key overrides on the fly.
|Keycode |Description |Function Equivalent|
|----------|---------------------------------|--------|
|`KEY_OVERRIDE_ON` |Turns on Key Override feature | `key_override_on(void)`|
|`KEY_OVERRIDE_OFF` |Turns off Key Override feature |`key_override_off(void)`|
|`KEY_OVERRIDE_TOGGLE` |Toggles Key Override feature on and off |`key_override_toggle(void)`|
## Reference for `key_override_t`
Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`.
| Member | Description |
|--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `uint16_t trigger` | The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (`trigger_mods`) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to `KC_NO` to require only the necessary modifiers to be pressed and no non-modifier. |
| `uint8_t trigger_mods` | Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the `MOD_MASK_XXX` and `MOD_BIT()` macros for this. |
| `layer_state_t layers` | This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit `(1 << i)`. |
| `uint8_t negative_mod_mask` | Which modifiers cannot be down. It must hold that `(active_modifiers & negative_mod_mask) == 0`, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true. |
| `uint8_t suppressed_mods` | Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example. |
| `uint16_t replacement` | The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. `C(KC_A)`), or `KC_NO` (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent. |
| `ko_option_t options` | Options controlling the behavior of the override, such as what actions are allowed to activate the override. |
| `bool (*custom_action)(bool activated, void *context)` | If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally. |
| `void *context` | A context that will be passed to the custom action function. |
| `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. |
### Reference for `ko_option_t`
Bitfield with various options controlling the behavior of a key override.
| Value | Description |
|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `ko_option_activation_trigger_down` | Allow activating when the trigger key is pressed down. |
| `ko_option_activation_required_mod_down` | Allow activating when a necessary modifier is pressed down. |
| `ko_option_activation_negative_mod_up` | Allow activating when a negative modifier is released. |
| `ko_option_one_mod` | If set, any of the modifiers in `trigger_mods` will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in `trigger_mods` have to be pressed (logical AND of modifiers). |
| `ko_option_no_unregister_on_other_key_down` | If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. |
| `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. |
| `ko_options_default` | The default options used by the `ko_make_xxx` functions |
## For Advanced Users: Inner Workings
This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides.
#### Activation
When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed.
Overrides can activate in three different cases:
1. The trigger key is pressed down and necessary modifiers are already down.
2. A necessary modifier is pressed down, while the trigger key and other necessary modifiers are already down.
3. A negative modifier is released, while all necessary modifiers and the trigger key are already down.
Use the `option` member to customize which of these events are allowed to activate your overrides (default: all three).
In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`).
#### Deactivation
An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases.
#### Key Repeat Delay
A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed.
This applies equally to releasing a modifier: When you hold `shift`, then press `a`, the letter `A` is typed. Now if you release `shift` first, followed by `a` shortly after, you will not see the letter `a` being typed, even though for a short moment of time you were just holding down the key `a`. This is because no modified characters are typed until the key repeat delay has passed.
This exact behavior is implemented in key overrides as well: If a key override for `shift` + `a` = `b` exists, and `a` is pressed and held, followed by `shift`, you will not immediately see the letter `b` being typed. Instead, this event is deferred for a short moment, until the key repeat delay has passed, measured from the moment when the trigger key (`a`) was pressed down.
The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default.
## Difference to Combos
Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable.

+ 2
- 0
docs/feature_led_indicators.md View File

@ -1,5 +1,7 @@
# LED Indicators
?> Currently, this feature is not supported for split keyboards
QMK provides methods to read 5 of the LEDs defined in the HID spec:
* Num Lock


+ 5
- 30
docs/feature_led_matrix.md View File

@ -52,7 +52,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
@ -63,10 +63,12 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
---
## Common Configuration :id=common-configuration
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
```c
@ -260,7 +262,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
#define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
#define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
#define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
@ -348,30 +350,3 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
LED_MATRIX_INDICATOR_SET_VALUE(index, value);
}
```
## Suspended State :id=suspended-state
To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
Additionally add this to your `<keyboard>.c`:
```c
void suspend_power_down_kb(void) {
led_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
led_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
```
or add this to your `keymap.c`:
```c
void suspend_power_down_user(void) {
led_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_user(void) {
led_matrix_set_suspend_state(false);
}
```

+ 260
- 0
docs/feature_midi.md View File

@ -0,0 +1,260 @@
# MIDI
## Usage
First, enable MIDI by adding the following to your `rules.mk`:
```makefile
MIDI_ENABLE = yes
```
There are two MIDI systems in QMK: basic and advanced. With basic MIDI you will only be able to send Note On and Note Off messages using the note keycodes, meaning that keycodes like `MI_OCTU` and `MI_OCTD` will not work. Advanced MIDI allows you to do things like octave shifts, channel changes, velocity changes, modulation, and more.
### Basic MIDI
To enable basic MIDI, add the following to your `config.h`:
```c
#define MIDI_BASIC
```
### Advanced MIDI
To enable advanced MIDI, add the following to your `config.h`:
```c
#define MIDI_ADVANCED
```
#### Sending Control Change (CC) Messages
If you're aiming to emulate the features of something like a Launchpad or other MIDI controller you'll need to access the internal MIDI device directly.
Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](feature_macros.md) if you want to use them in your keymap directly using `process_record_user()`.
For reference of all the possible control code numbers see [MIDI Specification](#midi-specification)
#### Example code for using Generic On Off Switches as per MIDI Specification.
```c
#include QMK_KEYBOARD_H
extern MidiDevice midi_device;
// MIDI CC codes for generic on/off switches (80, 81, 82, 83)
// Off: 0-63
// On: 64-127
#define MIDI_CC_OFF 0
#define MIDI_CC_ON 127
enum custom_keycodes {
MIDI_CC80 = SAFE_RANGE,
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MIDI_CC80:
if (record->event.pressed) {
midi_send_cc(&midi_device, midi_config.channel, 80, ON);
} else {
midi_send_cc(&midi_device, midi_config.channel, 80, OFF);
}
return true;
}
return true;
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
// ...
MIDI_CC80,
// ...
)
};
```
### Keycodes
|Keycode |Aliases |Description |
|------------|---------|---------------------------------|
|`MI_ON` | |Turn MIDI on |
|`MI_OFF` | |Turn MIDI off |
|`MI_TOG` | |Toggle MIDI enabled |
|`MI_C` | |C octave 0 |
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 |
|`MI_D` | |D octave 0 |
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 |
|`MI_E` | |E octave 0 |
|`MI_F` | |F octave 0 |
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 |
|`MI_G` | |G octave 0 |
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 |
|`MI_A` | |A octave 0 |
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 |
|`MI_B` | |B octave 0 |
|`MI_C_1` | |C octave 1 |
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 |
|`MI_D_1` | |D octave 1 |
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 |
|`MI_E_1` | |E octave 1 |
|`MI_F_1` | |F octave 1 |
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 |
|`MI_G_1` | |G octave 1 |
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 |
|`MI_A_1` | |A octave 1 |
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 |
|`MI_B_1` | |B octave 1 |
|`MI_C_2` | |C octave 2 |
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 |
|`MI_D_2` | |D octave 2 |
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 |
|`MI_E_2` | |E octave 2 |
|`MI_F_2` | |F octave 2 |
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 |
|`MI_G_2` | |G octave 2 |
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 |
|`MI_A_2` | |A octave 2 |
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 |
|`MI_B_2` | |B octave 2 |
|`MI_C_3` | |C octave 3 |
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 |
|`MI_D_3` | |D octave 3 |
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 |
|`MI_E_3` | |E octave 3 |
|`MI_F_3` | |F octave 3 |
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 |
|`MI_G_3` | |G octave 3 |
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 |
|`MI_A_3` | |A octave 3 |
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 |
|`MI_B_3` | |B octave 3 |
|`MI_C_4` | |C octave 4 |
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 |
|`MI_D_4` | |D octave 4 |
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 |
|`MI_E_4` | |E octave 4 |
|`MI_F_4` | |F octave 4 |
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 |
|`MI_G_4` | |G octave 4 |
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 |
|`MI_A_4` | |A octave 4 |
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 |
|`MI_B_4` | |B octave 4 |
|`MI_C_5` | |C octave 5 |
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 |
|`MI_D_5` | |D octave 5 |
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 |
|`MI_E_5` | |E octave 5 |
|`MI_F_5` | |F octave 5 |
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 |
|`MI_G_5` | |G octave 5 |
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 |
|`MI_A_5` | |A octave 5 |
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 |
|`MI_B_5` | |B octave 5 |
|`MI_OCT_N2` | |Set octave to -2 |
|`MI_OCT_N1` | |Set octave to -1 |
|`MI_OCT_0` | |Set octave to 0 |
|`MI_OCT_1` | |Set octave to 1 |
|`MI_OCT_2` | |Set octave to 2 |
|`MI_OCT_3` | |Set octave to 3 |
|`MI_OCT_4` | |Set octave to 4 |
|`MI_OCT_5` | |Set octave to 5 |
|`MI_OCT_6` | |Set octave to 6 |
|`MI_OCT_7` | |Set octave to 7 |
|`MI_OCTD` | |Move down an octave |
|`MI_OCTU` | |Move up an octave |
|`MI_TRNS_N6`| |Set transposition to -6 semitones|
|`MI_TRNS_N5`| |Set transposition to -5 semitones|
|`MI_TRNS_N4`| |Set transposition to -4 semitones|
|`MI_TRNS_N3`| |Set transposition to -3 semitones|
|`MI_TRNS_N2`| |Set transposition to -2 semitones|
|`MI_TRNS_N1`| |Set transposition to -1 semitone |
|`MI_TRNS_0` | |No transposition |
|`MI_TRNS_1` | |Set transposition to +1 semitone |
|`MI_TRNS_2` | |Set transposition to +2 semitones|
|`MI_TRNS_3` | |Set transposition to +3 semitones|
|`MI_TRNS_4` | |Set transposition to +4 semitones|
|`MI_TRNS_5` | |Set transposition to +5 semitones|
|`MI_TRNS_6` | |Set transposition to +6 semitones|
|`MI_TRNSD` | |Decrease transposition |
|`MI_TRNSU` | |Increase transposition |
|`MI_VEL_0` | |Set velocity to 0 |
|`MI_VEL_1` | |Set velocity to 12 |
|`MI_VEL_2` | |Set velocity to 25 |
|`MI_VEL_3` | |Set velocity to 38 |
|`MI_VEL_4` | |Set velocity to 51 |
|`MI_VEL_5` | |Set velocity to 64 |
|`MI_VEL_6` | |Set velocity to 76 |
|`MI_VEL_7` | |Set velocity to 89 |
|`MI_VEL_8` | |Set velocity to 102 |
|`MI_VEL_9` | |Set velocity to 114 |
|`MI_VEL_10` | |Set velocity to 127 |
|`MI_VELD` | |Decrease velocity |
|`MI_VELU` | |Increase velocity |
|`MI_CH1` | |Set channel to 1 |
|`MI_CH2` | |Set channel to 2 |
|`MI_CH3` | |Set channel to 3 |
|`MI_CH4` | |Set channel to 4 |
|`MI_CH5` | |Set channel to 5 |
|`MI_CH6` | |Set channel to 6 |
|`MI_CH7` | |Set channel to 7 |
|`MI_CH8` | |Set channel to 8 |
|`MI_CH9` | |Set channel to 9 |
|`MI_CH10` | |Set channel to 10 |
|`MI_CH11` | |Set channel to 11 |
|`MI_CH12` | |Set channel to 12 |
|`MI_CH13` | |Set channel to 13 |
|`MI_CH14` | |Set channel to 14 |
|`MI_CH15` | |Set channel to 15 |
|`MI_CH16` | |Set channel to 16 |
|`MI_CHD` | |Decrease channel |
|`MI_CHU` | |Increase channel |
|`MI_ALLOFF` | |Stop all notes |
|`MI_SUS` | |Sustain |
|`MI_PORT` | |Portmento |
|`MI_SOST` | |Sostenuto |
|`MI_SOFT` | |Soft Pedal |
|`MI_LEG` | |Legato |
|`MI_MOD` | |Modulation |
|`MI_MODSD` | |Decrease modulation speed |
|`MI_MODSU` | |Increase modulation speed |
|`MI_BENDD` | |Bend pitch down |
|`MI_BENDU` | |Bend pitch up |
### Configuration
Certain values are stored in the `midi_config` struct. This configuration is not persisted to EEPROM. By default, these values are:
|Configuration |Value|Comments |
|-------------------|-----|-------------------------|
|Octave |`4` |Corresponds to `MI_OCT_2`|
|Transposition |`0` | |
|Velocity |`127`| |
|Channel |`0` | |
|Modulation Interval|`8` | |
For the above, the `MI_C` keycode will produce a C3 (note number 48), and so on.
### References
#### MIDI Specification
* [MIDI.org](https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message)
* [CMU MIDI Programmer's Reference](https://www.cs.cmu.edu/~music/cmsip/readings/MIDI%20tutorial%20for%20programmers.html)
#### QMK C Files
* `quantum/process_keycode/process_midi.c`
* `quantum/quantum_keycodes.h`
* `tmk_core/protocol/midi.h`
* `tmk_core/protocol/midi.c`
* `tmk_core/protocol/qmk_midi.c`
* `tmk_core/protocol/midi_device.h`
<!--
#### QMK Internals (Autogenerated)
* [Internals/MIDI Device Setup Process](internals_midi_device_setup_process.md)
* [Internals/MIDI Device](internals_midi_device.md)
* [Internals/MIDI Util](internals_midi_util.md)
-->

+ 36
- 18
docs/feature_oled_driver.md View File

@ -21,13 +21,23 @@ Hardware configurations using Arm-based microcontrollers or different sizes of O
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```make
OLED_DRIVER_ENABLE = yes
OLED_ENABLE = yes
```
## OLED type
|OLED Driver |Supported Device |
|-------------------|---------------------------|
|SSD1306 (default) |For both SSD1306 and SH1106|
e.g.
```make
OLED_DRIVER = SSD1306
```
Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```c
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
@ -114,7 +124,7 @@ static void fade_display(void) {
In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```c
#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
@ -263,22 +273,11 @@ void oled_write(const char *data, bool invert);
void oled_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
// Useful for moving the screen in preparation for new drawing
// oled_scroll_left or oled_scroll_right should be preferred for all cases of moving a static
// image such as a logo or to avoid burn-in as it's much, much less cpu intensive
void oled_pan(bool left);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
void oled_write_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
void oled_write_ln_P(const char *data, bool invert);
// Returns a pointer to the requested start index in the buffer plus remaining
// buffer length as struct
oled_buffer_reader_t oled_read_raw(uint16_t start_index);
@ -289,13 +288,24 @@ void oled_write_raw(const char *data, uint16_t size);
// Writes a single byte into the buffer at the specified index
void oled_write_raw_byte(const char data, uint16_t index);
// Writes a PROGMEM string to the buffer at current cursor position
void oled_write_raw_P(const char *data, uint16_t size);
// Sets a specific pixel on or off
// Coordinates start at top-left and go right and down for positive x and y
void oled_write_pixel(uint8_t x, uint8_t y, bool on);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
void oled_write_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
void oled_write_ln_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
void oled_write_raw_P(const char *data, uint16_t size);
// Can be used to manually turn on the screen if it is off
// Returns true if the screen was on or turns on
bool oled_on(void);
@ -346,6 +356,14 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);
// Returns true if the oled is currently scrolling, false if it is
// not
bool is_oled_scrolling(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool oled_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t oled_max_chars(void);


+ 36
- 2
docs/feature_ps2_mouse.md View File

@ -50,7 +50,7 @@ In your keyboard config.h:
#endif
```
## Interrupt Version :id=interrupt-version
### Interrupt Version (AVR/ATMega32u4) :id=interrupt-version-avr
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
@ -88,7 +88,31 @@ In your keyboard config.h:
#endif
```
## USART Version :id=usart-version
### Interrupt Version (ARM chibios) :id=interrupt-version-chibios
Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data.
In rules.mk:
```
PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes
```
In your keyboard config.h:
```c
#define PS2_CLOCK A8
#define PS2_DATA A9
```
And in the chibios specifig halconf.h:
```c
#define PAL_USE_CALLBACKS TRUE
```
### USART Version :id=usart-version
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
@ -246,6 +270,16 @@ Fine control over the scrolling is supported with the following defines:
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
```
### Invert Mouse buttons :id=invert-buttons
To invert the left & right buttons you can put:
```c
#define PS2_MOUSE_INVERT_BUTTONS
```
into config.h.
### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes
To invert the X and Y axes you can put:


+ 179
- 47
docs/feature_rgb_matrix.md View File

@ -52,7 +52,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@ -64,7 +64,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
---
### IS31FL3733 :id=is31fl3733
@ -122,7 +122,7 @@ Currently only 4 drivers are supported, but it would be trivial to support all 8
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@ -134,7 +134,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/led/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
---
### IS31FL3737 :id=is31fl3737
@ -145,9 +145,22 @@ There is basic support for addressable RGB matrix lighting with the I2C IS31FL37
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
```
You can use between 1 and 2 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_2` define for second IC if not present on your keyboard.
Configure the hardware via your `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
Here is an example using 2 drivers.
```c
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@ -159,19 +172,21 @@ Configure the hardware via your `config.h`:
// ADDR represents A3:A0 of the 7-bit address.
// The result is: 0b101(ADDR)
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_ADDR_2 0b1010001
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 64
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_1_LED_TOTAL 30
#define DRIVER_2_LED_TOTAL 36
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
```
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1`
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@ -183,7 +198,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/led/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0`, `1` for now).
---
@ -227,8 +242,79 @@ Configure the hardware via your `config.h`:
#define DRIVER_LED_TOTAL 70
```
---
### AW20216 :id=aw20216
There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
```makefile
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = AW20216
```
You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
| `AW_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 |
Here is an example using 2 drivers.
```c
#define DRIVER_1_CS B13
#define DRIVER_2_CS B14
// Hardware enable lines may be connected to the same pin
#define DRIVER_1_EN C13
#define DRIVER_2_EN C13
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 32
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
```
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL] = {
/* Each AW20216 channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive.
* See drivers/awinic/aw20216.h for the mapping between register offsets and
* driver pin locations.
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
{ 0, CS1_SW1, CS2_SW1, CS3_SW1 },
{ 0, CS4_SW1, CS5_SW1, CS6_SW1 },
{ 0, CS7_SW1, CS8_SW1, CS9_SW1 },
{ 0, CS10_SW1, CS11_SW1, CS12_SW1 },
{ 0, CS13_SW1, CS14_SW1, CS15_SW1 },
...
{ 1, CS1_SW1, CS2_SW1, CS3_SW1 },
{ 1, CS13_SW1, CS14_SW1, CS15_SW1 },
{ 1, CS16_SW1, CS17_SW1, CS18_SW1 },
{ 1, CS4_SW2, CS5_SW2, CS6_SW2 },
...
};
```
---
## Common Configuration :id=common-configuration
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
```c
@ -483,28 +569,29 @@ For inspiration and examples, check out the built-in effects under `quantum/rgb_
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
|RGB |HSV |
|-------------------|-------------------|
|`RGB_WHITE` |`HSV_WHITE` |
|`RGB_RED` |`HSV_RED` |
|`RGB_CORAL` |`HSV_CORAL` |
|`RGB_ORANGE` |`HSV_ORANGE` |
|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
|`RGB_GOLD` |`HSV_GOLD` |
|`RGB_YELLOW` |`HSV_YELLOW` |
|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
|`RGB_GREEN` |`HSV_GREEN` |
|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
|`RGB_TEAL` |`HSV_TEAL` |
|`RGB_CYAN` |`HSV_CYAN` |
|`RGB_AZURE` |`HSV_AZURE` |
|`RGB_BLUE` |`HSV_BLUE` |
|`RGB_PURPLE` |`HSV_PURPLE` |
|`RGB_MAGENTA` |`HSV_MAGENTA` |
|`RGB_PINK` |`HSV_PINK` |
These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
|RGB |HSV |
|---------------------|---------------------|
|`RGB_AZURE` |`HSV_AZURE` |
|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
|`RGB_BLUE` |`HSV_BLUE` |
|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
|`RGB_CORAL` |`HSV_CORAL` |
|`RGB_CYAN` |`HSV_CYAN` |
|`RGB_GOLD` |`HSV_GOLD` |
|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
|`RGB_GREEN` |`HSV_GREEN` |
|`RGB_MAGENTA` |`HSV_MAGENTA` |
|`RGB_ORANGE` |`HSV_ORANGE` |
|`RGB_PINK` |`HSV_PINK` |
|`RGB_PURPLE` |`HSV_PURPLE` |
|`RGB_RED` |`HSV_RED` |
|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
|`RGB_TEAL` |`HSV_TEAL` |
|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
|`RGB_WHITE` |`HSV_WHITE` |
|`RGB_YELLOW` |`HSV_YELLOW` |
These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Additional `config.h` Options :id=additional-configh-options
@ -622,29 +709,74 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
```
### Suspended state :id=suspended-state
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
Additionally add this to your `<keyboard>.c`:
### Indicator Examples :id=indicator-examples
Caps Lock indicator on alphanumeric flagged keys:
```c
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
for (uint8_t i = led_min; i <= led_max; i++) {
if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) {
rgb_matrix_set_color(i, RGB_RED);
}
}
}
}
```
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
Layer indicator on all flagged keys:
```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i <= led_max; i++) {
switch(get_highest_layer(layer_state|default_layer_state)) {
case RAISE:
rgb_matrix_set_color(i, RGB_BLUE);
break;
case LOWER:
rgb_matrix_set_color(i, RGB_YELLOW);
break;
default:
break;
}
}
}
```
or add this to your `keymap.c`:
#### Examples :id=indicator-examples
This example sets the modifiers to be a specific color based on the layer state. You can use a switch case here, instead, if you would like. This uses HSV and then converts to RGB, because this allows the brightness to be limited (important when using the WS2812 driver).
```c
void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
HSV hsv = {0, 255, 255};
if (layer_state_is(layer_state, 2)) {
hsv = {130, 255, 255};
} else {
hsv = {30, 255, 255};
}
if (hsv.v > rgb_matrix_get_val()) {
hsv.v = rgb_matrix_get_val();
}
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i <= led_max; i++) {
if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
}
```
void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key:
```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(5, 255, 255, 255); // assuming caps lock is at led #5
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(5, 0, 0, 0);
}
}
```

+ 28
- 23
docs/feature_rgblight.md View File

@ -119,7 +119,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight/rgblight.h` there is a contrast table between the old mode number and the current symbol.
### Effect and Animation Toggles
@ -326,9 +326,13 @@ would turn the layer 0 (or 1) on and off again three times when `DEBUG` is press
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
### Retain brightness
Usually lighting layers apply their configured brightness once activated. If you would like lighting layers to retain the currently used brightness (as returned by `rgblight_get_val()`), add `#define RGBLIGHT_LAYERS_RETAIN_VAL` to your `config.h`.
## Functions
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight/rgblight.h) for the full list, but the most commonly used functions include:
### Utility Functions
|Function |Description |
@ -449,26 +453,27 @@ rgblight_sethsv_at(HSV_GREEN, 2); // led 2
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
|RGB |HSV |
|-------------------|-------------------|
|`RGB_WHITE` |`HSV_WHITE` |
|`RGB_RED` |`HSV_RED` |
|`RGB_CORAL` |`HSV_CORAL` |
|`RGB_ORANGE` |`HSV_ORANGE` |
|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
|`RGB_GOLD` |`HSV_GOLD` |
|`RGB_YELLOW` |`HSV_YELLOW` |
|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
|`RGB_GREEN` |`HSV_GREEN` |
|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
|`RGB_TEAL` |`HSV_TEAL` |
|`RGB_CYAN` |`HSV_CYAN` |
|`RGB_AZURE` |`HSV_AZURE` |
|`RGB_BLUE` |`HSV_BLUE` |
|`RGB_PURPLE` |`HSV_PURPLE` |
|`RGB_MAGENTA` |`HSV_MAGENTA` |
|`RGB_PINK` |`HSV_PINK` |
|RGB |HSV |
|---------------------|---------------------|
|`RGB_AZURE` |`HSV_AZURE` |
|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
|`RGB_BLUE` |`HSV_BLUE` |
|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
|`RGB_CORAL` |`HSV_CORAL` |
|`RGB_CYAN` |`HSV_CYAN` |
|`RGB_GOLD` |`HSV_GOLD` |
|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
|`RGB_GREEN` |`HSV_GREEN` |
|`RGB_MAGENTA` |`HSV_MAGENTA` |
|`RGB_ORANGE` |`HSV_ORANGE` |
|`RGB_PINK` |`HSV_PINK` |
|`RGB_PURPLE` |`HSV_PURPLE` |
|`RGB_RED` |`HSV_RED` |
|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
|`RGB_TEAL` |`HSV_TEAL` |
|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
|`RGB_WHITE` |`HSV_WHITE` |
|`RGB_YELLOW` |`HSV_YELLOW` |
```c
rgblight_setrgb(RGB_ORANGE);
@ -477,7 +482,7 @@ rgblight_setrgb_at(RGB_GOLD, 3);
rgblight_sethsv_range(HSV_WHITE, 0, 6);
```
These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Changing the order of the LEDs


+ 140
- 11
docs/feature_split_keyboard.md View File

@ -8,8 +8,7 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
## Compatibility Overview
@ -60,6 +59,7 @@ The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
Note that the total resistance for the connected system should be within spec at 2.2k-10kOhm, with an 'ideal' at 4.7kOhm, regardless of the placement and number.
<img alt="sk-i2c-connection-mono" src="https://user-images.githubusercontent.com/2170248/92297182-92b98580-ef77-11ea-9d7d-d6033914af43.JPG" width="50%"/>
@ -89,7 +89,13 @@ You can configure the firmware to read a pin on the controller to determine hand
#define SPLIT_HAND_PIN B7
```
This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
This behaviour can be flipped by adding this to you `config.h` file:
```c
#define SPLIT_HAND_PIN_LOW_IS_LEFT
```
#### Handedness by Matrix Pin
@ -168,7 +174,7 @@ Because not every split keyboard is identical, there are a number of additional
#define USE_I2C
```
This enables I<sup>2</sup>C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I<sup>2</sup>C-based devices.
This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
```c
#define SOFT_SERIAL_PIN D0
@ -192,20 +198,143 @@ If you're having issues with serial communication, you can change this value, as
* **`5`**: about 20kbps
```c
#define SPLIT_MODS_ENABLE
#define FORCED_SYNC_THROTTLE_MS 100
```
This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
```c
#define SPLIT_MAX_CONNECTION_ERRORS 10
```
This sets the maximum number of failed communication attempts (one per scan cycle) from the master part before it assumes that no slave part is connected. This makes it possible to use a master part without the slave part connected.
Set to 0 to disable the disconnection check altogether.
```c
#define SPLIT_CONNECTION_CHECK_TIMEOUT 500
```
How long (in milliseconds) the master part should block all connection attempts to the slave after the communication has been flagged as disconnected (see `SPLIT_MAX_CONNECTION_ERRORS` above).
This enables transmitting modifier state (normal, weak and oneshot) to the non
primary side of the split keyboard. This adds a few bytes of data to the split
communication protocol and may impact the matrix scan speed when enabled.
The purpose of this feature is to support cosmetic use of modifer state (e.g.
displaying status on an OLED screen).
One communication attempt will be allowed everytime this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again.
Set to 0 to disable this throttling of communications while disconnected. This can save you a couple of bytes of firmware size.
```c
#define SPLIT_TRANSPORT_MIRROR
```
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_LAYER_STATE_ENABLE
```
This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_LED_STATE_ENABLE
```
This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_MODS_ENABLE
```
This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_WPM_ENABLE
```
This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_OLED_ENABLE
```
This enables transmitting the current OLED on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_ST7565_ENABLE
```
This enables transmitting the current ST7565 on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
### Custom data sync between sides :id=custom-data-sync
QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master.
To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_:
```c
// for keyboard-level data sync:
#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B
// or, for user:
#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C
```
These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example:
```c
typedef struct _master_to_slave_t {
int m2s_data;
} master_to_slave_t;
typedef struct _slave_to_master_t {
int s2m_data;
} slave_to_master_t;
void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
const master_to_slave_t *m2s = (const master_to_slave_t*)in_data;
slave_to_master_t *s2m = (slave_to_master_t*)out_data;
s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back
}
void keyboard_post_init_user(void) {
transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler);
}
```
The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled:
```c
void housekeeping_task_user(void) {
if (is_keyboard_master()) {
// Interact with slave every 500ms
static uint32_t last_sync = 0;
if (timer_elapsed32(last_sync) > 500) {
master_to_slave_t m2s = {6};
slave_to_master_t s2m = {0};
if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) {
last_sync = timer_read32();
dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5
} else {
dprint("Slave sync failed!\n");
}
}
}
}
```
!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur.
If only one-way data transfer is needed, helper methods are provided:
```c
bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer);
bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
```
By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required:
```c
// Master to slave:
#define RPC_M2S_BUFFER_SIZE 48
// Slave to master:
#define RPC_S2M_BUFFER_SIZE 48
```
### Hardware Configuration Options


+ 274
- 0
docs/feature_st7565.md View File

@ -0,0 +1,274 @@
# ST7565 LCD Driver
## Supported Hardware
LCD modules using ST7565 driver IC, communicating over SPI.
|Module |IC |Size |Notes |
|------------------------------|-------|------|----------------------------------------------------------|
|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature|
|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment |
## Usage
To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```make
ST7565_ENABLE = yes
```
Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```c
#ifdef ST7565_ENABLE
void st7565_task_user(void) {
// Host Keyboard Layer Status
st7565_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
st7565_write_P(PSTR("Default\n"), false);
break;
case _FN:
st7565_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
st7565_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
st7565_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
#endif
```
## Logo Example
In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example:
```c
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
};
st7565_write_P(qmk_logo, false);
}
```
## Buffer Read Example
For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer.
In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time.
```c
//Setup some mask which can be or'd with bytes to turn off pixels
const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254};
static void fade_display(void) {
//Define the reader structure
display_buffer_reader_t reader;
uint8_t buff_char;
if (random() % 30 == 0) {
srand(timer_read());
// Fetch a pointer for the buffer byte at index 0. The return structure
// will have the pointer and the number of bytes remaining from this
// index position if we want to perform a sequential read by
// incrementing the buffer pointer
reader = st7565_read_raw(0);
//Loop over the remaining buffer and erase pixels as we go
for (uint16_t i = 0; i < reader.remaining_element_count; i++) {
//Get the actual byte in the buffer by dereferencing the pointer
buff_char = *reader.current_element;
if (buff_char != 0) {
st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i);
}
//increment the pointer to fetch a new byte during the next loop
reader.current_element++;
}
}
}
```
## Other Examples
In split keyboards, it is very common to have two displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```c
#ifdef ST7565_ENABLE
display_rotation_t st7565_init_user(display_rotation_t rotation) {
if (!is_keyboard_master()) {
return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand
}
return rotation;
}
void st7565_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a static logo
}
}
#endif
```
## Basic Configuration
|Define |Default |Description |
|------------------------|--------------|-----------------------------------------------------------------------------------------------------|
|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin |
|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin |
|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin |
|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use |
|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts |
|`ST7565_FONT_START` |`0` |The starting character index for custom fonts |
|`ST7565_FONT_END` |`223` |The ending character index for custom fonts |
|`ST7565_FONT_WIDTH` |`6` |The font width |
|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) |
|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.|
|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. |
|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. |
|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. |
## Custom sized displays
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind.
|Define |Default |Description |
|-----------------------|----------|-----------------------------------------------------------------------------------------------------------|
|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. |
|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. |
|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. |
|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. |
|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(ST7565_BLOCK_TYPE) * 8)`.|
|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. |
## API
```c
// Rotation enum values are flags
typedef enum {
DISPLAY_ROTATION_0,
DISPLAY_ROTATION_180
} display_rotation_t;
// Initialize the display, rotating the rendered output based on the define passed in.
// Returns true if the was initialized successfully
bool st7565_init(display_rotation_t rotation);
// Called at the start of st7565_init, weak function overridable by the user
// rotation - the value passed into st7565_init
// Return new display_rotation_t if you want to override default rotation
display_rotation_t st7565_init_user(display_rotation_t rotation);
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
void st7565_clear(void);
// Renders the dirty chunks of the buffer to display
void st7565_render(void);
// Moves cursor to character position indicated by column and line, wraps if out of bounds
// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
void st7565_set_cursor(uint8_t col, uint8_t line);
// Advances the cursor to the next page, writing ' ' if true
// Wraps to the begining when out of bounds
void st7565_advance_page(bool clearPageRemainder);
// Moves the cursor forward 1 character length
// Advance page if there is not enough room for the next character
// Wraps to the begining when out of bounds
void st7565_advance_char(void);
// Writes a single character to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Main handler that writes character data to the display buffer
void st7565_write_char(const char data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
void st7565_write(const char *data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
void st7565_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
void st7565_pan(bool left);
// Returns a pointer to the requested start index in the buffer plus remaining
// buffer length as struct
display_buffer_reader_t st7565_read_raw(uint16_t start_index);
// Writes a string to the buffer at current cursor position
void st7565_write_raw(const char *data, uint16_t size);
// Writes a single byte into the buffer at the specified index
void st7565_write_raw_byte(const char data, uint16_t index);
// Sets a specific pixel on or off
// Coordinates start at top-left and go right and down for positive x and y
void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
void st7565_write_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
void st7565_write_ln_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
void st7565_write_raw_P(const char *data, uint16_t size);
// Can be used to manually turn on the screen if it is off
// Returns true if the screen was on or turns on
bool st7565_on(void);
// Called when st7565_on() turns on the screen, weak function overridable by the user
// Not called if the screen is already on
void st7565_on_user(void);
// Can be used to manually turn off the screen if it is on
// Returns true if the screen was off or turns off
bool st7565_off(void);
// Called when st7565_off() turns off the screen, weak function overridable by the user
// Not called if the screen is already off
void st7565_off_user(void);
// Returns true if the screen is currently on, false if it is
// not
bool st7565_is_on(void);
// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
void st7565_task(void);
// Called at the start of st7565_task, weak function overridable by the user
void st7565_task_user(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool st7565_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t st7565_max_chars(void);
// Returns the maximum number of lines that will fit on the display
uint8_t st7565_max_lines(void);
```

+ 15
- 0
docs/feature_stenography.md View File

@ -128,3 +128,18 @@ As defined in `keymap_steno.h`.
|`STN_RES1`||(GeminiPR only)|
|`STN_RES2`||(GeminiPR only)|
|`STN_PWR`||(GeminiPR only)|
If you do not want to hit two keys with one finger combined keycodes can be used. These are also defined in `keymap_steno.h`, and causes both keys to be reported as pressed or released. To use these keycodes define `STENO_COMBINEDMAP` in your `config.h` file
|Combined key | Key1 | Key 2 |
|---------------|--------|----------|
|STN_S3 | STN_S1 | STN_S2 |
|STN_TKL | STN_TL | STN_KL |
|STN_PWL | STN_PL | STN_WL |
|STN_HRL | STN_HL | STN_RL |
|STN_FRR | STN_FR | STN_RR |
|STN_PBR | STN_PR | STN_BR |
|STN_LGR | STN_LR | STN_GR |
|STN_TSR | STN_TR | STN_SR |
|STN_DZR | STN_DR | STN_ZR |
|STN_AO | STN_A | STN_O |
|STN_EU | STN_E | STN_U |

+ 3
- 1
docs/feature_tap_dance.md View File

@ -50,7 +50,7 @@ The main entry point is `process_tap_dance()`, called from `process_record_quant
This means that you have `TAPPING_TERM` time to tap the key again; you do not have to input all the taps within a single `TAPPING_TERM` timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
Our next stop is `tap_dance_task()`. This handles the timeout of tap-dance keys.
For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
@ -490,6 +490,8 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
layer_on(_MY_LAYER);
}
break;
default:
break;
}
}


+ 1
- 1
docs/feature_velocikey.md View File

@ -13,7 +13,7 @@ EXTRAKEY_ENABLE = yes
VELOCIKEY_ENABLE = yes
```
Then, while using your keyboard, you need to also turn it on with the VLK_TOG keycode, which toggles the feature on and off.
Then, while using your keyboard, you need to also turn it on with the `VLK_TOG` keycode, which toggles the feature on and off.
The following light effects will all be controlled by Velocikey when it is enabled:
- RGB Breathing


+ 2
- 0
docs/feature_wpm.md View File

@ -45,6 +45,7 @@ bool wpm_keycode_user(uint16_t keycode) {
Additionally, if `WPM_ALLOW_COUNT_REGRESSION` is defined, there is the `uint8_t wpm_regress_count(uint16_t keycode)` function that allows you to decrease the WPM. This is useful if you want to be able to penalize certain keycodes (or even combinations).
```c
__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
@ -60,3 +61,4 @@ __attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
return 1;
}
}
```

+ 51
- 5
docs/flashing.md View File

@ -48,7 +48,7 @@ QMK maintains [a fork of the LUFA DFU bootloader](https://github.com/qmk/lufa/tr
//#define QMK_LED E6
//#define QMK_SPEAKER C6
```
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
@ -127,7 +127,7 @@ To ensure compatibility with the USBasploader bootloader, make sure this block i
```make
# Bootloader selection
BOOTLOADER = USBasp
BOOTLOADER = usbasploader
```
Compatible flashers:
@ -153,13 +153,13 @@ To ensure compatibility with the bootloadHID bootloader, make sure this block is
```make
# Bootloader selection
BOOTLOADER = bootloadHID
BOOTLOADER = bootloadhid
```
Compatible flashers:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [bootloadHID CLI](https://www.obdev.at/products/vusb/bootloadhid.html) / `:bootloadHID` target in QMK (recommended command line)
* [bootloadHID CLI](https://www.obdev.at/products/vusb/bootloadhid.html) / `:bootloadhid` target in QMK (recommended command line)
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash)
Flashing sequence:
@ -171,6 +171,52 @@ Flashing sequence:
3. Flash a .hex file
4. Reset the device into application mode (may be done automatically)
### QMK HID
QMK maintains [a fork of the LUFA HID bootloader](https://github.com/qmk/lufa/tree/master/Bootloaders/HID), which uses a USB HID Endpoint for flashing in the way that the PJRC's Teensy Loader flasher and HalfKay bootloader work. Additionally, it performs a simple matrix scan for exiting the bootloader and returning to the application, as well as flashing an LED/making a ticking noise with a speaker when things are happening.
To ensure compatibility with the QMK HID bootloader, make sure this block is present in your `rules.mk`:
```make
# Bootloader selection
BOOTLOADER = qmk-hid
```
To enable the additional features, add the following defines to your `config.h`:
```c
#define QMK_ESC_OUTPUT F1 // COL pin if COL2ROW
#define QMK_ESC_INPUT D5 // ROW pin if COL2ROW
// Optional:
//#define QMK_LED E6
//#define QMK_SPEAKER C6
```
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
To generate this bootloader, use the `bootloader` target, eg. `make planck/rev4:default:bootloader`. To generate a production-ready .hex file (combining QMK and the bootloader), use the `production` target, eg. `make planck/rev4:default:production`.
Compatible flashers:
* TBD
* Currently, you need to either use the [Python script](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp_python), or compile [`hid_bootloader_cli`](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp), from the LUFA repo. Homebrew may (will) have support for this directly (via `brew install qmk/qmk/hid_bootloader_cli`).
Flashing sequence:
1. Enter the bootloader using any of the following methods:
* Press the `RESET` keycode
* Press the `RESET` button on the PCB if available
* short RST to GND quickly
2. Wait for the OS to detect the device
3. Flash a .hex file
4. Reset the device into application mode (may be done automatically)
### `make` Targets
* `:qmk-hid`: Checks every 5 seconds until a DFU device is available, and then flashes the firmware.
## STM32/APM32 DFU
All STM32 and APM32 MCUs, except for F103 (see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted.
@ -252,7 +298,7 @@ Flashing sequence:
## tinyuf2
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill.
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F401/F411 blackpill.
The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.


+ 2
- 2
docs/flashing_bootloadhid.md View File

@ -15,9 +15,9 @@ General flashing sequence:
?> Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed.
To flash via the command line, use the target `:bootloadHID` by executing the following command:
To flash via the command line, use the target `:bootloadhid` by executing the following command:
make <keyboard>:<keymap>:bootloadHID
make <keyboard>:<keymap>:bootloadhid
## GUI Flashing


+ 3
- 4
docs/fr-fr/README.md View File

@ -1,15 +1,14 @@
# Quantum Mechanical Keyboard Firmware
[![Version courante](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
[![Statut du build](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
[![Statut de la doc](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
[![Contributeurs GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![Forks GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
## Qu'est-ce que QMK Firmware?
## Qu'est-ce que QMK Firmware?
QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMKFirmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](https://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](https://olkb.com), le clavier [ErgoDox EZ](https://www.ergodox-ez.com), et pour les [produits Clueboard](https://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé.
QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](https://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](https://olkb.com), le clavier [ErgoDox EZ](https://www.ergodox-ez.com), et pour les [produits Clueboard](https://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé.
## Comment l'obtenir
@ -23,7 +22,7 @@ Avant d'être prêt à compiler vous allez devoir [installer un environnement](f
make planck/rev4:default
Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais «subprojects» ou «folder»). Cette option peut donc être omise:
Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais «subprojects» ou «folder»). Cette option peut donc être omise:
make preonic:default


+ 0
- 1
docs/fr-fr/breaking_changes.md View File

@ -103,5 +103,4 @@ Ceci est fait immédiatement après la fusion de la branche `future` précédent
* [ ] `git push origin future`
* Actions sur GitHub
* [ ] Crée un PR pour `future`
* [ ] S'assurer que Travis ne relève aucun problème
* [ ] Fusion le PR `future`

+ 4
- 4
docs/fr-fr/cli.md View File

@ -85,14 +85,14 @@ qmk compile <configuratorExport.json>
qmk compile -kb <keyboard_name> -km <keymap_name>
```
## `qmk cformat`
## `qmk format-c`
Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques.
**Utilisation**:
```
qmk cformat [file1] [file2] [...] [fileN]
qmk format-c [file1] [file2] [...] [fileN]
```
## `qmk config`
@ -125,14 +125,14 @@ Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```
## `qmk pyformat`
## `qmk format-py`
Cette commande formate le code python dans `qmk_firmware`.
**Utilisation**:
```
qmk pyformat
qmk format-py
```
## `qmk pytest`


+ 1
- 1
docs/fr-fr/contributing.md View File

@ -134,7 +134,7 @@ Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les
Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix.
* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en.
* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats
* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Vous devriez toujours faire gaffe à ce que vos changements compilent avant d'ouvrir une pull request.
* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées.
* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur.


+ 2
- 2
docs/fr-fr/driver_installation_zadig.md View File

@ -9,7 +9,7 @@ Nous vous recommandons d'utiliser l'utilitaire [Zadig](https://zadig.akeo.ie/).
## Installation
Passez votre clavier en mode bootloader, soit en appuyant sur le keycode `RESET` (qui peut se trouver dans un calque différent) ou en appuyant sur le bouton reset qui se trouve en général sous la board. Si votre clavier n'a aucune de ces options, essayez de le brancher en maintenant Escape ou Espace+`B` appuyés (voir la documentation de [Bootmagic](feature_bootmagic.md) pour plus de détails). Certaines boards utilisent [Command](feature_command.md) à la place de Bootmagic. Dans ce cas, vous pouvez entrer en mode bootloader en appuyant, à n'importe quel moment lorsque le clavier est branché, sur les combinaisons de touches Shift Gauche+Shift Droit+`B` ou Shift Gauche+Shift Droit+Escape.
Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut : Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut : Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier.
Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut: Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut: Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier.
Pour mettre un clavier en mode bootloader avec USBaspLoader, appuyez sur le bouton `RESET` tout en maintenant le bouton `BOOT`. Vous pouvez aussi maintenir le bouton `BOOT` en branchant le câble USB.
@ -43,4 +43,4 @@ Cliquez dessus avec le bouton droit et sélectionner **Désinstaller le périph
![Le dialogue Suppression de périphérique, avec la boîte "suppression de pilote" cochée](https://i.imgur.com/aEs2RuA.png)
Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau!
Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau!

+ 1
- 1
docs/fr-fr/faq_build.md View File

@ -20,7 +20,7 @@ Veuillez noter que lancer `make` avec `sudo` est généralement une **mauvaise**
### Règles `udev` pour Linux
Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes:
Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes:
```console
sudo udevadm control --reload-rules


+ 4
- 4
docs/fr-fr/faq_debug.md View File

@ -6,13 +6,13 @@ Cette page détaille diverses questions fréquemment posées par les utilisateur
## `hid_listen` ne reconnaît pas de périphérique
Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire:
Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire:
```
Waiting for device:.........
```
Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message:
Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message:
```
Waiting for new device:.........................
@ -61,7 +61,7 @@ Vous ne voulez probablement pas "briquer" votre clavier, rendre impossible d'éc
- Si votre map de clavier n'inclut pas de RESET, pour entrer en mode DFU, vous devrez appuyer sur le bouton reset du PCB. Cela implique que vous devrez certainement dévisser certaines pièces de votre clavier pour y accéder.
- Modifier les fichiers tmk_core / common peut rendre le clavier inutilisable
- Si un fichier .hex trop large est la cause du problème: `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash n’aura pas été fait et le clavier restera en mode DFU.
- Si un fichier .hex trop large est la cause du problème: `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash n’aura pas été fait et le clavier restera en mode DFU.
- Pour finir, notez que la taille maximale d'un fichier .hex sur un Plank est de 7000h (28672 decimal)
```
@ -118,7 +118,7 @@ Sous Windows, activez l'option `Permettre au périphérique de sortir l'ordinate
Appuyer sur n'importe quelle touche en mode veille devrait sortir l'ordinateur de veille.
## Vous utilisez un Arduino?
## Vous utilisez un Arduino?
**Faites attention au fait que le nommage des pin d'un Arduino diffère de la puce**. Par exemple, la pin `D0` n'est pas `PD0`. Vérifiez le circuit avec la fiche technique.


+ 2
- 2
docs/fr-fr/faq_keymap.md View File

@ -44,7 +44,7 @@ Le premier n'est reconnu que sur macOS, alors que le dernier, `KC_SLEP` et `KC_W
## Modificateur "One Shot"
Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex : `CEtte` à la place de `Cette`. La fonctionnalité «One shot» shift permet de corriger ça.
Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex: `CEtte` à la place de `Cette`. La fonctionnalité «One shot» shift permet de corriger ça.
https://github.com/tmk/tmk_keyboard/issues/67
@ -59,7 +59,7 @@ Pour les touches de modification et les actions de calque, vous devez placer `KC
## Support de touche à verrouillage mécanique
Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](https://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h`:
Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](https://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h`:
```
#define LOCKING_SUPPORT_ENABLE


+ 30
- 30
docs/fr-fr/flashing.md View File

@ -27,15 +27,15 @@ Méthodes de flash compatibles :
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
Ordre des actions:
Ordre des actions:
1. Pressez le keycode `RESET`, ou appuyez sur le bouton physique RESET ou alors créez un contact entre RST et GND.
2. Attendez que l'OS detecte l'appareil.
3. Éffacez la mémoire, cela peut être fait automatiquement.
4. Flasher le fichier .hex.
5. Redémarrez l'appareil en mode «application», cela peut être fait automatiquement.
5. Redémarrez l'appareil en mode «application», cela peut être fait automatiquement.
Alternativement:
Alternativement:
make <keyboard>:<keymap>:dfu
@ -48,11 +48,11 @@ QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de
#define QMK_LED E6
#define QMK_SPEAKER C6
Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère «bootloader» est ajoutée au nom du produit.
Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère «bootloader» est ajoutée au nom du produit.
Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple : `make planck/rev4:default:bootloader`.
Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple: `make planck/rev4:default:bootloader`.
Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple : `make planck/rev4:default:production`.
Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple: `make planck/rev4:default:production`.
### Commandes DFU
@ -67,7 +67,7 @@ Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware
Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina.
Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@ -81,20 +81,20 @@ Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce b
BOOTLOADER = caterina
```
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandée)
* [avrdude](https://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recommandé)
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
Séquence de flash :
Séquence de flash :
1. Pressez la touche avec le keycode `RESET`, ou reliez les ports GND et RST. Vous n'avez que 7 secondes pour flasher une fois que l'opération a été faite.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Attendez que l'appareil redémarre automatiquement.
ou, utilisez:
ou, utilisez:
make <keyboard>:<keymap>:avrdude
@ -111,7 +111,7 @@ Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettr
Halfkay est un protocole ultra-simple développé par PJRC qui utilise HID et qui est fourni avec tous les Teensys après le modèle 2.0.
Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@ -125,24 +125,24 @@ Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce blo
BOOTLOADER = halfkay
```
Flasher compatibles:
Flasher compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée)
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (petit utilitaire ultra simple)
[Teensy Loader en ligne de commande](https://www.pjrc.com/teensy/loader_cli.html) (Outil en ligne de commande recommandé)
Séquence de flash:
Séquence de flash:
1. Pressez la touche du keycode `RESET`, ou reliez les ports RST et GND rapidement. Vous avez ensuite 7 secondes pour réaliser le flash.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
## USBasploader
USBasploader est un bootloader développé par matrixstorm. Il est utilisé sur des processeurs AVR non-USB comme le ATmega328P, qui fonctionne grâce à V-USB.
Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@ -156,24 +156,24 @@ Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que c
BOOTLOADER = USBasp
```
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandé)
* [avrdude](https://www.nongnu.org/avrdude/) avec le programmeur `usbasp`.
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
Séquence de flash:
Séquence de flash:
1. Pressez la touche du keycode `RESET`, ou reliez le port de boot pendant que RST et GND snt reliés. Cela doit être fait très rapidement.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
## BootloadHID
BootloadHID est un bootloader pour les microcontrôleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs.
Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :
Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :
```make
# Bootloader selection
@ -187,50 +187,50 @@ Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que c
BOOTLOADER = bootloadHID
```
Utilitaires de flash compatibles:
Utilitaires de flash compatibles:
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (Utilitaire avec interface graphique recommandé)
* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` avec QMK (utilitaire en ligne de commande recommandé)
Séquence de flash
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
* Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils).
* Verrouillez la touche «Salt» tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier)
* Verrouillez la touche «Salt» tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier)
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
Ou alors:
Ou alors:
make <keyboard>:<keymap>:bootloadHID
## STM32
Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex : STM32F103) mais le processus reste le même.
Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex: STM32F103) mais le processus reste le même.
Pour le moment, aucune variable `BOOTLOADER` n'est nécessaire dans le fichier `rules.mk`.
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (utilitaire en ligne de commande recommandé)
Séquence pour flasher:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
* Utilisez une touche sur laquelle le keycode `RESET` (Cela peut ne pas fonctionner sur les appareils STM32F042)
* Si un circuit de réinitialisation (Reset) est présent alors utilisé le bouton qui lui est dédié.
* Autrement, vous devez réaliser une liaison entre BOOT0 et VCC (en appuyant sur le bouton ou à l'aide d'un pont) puis faire un pont entre RESET et GND et enfin relacher le pont BOOT0.
2. Attendre que l'os détecte l'appareil.
3. Flasher un fichier `.bin`.h
* Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la.
4. Réinitialisez l'appareil en mode «application». Cela peut être fait automatiquement.
* Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé.
4. Réinitialisez l'appareil en mode «application». Cela peut être fait automatiquement.
* Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex: `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé.
### Commandes STM32
Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32  :
Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32:
* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent.
* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté gauche des paramètres EEPROM sur un clavier scindé.


+ 3
- 3
docs/fr-fr/newbs_flashing.md View File

@ -88,7 +88,7 @@ Par exemple, si votre keymap s'appelle "xyverz" et que vous fabriquez une keymap
La commande va vérifier la configuration du clavier, puis tentera de le flasher en fonction du bootloader (chargeur d’amorçage) spécifié. Cela signifie que vous n'avez pas besoin de savoir quel bootloader votre clavier utilise. Exécutez simplement la commande et laissez-le faire le gros du travail.
Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information n’est pas configurée ou si vous tentez de flasher un clavier qui ne permet pas d’être flashé alors vous obtiendrez cette erreur :
Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information n’est pas configurée ou si vous tentez de flasher un clavier qui ne permet pas d’être flashé alors vous obtiendrez cette erreur:
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
@ -326,7 +326,7 @@ Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flash
### BootloadHID
Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante :
Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante:
make <my_keyboard>:<my_keymap>:bootloaderHID
@ -351,7 +351,7 @@ Error opening HIDBoot device: The specified device was not found
Trying again in 5s.
```
Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait s’afficher :
Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait s’afficher:
```
Page size = 128 (0x80)


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save