Merge remote-tracking branch 'upstream/develop'

This commit is contained in:
Nick Brassel 2022-11-28 07:54:00 +11:00
commit 4020674163
No known key found for this signature in database
7959 changed files with 46848 additions and 75988 deletions

View file

@ -4,6 +4,7 @@ on:
push: push:
branches: branches:
- master - master
- develop
paths: paths:
- 'keyboards/**' - 'keyboards/**'
- 'layouts/community/**' - 'layouts/community/**'
@ -17,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: qmkfm/qmk_cli container: qmkfm/qmk_cli
# protect against those who develop with their fork on master # protect against those who work in their fork on 'important' branches
if: github.repository == 'qmk/qmk_firmware' if: github.repository == 'qmk/qmk_firmware'
steps: steps:
@ -26,15 +27,20 @@ jobs:
fetch-depth: 1 fetch-depth: 1
persist-credentials: false persist-credentials: false
- name: Install dependencies
run: |
pip3 install -r requirements-dev.txt
- name: Generate API Data - name: Generate API Data
run: qmk generate-api run: |
qmk generate-api
- name: Upload API Data - name: Upload API Data
uses: jakejarvis/s3-sync-action@master uses: jakejarvis/s3-sync-action@master
with: with:
args: --acl public-read --follow-symlinks --delete args: --acl public-read --follow-symlinks --delete
env: env:
AWS_S3_BUCKET: ${{ secrets.API_SPACE_MASTER }} AWS_S3_BUCKET: ${{ github.ref == 'refs/heads/develop' && secrets['API_SPACE_DEVELOP'] || secrets['API_SPACE_MASTER'] }}
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com

View file

@ -1,43 +0,0 @@
name: Update Develop API Data
on:
push:
branches:
- develop
paths:
- 'keyboards/**'
- 'layouts/community/**'
- 'lib/python/**'
- 'data/**'
- '.github/workflows/develop_api.yml'
workflow_dispatch:
jobs:
api_data:
runs-on: ubuntu-latest
container: qmkfm/qmk_cli
# protect against those who work in their fork on develop
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
persist-credentials: false
- name: Generate API Data
run: |
python3 -m pip install -r requirements-dev.txt
qmk generate-api
- name: Upload API Data
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.API_SPACE_DEVELOP }}
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: '.build/api_data'

1
.gitignore vendored
View file

@ -53,6 +53,7 @@ quantum/version.h
build/ build/
cmake-build-debug cmake-build-debug
CMakeLists.txt CMakeLists.txt
*.pdf
# Let these ones be user specific, since we have so many different configurations # Let these ones be user specific, since we have so many different configurations
*.code-workspace *.code-workspace

View file

@ -241,7 +241,7 @@ endef
# if we are going to compile all keyboards, match the rest of the rule # if we are going to compile all keyboards, match the rest of the rule
# for each of them # for each of them
define PARSE_ALL_KEYBOARDS define PARSE_ALL_KEYBOARDS
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell util/list_keyboards.sh noci | sort -u))) $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell util/list_keyboards.sh | sort -u)))
endef endef
# Prints a list of all known keymaps for the given keyboard # Prints a list of all known keymaps for the given keyboard

View file

@ -20,7 +20,7 @@ $(TEST)_SRC := \
$(TMK_COMMON_SRC) \ $(TMK_COMMON_SRC) \
$(QUANTUM_SRC) \ $(QUANTUM_SRC) \
$(SRC) \ $(SRC) \
tests/test_common/keymap.c \ $(QUANTUM_PATH)/keymap_introspection.c \
tests/test_common/matrix.c \ tests/test_common/matrix.c \
tests/test_common/test_driver.cpp \ tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \ tests/test_common/keyboard_report_util.cpp \
@ -29,7 +29,7 @@ $(TEST)_SRC := \
tests/test_common/test_logger.cpp \ tests/test_common/test_logger.cpp \
$(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS) $(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\""
$(TEST)_CONFIG := $(TEST_PATH)/config.h $(TEST)_CONFIG := $(TEST_PATH)/config.h

View file

@ -124,26 +124,26 @@ include $(BUILDDEFS_PATH)/build_json.mk
# Pull in keymap level rules.mk # Pull in keymap level rules.mk
ifeq ("$(wildcard $(KEYMAP_PATH))", "") ifeq ("$(wildcard $(KEYMAP_PATH))", "")
# Look through the possible keymap folders until we find a matching keymap.c # Look through the possible keymap folders until we find a matching keymap.c
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_5)/rules.mk -include $(MAIN_KEYMAP_PATH_1)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_2)/rules.mk -include $(MAIN_KEYMAP_PATH_2)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_1)/rules.mk -include $(MAIN_KEYMAP_PATH_3)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ($(LAYOUTS),) else ifneq ($(LAYOUTS),)
# If we haven't found a keymap yet fall back to community layouts # If we haven't found a keymap yet fall back to community layouts
include $(BUILDDEFS_PATH)/build_layout.mk include $(BUILDDEFS_PATH)/build_layout.mk
@ -162,7 +162,7 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "")
-include $(KEYMAP_PATH)/rules.mk -include $(KEYMAP_PATH)/rules.mk
# Load any rules.mk content from keymap.json # 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) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(KEYMAP_OUTPUT)/src/rules.mk $(KEYMAP_JSON))
include $(INFO_RULES_MK) include $(INFO_RULES_MK)
# Add rules to generate the keymap files - indentation here is important # Add rules to generate the keymap files - indentation here is important
@ -173,7 +173,7 @@ $(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON) $(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)) $(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON))
@$(BUILD_CMD) @$(BUILD_CMD)
generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
@ -241,21 +241,20 @@ endif
# #
# https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic # https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic
# #
QMK_KEYBOARD_H = $(KEYBOARD_OUTPUT)/src/default_keyboard.h
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","") ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
endif endif
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","") ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","")
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h
endif endif
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","") ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","")
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h
endif endif
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","") ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","")
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h
endif endif
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","") ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
endif endif
# Determine and set parameters based on the keyboard's processor family. # Determine and set parameters based on the keyboard's processor family.
@ -329,7 +328,7 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json
endif endif
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h
KEYBOARD_SRC += $(KEYBOARD_OUTPUT)/src/default_keyboard.c KEYBOARD_SRC += $(KEYBOARD_OUTPUT)/src/default_keyboard.c
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES) $(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
@ -344,15 +343,10 @@ $(KEYBOARD_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES)
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES) $(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h) $(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --include $(FOUND_KEYBOARD_H) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h)
@$(BUILD_CMD) @$(BUILD_CMD)
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES) generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h)
@$(BUILD_CMD)
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
.INTERMEDIATE : generated-files .INTERMEDIATE : generated-files
@ -374,6 +368,10 @@ endif
# Disable features that a keyboard doesn't support # Disable features that a keyboard doesn't support
-include $(BUILDDEFS_PATH)/disable_features.mk -include $(BUILDDEFS_PATH)/disable_features.mk
ifneq ("$(CONVERTER)","")
-include $(CONVERTER)/post_converter.mk
endif
# Pull in post_rules.mk files from all our subfolders # Pull in post_rules.mk files from all our subfolders
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","") ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","")
include $(KEYBOARD_PATH_1)/post_rules.mk include $(KEYBOARD_PATH_1)/post_rules.mk
@ -428,7 +426,6 @@ include $(BUILDDEFS_PATH)/common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk include $(BUILDDEFS_PATH)/generic_features.mk
include $(TMK_PATH)/protocol.mk include $(TMK_PATH)/protocol.mk
include $(PLATFORM_PATH)/common.mk include $(PLATFORM_PATH)/common.mk
include $(BUILDDEFS_PATH)/bootloader.mk
SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
@ -443,6 +440,7 @@ ifneq ($(REQUIRE_PLATFORM_KEY),)
endif endif
endif endif
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk -include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
@ -471,7 +469,7 @@ ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
$(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_SRC := $(SRC)
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \ $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \ -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD_OUTPUT)/src/default_keyboard.h\" \
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\"
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)

View file

@ -71,7 +71,7 @@ include $(BUILDDEFS_PATH)/build_full_test.mk
endif endif
$(TEST)_SRC += \ $(TEST)_SRC += \
tests/test_common/main.c \ tests/test_common/main.cpp \
$(QUANTUM_PATH)/logging/print.c $(QUANTUM_PATH)/logging/print.c
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)

View file

@ -64,6 +64,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_DRIVER_PWM OPT_DEFS += -DAUDIO_DRIVER_PWM
endif endif
OPT_DEFS += -DAUDIO_ENABLE OPT_DEFS += -DAUDIO_ENABLE
COMMON_VPATH += $(QUANTUM_PATH)/audio
MUSIC_ENABLE = yes MUSIC_ENABLE = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
@ -136,6 +137,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
VPATH += $(QUANTUM_DIR)/pointing_device VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom) ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
@ -175,7 +177,7 @@ ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes)
include $(QUANTUM_DIR)/painter/rules.mk include $(QUANTUM_DIR)/painter/rules.mk
endif endif
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling legacy_stm32_flash
EEPROM_DRIVER ?= vendor EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
@ -202,6 +204,12 @@ else
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
QUANTUM_LIB_SRC += spi_master.c QUANTUM_LIB_SRC += spi_master.c
SRC += eeprom_driver.c eeprom_spi.c SRC += eeprom_driver.c eeprom_spi.c
else ifeq ($(strip $(EEPROM_DRIVER)), legacy_stm32_flash)
# STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c
else ifeq ($(strip $(EEPROM_DRIVER)), transient) else ifeq ($(strip $(EEPROM_DRIVER)), transient)
# Transient EEPROM implementation -- no data storage but provides runtime area for it # Transient EEPROM implementation -- no data storage but provides runtime area for it
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
@ -212,12 +220,17 @@ else
ifeq ($(PLATFORM),AVR) ifeq ($(PLATFORM),AVR)
# Automatically provided by avr-libc, nothing required # Automatically provided by avr-libc, nothing required
else ifeq ($(PLATFORM),CHIBIOS) else ifeq ($(PLATFORM),CHIBIOS)
ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) ifneq ($(filter %_STM32F072xB %_STM32F042x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),)
# Emulated EEPROM # STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_LEGACY_EMULATED_FLASH
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
COMMON_VPATH += $(DRIVER_PATH)/flash COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),)
# Wear-leveling EEPROM implementation, backed by MCU flash
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING
SRC += eeprom_driver.c eeprom_wear_leveling.c
WEAR_LEVELING_DRIVER = embedded_flash
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
# True EEPROM on STM32L0xx, L1xx # True EEPROM on STM32L0xx, L1xx
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1
@ -229,8 +242,8 @@ else
WEAR_LEVELING_DRIVER = rp2040_flash WEAR_LEVELING_DRIVER = rp2040_flash
else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) else ifneq ($(filter $(MCU_SERIES),KL2x K20x),)
# Teensy EEPROM implementations # Teensy EEPROM implementations
OPT_DEFS += -DEEPROM_TEENSY OPT_DEFS += -DEEPROM_KINETIS_FLEXRAM
SRC += eeprom_teensy.c SRC += eeprom_kinetis_flexram.c
else else
# Fall back to transient, i.e. non-persistent # Fall back to transient, i.e. non-persistent
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
@ -274,7 +287,7 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none)
POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_PATH)/wear_leveling/wear_leveling_rp2040_flash_config.h POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_PATH)/wear_leveling/wear_leveling_rp2040_flash_config.h
else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), legacy) else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), legacy)
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
SRC += flash_stm32.c wear_leveling_legacy.c SRC += legacy_flash_ops.c wear_leveling_legacy.c
POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_legacy_config.h POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_legacy_config.h
endif endif
endif endif
@ -512,12 +525,6 @@ ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
endif endif
ifeq ($(strip $(PRINTING_ENABLE)), yes)
OPT_DEFS += -DPRINTING_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
QUANTUM_LIB_SRC += uart.c
endif
VARIABLE_TRACE ?= no VARIABLE_TRACE ?= no
ifneq ($(strip $(VARIABLE_TRACE)),no) ifneq ($(strip $(VARIABLE_TRACE)),no)
SRC += $(QUANTUM_DIR)/variable_trace.c SRC += $(QUANTUM_DIR)/variable_trace.c
@ -537,11 +544,7 @@ endif
VALID_BACKLIGHT_TYPES := pwm timer software custom VALID_BACKLIGHT_TYPES := pwm timer software custom
BACKLIGHT_ENABLE ?= no BACKLIGHT_ENABLE ?= no
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
BACKLIGHT_DRIVER ?= software
else
BACKLIGHT_DRIVER ?= pwm BACKLIGHT_DRIVER ?= pwm
endif
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid BACKLIGHT_DRIVER,BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) $(call CATASTROPHIC_ERROR,Invalid BACKLIGHT_DRIVER,BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
@ -773,8 +776,10 @@ endif
ifeq ($(strip $(UNICODE_COMMON)), yes) ifeq ($(strip $(UNICODE_COMMON)), yes)
OPT_DEFS += -DUNICODE_COMMON_ENABLE OPT_DEFS += -DUNICODE_COMMON_ENABLE
COMMON_VPATH += $(QUANTUM_DIR)/unicode
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \ SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \
$(QUANTUM_DIR)/utf8.c $(QUANTUM_DIR)/unicode/unicode.c \
$(QUANTUM_DIR)/unicode/utf8.c
endif endif
MAGIC_ENABLE ?= yes MAGIC_ENABLE ?= yes
@ -805,31 +810,25 @@ ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
OPT_DEFS += -DMOUSE_ENABLE OPT_DEFS += -DMOUSE_ENABLE
endif endif
ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor
PS2_ENABLE := yes
SRC += ps2_busywait.c
SRC += ps2_io.c
OPT_DEFS += -DPS2_USE_BUSYWAIT
endif
ifeq ($(strip $(PS2_USE_INT)), yes)
PS2_ENABLE := yes
SRC += ps2_interrupt.c
SRC += ps2_io.c
OPT_DEFS += -DPS2_USE_INT
endif
ifeq ($(strip $(PS2_USE_USART)), yes)
PS2_ENABLE := yes
SRC += ps2_usart.c
SRC += ps2_io.c
OPT_DEFS += -DPS2_USE_USART
endif
PS2_DRIVER ?= busywait
ifeq ($(strip $(PS2_ENABLE)), yes) ifeq ($(strip $(PS2_ENABLE)), yes)
ifeq ($(filter $(PS2_DRIVER),$(VALID_PS2_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid PS2_DRIVER,PS2_DRIVER="$(PS2_DRIVER)" is not a valid PS/2 driver)
endif
OPT_DEFS += -DPS2_DRIVER_$(strip $(shell echo $(PS2_DRIVER) | tr '[:lower:]' '[:upper:]'))
COMMON_VPATH += $(DRIVER_PATH)/ps2 COMMON_VPATH += $(DRIVER_PATH)/ps2
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2 COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2
OPT_DEFS += -DPS2_ENABLE OPT_DEFS += -DPS2_ENABLE
ifneq ($(strip $(PS2_DRIVER)), vendor)
SRC += ps2_io.c
endif
SRC += ps2_$(strip $(PS2_DRIVER)).c
endif endif
JOYSTICK_ENABLE ?= no JOYSTICK_ENABLE ?= no
@ -885,17 +884,17 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
OPT_DEFS += -DBLUETOOTH_ENABLE OPT_DEFS += -DBLUETOOTH_ENABLE
NO_USB_STARTUP_CHECK := yes NO_USB_STARTUP_CHECK := yes
COMMON_VPATH += $(DRIVER_PATH)/bluetooth COMMON_VPATH += $(DRIVER_PATH)/bluetooth
SRC += outputselect.c SRC += outputselect.c bluetooth.c
ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE) ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE)
OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE
SRC += analog.c
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
QUANTUM_LIB_SRC += analog.c
QUANTUM_LIB_SRC += spi_master.c QUANTUM_LIB_SRC += spi_master.c
endif endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42)
OPT_DEFS += -DBLUETOOTH_RN42 OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
SRC += $(DRIVER_PATH)/bluetooth/rn42.c SRC += $(DRIVER_PATH)/bluetooth/rn42.c
QUANTUM_LIB_SRC += uart.c QUANTUM_LIB_SRC += uart.c
endif endif

View file

@ -332,6 +332,7 @@ $1/asflags.txt: $1/force
echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@ echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@
$1/compiler.txt: $1/force $1/compiler.txt: $1/force
test -f $$@ || touch $$@
$$(CC) --version | cmp -s - $$@ || $$(CC) --version > $$@ $$(CC) --version | cmp -s - $$@ || $$(CC) --version > $$@
endef endef

View file

@ -29,6 +29,7 @@ ifneq ($(CONVERT_TO),)
# Configure any defaults # Configure any defaults
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')) OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]'))
OPT_DEFS += -DCONVERTER_TARGET=\"$(strip $(CONVERT_TO))\"
OPT_DEFS += -DCONVERTER_ENABLED OPT_DEFS += -DCONVERTER_ENABLED
VPATH += $(CONVERTER) VPATH += $(CONVERTER)

View file

@ -14,7 +14,6 @@ FEATURE_NAMES += LCD_BACKLIGHT
FEATURE_NAMES += LCD FEATURE_NAMES += LCD
FEATURE_NAMES += OLED FEATURE_NAMES += OLED
FEATURE_NAMES += POINTING_DEVICE FEATURE_NAMES += POINTING_DEVICE
FEATURE_NAMES += PRINTING
FEATURE_NAMES += PS2_MOUSE FEATURE_NAMES += PS2_MOUSE
FEATURE_NAMES += RGBLIGHT FEATURE_NAMES += RGBLIGHT
FEATURE_NAMES += RGB_MATRIX FEATURE_NAMES += RGB_MATRIX

View file

@ -17,6 +17,7 @@ SPACE_CADET_ENABLE ?= yes
GRAVE_ESC_ENABLE ?= yes GRAVE_ESC_ENABLE ?= yes
GENERIC_FEATURES = \ GENERIC_FEATURES = \
AUTOCORRECT \
CAPS_WORD \ CAPS_WORD \
COMBO \ COMBO \
COMMAND \ COMMAND \

View file

@ -348,8 +348,6 @@ ifneq ($(findstring STM32F401, $(MCU)),)
# or <keyboard_dir>/ld/ # or <keyboard_dir>/ld/
ifeq ($(strip $(BOOTLOADER)), tinyuf2) ifeq ($(strip $(BOOTLOADER)), tinyuf2)
MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
EEPROM_DRIVER ?= wear_leveling
WEAR_LEVELING_DRIVER ?= legacy
else else
MCU_LDSCRIPT ?= STM32F401xC MCU_LDSCRIPT ?= STM32F401xC
endif endif
@ -465,8 +463,6 @@ ifneq ($(findstring STM32F411, $(MCU)),)
# or <keyboard_dir>/ld/ # or <keyboard_dir>/ld/
ifeq ($(strip $(BOOTLOADER)), tinyuf2) ifeq ($(strip $(BOOTLOADER)), tinyuf2)
MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
EEPROM_DRIVER ?= wear_leveling
WEAR_LEVELING_DRIVER ?= legacy
else else
MCU_LDSCRIPT ?= STM32F411xE MCU_LDSCRIPT ?= STM32F411xE
endif endif
@ -520,6 +516,9 @@ ifneq ($(findstring STM32F446, $(MCU)),)
# Bootloader address for STM32 DFU # Bootloader address for STM32 DFU
STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
# Default as no chibios efl config
EEPROM_DRIVER ?= transient
endif endif
ifneq ($(findstring STM32G431, $(MCU)),) ifneq ($(findstring STM32G431, $(MCU)),)

View file

@ -43,7 +43,6 @@ OTHER_OPTION_NAMES = \
KEY_LOCK_ENABLE \ KEY_LOCK_ENABLE \
KEY_OVERRIDE_ENABLE \ KEY_OVERRIDE_ENABLE \
LEADER_ENABLE \ LEADER_ENABLE \
PRINTING_ENABLE \
STENO_ENABLE \ STENO_ENABLE \
STENO_PROTOCOL \ STENO_PROTOCOL \
TAP_DANCE_ENABLE \ TAP_DANCE_ENABLE \
@ -66,7 +65,9 @@ OTHER_OPTION_NAMES = \
KEYLOGGER_ENABLE \ KEYLOGGER_ENABLE \
LCD_BACKLIGHT_ENABLE \ LCD_BACKLIGHT_ENABLE \
MACROS_ENABLED \ MACROS_ENABLED \
PS2_ENABLE \
PS2_MOUSE_ENABLE \ PS2_MOUSE_ENABLE \
PS2_DRIVER \
RAW_ENABLE \ RAW_ENABLE \
SWAP_HANDS_ENABLE \ SWAP_HANDS_ENABLE \
RING_BUFFERED_6KRO_REPORT_ENABLE \ RING_BUFFERED_6KRO_REPORT_ENABLE \
@ -82,7 +83,8 @@ OTHER_OPTION_NAMES = \
LTO_ENABLE \ LTO_ENABLE \
PROGRAMMABLE_BUTTON_ENABLE \ PROGRAMMABLE_BUTTON_ENABLE \
SECURE_ENABLE \ SECURE_ENABLE \
CAPS_WORD_ENABLE CAPS_WORD_ENABLE \
AUTOCORRECT_ENABLE
define NAME_ECHO define NAME_ECHO
@printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)"

View file

@ -0,0 +1,96 @@
{
"ranges": {
"0x0000/0x00FF": {
"define": "QK_BASIC"
},
"0x0100/0x1EFF": {
"define": "QK_MODS"
},
"0x2000/0x1FFF": {
"define": "QK_MOD_TAP"
},
"0x4000/0x0FFF": {
"define": "QK_LAYER_TAP"
},
"0x5000/0x01FF": {
"define": "QK_LAYER_MOD"
},
"0x5200/0x001F": {
"define": "QK_TO"
},
"0x5220/0x001F": {
"define": "QK_MOMENTARY"
},
"0x5240/0x001F": {
"define": "QK_DEF_LAYER"
},
"0x5260/0x001F": {
"define": "QK_TOGGLE_LAYER"
},
"0x5280/0x001F": {
"define": "QK_ONE_SHOT_LAYER"
},
"0x52A0/0x001F": {
"define": "QK_ONE_SHOT_MOD"
},
"0x52C0/0x001F": {
"define": "QK_LAYER_TAP_TOGGLE"
},
// 0x52E0/0x001F - UNUSED
// 0x5300/0x02FF - UNUSED
"0x5600/0x00FF": {
"define": "QK_SWAP_HANDS"
},
"0x5700/0x00FF": {
"define": "QK_TAP_DANCE"
},
// 0x5800/0x17FF - UNUSED
"0x7000/0x00FF": {
"define": "QK_MAGIC"
},
"0x7100/0x00FF": {
"define": "QK_MIDI"
},
"0x7200/0x01FF": {
"define": "QK_SEQUENCER"
},
"0x7400/0x003F": {
"define": "QK_JOYSTICK"
},
"0x7440/0x003F": {
"define": "QK_PROGRAMMABLE_BUTTON"
},
"0x7480/0x003F": {
"define": "QK_AUDIO"
},
"0x74C0/0x003F": {
"define": "QK_STENO"
},
// 0x7500/0x01FF - UNUSED
"0x7700/0x007F": {
"define": "QK_MACRO"
},
// 0x7780/0x007F - UNUSED
"0x7800/0x00FF": {
"define": "QK_LIGHTING"
},
// 0x7900/0x02FF - UNUSED
"0x7C00/0x01FF": {
"define": "QK_QUANTUM"
},
"0x7E00/0x00FF": {
"define": "QK_KB"
},
"0x7F00/0x00FF": {
"define": "QK_USER"
},
"0x8000/0x7FFF": {
"define": "QK_UNICODE"
}
},
"keycodes": {
"0x7E00": {
"key": "SAFE_RANGE"
}
}
}

View file

@ -0,0 +1,112 @@
{
"keycodes": {
"0x7480": {
"group": "audio",
"key": "QK_AUDIO_ON",
"aliases": [
"AU_ON"
]
},
"0x7481": {
"group": "audio",
"key": "QK_AUDIO_OFF",
"aliases": [
"AU_OFF"
]
},
"0x7482": {
"group": "audio",
"key": "QK_AUDIO_TOGGLE",
"aliases": [
"AU_TOGG"
]
},
"0x748A": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_TOGGLE",
"aliases": [
"CK_TOGG"
]
},
"0x748B": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_ON",
"aliases": [
"CK_ON"
]
},
"0x748C": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_OFF",
"aliases": [
"CK_OFF"
]
},
"0x748D": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_UP",
"aliases": [
"CK_UP"
]
},
"0x748E": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_DOWN",
"aliases": [
"CK_DOWN"
]
},
"0x748F": {
"group": "audio",
"key": "QK_AUDIO_CLICKY_RESET",
"aliases": [
"CK_RST"
]
},
"0x7490": {
"group": "audio",
"key": "QK_MUSIC_ON",
"aliases": [
"MU_ON"
]
},
"0x7491": {
"group": "audio",
"key": "QK_MUSIC_OFF",
"aliases": [
"MU_OFF"
]
},
"0x7492": {
"group": "audio",
"key": "QK_MUSIC_TOGGLE",
"aliases": [
"MU_TOGG"
]
},
"0x7493": {
"group": "audio",
"key": "QK_MUSIC_MODE_NEXT",
"aliases": [
"MU_NEXT"
]
},
"0x7494": {
"group": "audio",
"key": "QK_AUDIO_VOICE_NEXT",
"aliases": [
"AU_NEXT"
]
},
"0x7495": {
"group": "audio",
"key": "QK_AUDIO_VOICE_PREVIOUS",
"aliases": [
"AU_PREV"
]
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,228 @@
{
"keycodes": {
"0x7400": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_0",
"aliases": [
"JS_0"
]
},
"0x7401": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_1",
"aliases": [
"JS_1"
]
},
"0x7402": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_2",
"aliases": [
"JS_2"
]
},
"0x7403": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_3",
"aliases": [
"JS_3"
]
},
"0x7404": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_4",
"aliases": [
"JS_4"
]
},
"0x7405": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_5",
"aliases": [
"JS_5"
]
},
"0x7406": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_6",
"aliases": [
"JS_6"
]
},
"0x7407": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_7",
"aliases": [
"JS_7"
]
},
"0x7408": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_8",
"aliases": [
"JS_8"
]
},
"0x7409": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_9",
"aliases": [
"JS_9"
]
},
"0x740A": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_10",
"aliases": [
"JS_10"
]
},
"0x740B": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_11",
"aliases": [
"JS_11"
]
},
"0x740C": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_12",
"aliases": [
"JS_12"
]
},
"0x740D": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_13",
"aliases": [
"JS_13"
]
},
"0x740E": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_14",
"aliases": [
"JS_14"
]
},
"0x740F": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_15",
"aliases": [
"JS_15"
]
},
"0x7410": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_16",
"aliases": [
"JS_16"
]
},
"0x7411": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_17",
"aliases": [
"JS_17"
]
},
"0x7412": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_18",
"aliases": [
"JS_18"
]
},
"0x7413": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_19",
"aliases": [
"JS_19"
]
},
"0x7414": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_20",
"aliases": [
"JS_20"
]
},
"0x7415": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_21",
"aliases": [
"JS_21"
]
},
"0x7416": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_22",
"aliases": [
"JS_22"
]
},
"0x7417": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_23",
"aliases": [
"JS_23"
]
},
"0x7418": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_24",
"aliases": [
"JS_24"
]
},
"0x7419": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_25",
"aliases": [
"JS_25"
]
},
"0x741A": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_26",
"aliases": [
"JS_26"
]
},
"0x741B": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_27",
"aliases": [
"JS_27"
]
},
"0x741C": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_28",
"aliases": [
"JS_28"
]
},
"0x741D": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_29",
"aliases": [
"JS_29"
]
},
"0x741E": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_30",
"aliases": [
"JS_30"
]
},
"0x741F": {
"group": "joystick",
"key": "QK_JOYSTICK_BUTTON_31",
"aliases": [
"JS_31"
]
}
}
}

View file

@ -0,0 +1,175 @@
{
"keycodes": {
"0x7800": {
"group": "backlight",
"key": "QK_BACKLIGHT_ON",
"aliases": [
"BL_ON"
]
},
"0x7801": {
"group": "backlight",
"key": "QK_BACKLIGHT_OFF",
"aliases": [
"BL_OFF"
]
},
"0x7802": {
"group": "backlight",
"key": "QK_BACKLIGHT_TOGGLE",
"aliases": [
"BL_TOGG"
]
},
"0x7803": {
"group": "backlight",
"key": "QK_BACKLIGHT_DOWN",
"aliases": [
"BL_DOWN"
]
},
"0x7804": {
"group": "backlight",
"key": "QK_BACKLIGHT_UP",
"aliases": [
"BL_UP"
]
},
"0x7805": {
"group": "backlight",
"key": "QK_BACKLIGHT_STEP",
"aliases": [
"BL_STEP"
]
},
"0x7806": {
"group": "backlight",
"key": "QK_BACKLIGHT_TOGGLE_BREATHING",
"aliases": [
"BL_BRTG"
]
},
"0x7820": {
"group": "rgb",
"key": "RGB_TOG"
},
"0x7821": {
"group": "rgb",
"key": "RGB_MODE_FORWARD",
"aliases": [
"RGB_MOD"
]
},
"0x7822": {
"group": "rgb",
"key": "RGB_MODE_REVERSE",
"aliases": [
"RGB_RMOD"
]
},
"0x7823": {
"group": "rgb",
"key": "RGB_HUI"
},
"0x7824": {
"group": "rgb",
"key": "RGB_HUD"
},
"0x7825": {
"group": "rgb",
"key": "RGB_SAI"
},
"0x7826": {
"group": "rgb",
"key": "RGB_SAD"
},
"0x7827": {
"group": "rgb",
"key": "RGB_VAI"
},
"0x7828": {
"group": "rgb",
"key": "RGB_VAD"
},
"0x7829": {
"group": "rgb",
"key": "RGB_SPI"
},
"0x782A": {
"group": "rgb",
"key": "RGB_SPD"
},
"0x782B": {
"group": "rgb",
"key": "RGB_MODE_PLAIN",
"aliases": [
"RGB_M_P"
]
},
"0x782C": {
"group": "rgb",
"key": "RGB_MODE_BREATHE",
"aliases": [
"RGB_M_B"
]
},
"0x782D": {
"group": "rgb",
"key": "RGB_MODE_RAINBOW",
"aliases": [
"RGB_M_R"
]
},
"0x782E": {
"group": "rgb",
"key": "RGB_MODE_SWIRL",
"aliases": [
"RGB_M_SW"
]
},
"0x782F": {
"group": "rgb",
"key": "RGB_MODE_SNAKE",
"aliases": [
"RGB_M_SN"
]
},
"0x7830": {
"group": "rgb",
"key": "RGB_MODE_KNIGHT",
"aliases": [
"RGB_M_K"
]
},
"0x7831": {
"group": "rgb",
"key": "RGB_MODE_XMAS",
"aliases": [
"RGB_M_X"
]
},
"0x7832": {
"group": "rgb",
"key": "RGB_MODE_GRADIENT",
"aliases": [
"RGB_M_G"
]
},
"0x7833": {
"group": "rgb",
"key": "RGB_MODE_RGBTEST",
"aliases": [
"RGB_M_T"
]
},
"0x7834": {
"group": "rgb",
"key": "RGB_MODE_TWINKLE",
"aliases": [
"RGB_M_TW"
]
}
}
}

View file

@ -0,0 +1,229 @@
{
"keycodes": {
"0x7700": {
"group": "macro",
"key": "QK_MACRO_0",
"aliases": [
"MC_0"
]
},
"0x7701": {
"group": "macro",
"key": "QK_MACRO_1",
"aliases": [
"MC_1"
]
},
"0x7702": {
"group": "macro",
"key": "QK_MACRO_2",
"aliases": [
"MC_2"
]
},
"0x7703": {
"group": "macro",
"key": "QK_MACRO_3",
"aliases": [
"MC_3"
]
},
"0x7704": {
"group": "macro",
"key": "QK_MACRO_4",
"aliases": [
"MC_4"
]
},
"0x7705": {
"group": "macro",
"key": "QK_MACRO_5",
"aliases": [
"MC_5"
]
},
"0x7706": {
"group": "macro",
"key": "QK_MACRO_6",
"aliases": [
"MC_6"
]
},
"0x7707": {
"group": "macro",
"key": "QK_MACRO_7",
"aliases": [
"MC_7"
]
},
"0x7708": {
"group": "macro",
"key": "QK_MACRO_8",
"aliases": [
"MC_8"
]
},
"0x7709": {
"group": "macro",
"key": "QK_MACRO_9",
"aliases": [
"MC_9"
]
},
"0x770A": {
"group": "macro",
"key": "QK_MACRO_10",
"aliases": [
"MC_10"
]
},
"0x770B": {
"group": "macro",
"key": "QK_MACRO_11",
"aliases": [
"MC_11"
]
},
"0x770C": {
"group": "macro",
"key": "QK_MACRO_12",
"aliases": [
"MC_12"
]
},
"0x770D": {
"group": "macro",
"key": "QK_MACRO_13",
"aliases": [
"MC_13"
]
},
"0x770E": {
"group": "macro",
"key": "QK_MACRO_14",
"aliases": [
"MC_14"
]
},
"0x770F": {
"group": "macro",
"key": "QK_MACRO_15",
"aliases": [
"MC_15"
]
},
"0x7710": {
"group": "macro",
"key": "QK_MACRO_16",
"aliases": [
"MC_16"
]
},
"0x7711": {
"group": "macro",
"key": "QK_MACRO_17",
"aliases": [
"MC_17"
]
},
"0x7712": {
"group": "macro",
"key": "QK_MACRO_18",
"aliases": [
"MC_18"
]
},
"0x7713": {
"group": "macro",
"key": "QK_MACRO_19",
"aliases": [
"MC_19"
]
},
"0x7714": {
"group": "macro",
"key": "QK_MACRO_20",
"aliases": [
"MC_20"
]
},
"0x7715": {
"group": "macro",
"key": "QK_MACRO_21",
"aliases": [
"MC_21"
]
},
"0x7716": {
"group": "macro",
"key": "QK_MACRO_22",
"aliases": [
"MC_22"
]
},
"0x7717": {
"group": "macro",
"key": "QK_MACRO_23",
"aliases": [
"MC_23"
]
},
"0x7718": {
"group": "macro",
"key": "QK_MACRO_24",
"aliases": [
"MC_24"
]
},
"0x7719": {
"group": "macro",
"key": "QK_MACRO_25",
"aliases": [
"MC_25"
]
},
"0x771A": {
"group": "macro",
"key": "QK_MACRO_26",
"aliases": [
"MC_26"
]
},
"0x771B": {
"group": "macro",
"key": "QK_MACRO_27",
"aliases": [
"MC_27"
]
},
"0x771C": {
"group": "macro",
"key": "QK_MACRO_28",
"aliases": [
"MC_28"
]
},
"0x771D": {
"group": "macro",
"key": "QK_MACRO_29",
"aliases": [
"MC_29"
]
},
"0x771E": {
"group": "macro",
"key": "QK_MACRO_30",
"aliases": [
"MC_30"
]
},
"0x771F": {
"group": "macro",
"key": "QK_MACRO_31",
"aliases": [
"MC_31"
]
}
}
}

View file

@ -0,0 +1,249 @@
{
"keycodes": {
"0x7000": {
"group": "magic",
"key": "MAGIC_SWAP_CONTROL_CAPSLOCK",
"aliases": [
"CL_SWAP"
]
},
"0x7001": {
"group": "magic",
"key": "MAGIC_UNSWAP_CONTROL_CAPSLOCK",
"aliases": [
"CL_NORM"
]
},
"0x7002": {
"group": "magic",
"key": "MAGIC_TOGGLE_CONTROL_CAPSLOCK",
"aliases": [
"CL_TOGG"
]
},
"0x7003": {
"group": "magic",
"key": "MAGIC_UNCAPSLOCK_TO_CONTROL",
"aliases": [
"CL_CAPS"
]
},
"0x7004": {
"group": "magic",
"key": "MAGIC_CAPSLOCK_TO_CONTROL",
"aliases": [
"CL_CTRL"
]
},
"0x7005": {
"group": "magic",
"key": "MAGIC_SWAP_LALT_LGUI",
"aliases": [
"LAG_SWP"
]
},
"0x7006": {
"group": "magic",
"key": "MAGIC_UNSWAP_LALT_LGUI",
"aliases": [
"LAG_NRM"
]
},
"0x7007": {
"group": "magic",
"key": "MAGIC_SWAP_RALT_RGUI",
"aliases": [
"RAG_SWP"
]
},
"0x7008": {
"group": "magic",
"key": "MAGIC_UNSWAP_RALT_RGUI",
"aliases": [
"RAG_NRM"
]
},
"0x7009": {
"group": "magic",
"key": "MAGIC_UNNO_GUI",
"aliases": [
"GUI_ON"
]
},
"0x700A": {
"group": "magic",
"key": "MAGIC_NO_GUI",
"aliases": [
"GUI_OFF"
]
},
"0x700B": {
"group": "magic",
"key": "MAGIC_TOGGLE_GUI",
"aliases": [
"GUI_TOG"
]
},
"0x700C": {
"group": "magic",
"key": "MAGIC_SWAP_GRAVE_ESC",
"aliases": [
"GE_SWAP"
]
},
"0x700D": {
"group": "magic",
"key": "MAGIC_UNSWAP_GRAVE_ESC",
"aliases": [
"GE_NORM"
]
},
"0x700E": {
"group": "magic",
"key": "MAGIC_SWAP_BACKSLASH_BACKSPACE",
"aliases": [
"BS_SWAP"
]
},
"0x700F": {
"group": "magic",
"key": "MAGIC_UNSWAP_BACKSLASH_BACKSPACE",
"aliases": [
"BS_NORM"
]
},
"0x7010": {
"group": "magic",
"key": "MAGIC_TOGGLE_BACKSLASH_BACKSPACE",
"aliases": [
"BS_TOGG"
]
},
"0x7011": {
"group": "magic",
"key": "MAGIC_HOST_NKRO",
"aliases": [
"NK_ON"
]
},
"0x7012": {
"group": "magic",
"key": "MAGIC_UNHOST_NKRO",
"aliases": [
"NK_OFF"
]
},
"0x7013": {
"group": "magic",
"key": "MAGIC_TOGGLE_NKRO",
"aliases": [
"NK_TOGG"
]
},
"0x7014": {
"group": "magic",
"key": "MAGIC_SWAP_ALT_GUI",
"aliases": [
"AG_SWAP"
]
},
"0x7015": {
"group": "magic",
"key": "MAGIC_UNSWAP_ALT_GUI",
"aliases": [
"AG_NORM"
]
},
"0x7016": {
"group": "magic",
"key": "MAGIC_TOGGLE_ALT_GUI",
"aliases": [
"AG_TOGG"
]
},
"0x7017": {
"group": "magic",
"key": "MAGIC_SWAP_LCTL_LGUI",
"aliases": [
"LCG_SWP"
]
},
"0x7018": {
"group": "magic",
"key": "MAGIC_UNSWAP_LCTL_LGUI",
"aliases": [
"LCG_NRM"
]
},
"0x7019": {
"group": "magic",
"key": "MAGIC_SWAP_RCTL_RGUI",
"aliases": [
"RCG_SWP"
]
},
"0x701A": {
"group": "magic",
"key": "MAGIC_UNSWAP_RCTL_RGUI",
"aliases": [
"RCG_NRM"
]
},
"0x701B": {
"group": "magic",
"key": "MAGIC_SWAP_CTL_GUI",
"aliases": [
"CG_SWAP"
]
},
"0x701C": {
"group": "magic",
"key": "MAGIC_UNSWAP_CTL_GUI",
"aliases": [
"CG_NORM"
]
},
"0x701D": {
"group": "magic",
"key": "MAGIC_TOGGLE_CTL_GUI",
"aliases": [
"CG_TOGG"
]
},
"0x701E": {
"group": "magic",
"key": "MAGIC_EE_HANDS_LEFT",
"aliases": [
"EH_LEFT"
]
},
"0x701F": {
"group": "magic",
"key": "MAGIC_EE_HANDS_RIGHT",
"aliases": [
"EH_RGHT"
]
},
"0x7020": {
"group": "magic",
"key": "MAGIC_SWAP_ESCAPE_CAPSLOCK",
"aliases": [
"EC_SWAP"
]
},
"0x7021": {
"group": "magic",
"key": "MAGIC_UNSWAP_ESCAPE_CAPSLOCK",
"aliases": [
"EC_NORM"
]
},
"0x7022": {
"group": "magic",
"key": "MAGIC_TOGGLE_ESCAPE_CAPSLOCK",
"aliases": [
"EC_TOGG"
]
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,228 @@
{
"keycodes": {
"0x7440": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_1",
"aliases": [
"PB_1"
]
},
"0x7441": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_2",
"aliases": [
"PB_2"
]
},
"0x7442": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_3",
"aliases": [
"PB_3"
]
},
"0x7443": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_4",
"aliases": [
"PB_4"
]
},
"0x7444": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_5",
"aliases": [
"PB_5"
]
},
"0x7445": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_6",
"aliases": [
"PB_6"
]
},
"0x7446": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_7",
"aliases": [
"PB_7"
]
},
"0x7447": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_8",
"aliases": [
"PB_8"
]
},
"0x7448": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_9",
"aliases": [
"PB_9"
]
},
"0x7449": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_10",
"aliases": [
"PB_10"
]
},
"0x744A": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_11",
"aliases": [
"PB_11"
]
},
"0x744B": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_12",
"aliases": [
"PB_12"
]
},
"0x744C": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_13",
"aliases": [
"PB_13"
]
},
"0x744D": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_14",
"aliases": [
"PB_14"
]
},
"0x744E": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_15",
"aliases": [
"PB_15"
]
},
"0x744F": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_16",
"aliases": [
"PB_16"
]
},
"0x7450": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_17",
"aliases": [
"PB_17"
]
},
"0x7451": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_18",
"aliases": [
"PB_18"
]
},
"0x7452": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_19",
"aliases": [
"PB_19"
]
},
"0x7453": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_20",
"aliases": [
"PB_20"
]
},
"0x7454": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_21",
"aliases": [
"PB_21"
]
},
"0x7455": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_22",
"aliases": [
"PB_22"
]
},
"0x7456": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_23",
"aliases": [
"PB_23"
]
},
"0x7457": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_24",
"aliases": [
"PB_24"
]
},
"0x7458": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_25",
"aliases": [
"PB_25"
]
},
"0x7459": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_26",
"aliases": [
"PB_26"
]
},
"0x745A": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_27",
"aliases": [
"PB_27"
]
},
"0x745B": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_28",
"aliases": [
"PB_28"
]
},
"0x745C": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_29",
"aliases": [
"PB_29"
]
},
"0x745D": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_30",
"aliases": [
"PB_30"
]
},
"0x745E": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_31",
"aliases": [
"PB_31"
]
},
"0x745F": {
"group": "programmable_button",
"key": "QK_PROGRAMMABLE_BUTTON_32",
"aliases": [
"PB_32"
]
}
}
}

View file

@ -0,0 +1,512 @@
{
"keycodes": {
"0x7C00": {
"group": "quantum",
"key": "QK_BOOTLOADER",
"aliases": [
"QK_BOOT"
]
},
"0x7C01": {
"group": "quantum",
"key": "QK_REBOOT",
"aliases": [
"QK_RBT"
]
},
"0x7C02": {
"group": "quantum",
"key": "QK_DEBUG_TOGGLE",
"aliases": [
"DB_TOGG"
]
},
"0x7C03": {
"group": "quantum",
"key": "QK_CLEAR_EEPROM",
"aliases": [
"EE_CLR"
]
},
"0x7C04": {
"group": "quantum",
"key": "QK_MAKE"
},
"0x7C10": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_DOWN",
"aliases": [
"AS_DOWN"
]
},
"0x7C11": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_UP",
"aliases": [
"AS_UP"
]
},
"0x7C12": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_REPORT",
"aliases": [
"AS_RPT"
]
},
"0x7C13": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_ON",
"aliases": [
"AS_ON"
]
},
"0x7C14": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_OFF",
"aliases": [
"AS_OFF"
]
},
"0x7C15": {
"group": "quantum",
"key": "QK_AUTO_SHIFT_TOGGLE",
"aliases": [
"AS_TOGG"
]
},
"0x7C16": {
"group": "quantum",
"key": "QK_GRAVE_ESCAPE",
"aliases": [
"QK_GESC"
]
},
"0x7C17": {
"group": "quantum",
"key": "QK_VELOCIKEY_TOGGLE",
"aliases": [
"VK_TOGG"
]
},
"0x7C18": {
"group": "quantum",
"key": "QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN",
"aliases": [
"SC_LCPO"
]
},
"0x7C19": {
"group": "quantum",
"key": "QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE",
"aliases": [
"SC_RCPC"
]
},
"0x7C1A": {
"group": "quantum",
"key": "QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN",
"aliases": [
"SC_LSPO"
]
},
"0x7C1B": {
"group": "quantum",
"key": "QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE",
"aliases": [
"SC_RSPC"
]
},
"0x7C1C": {
"group": "quantum",
"key": "QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN",
"aliases": [
"SC_LAPO"
]
},
"0x7C1D": {
"group": "quantum",
"key": "QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE",
"aliases": [
"SC_RAPC"
]
},
"0x7C1E": {
"group": "quantum",
"key": "QK_SPACE_CADET_RIGHT_SHIFT_ENTER",
"aliases": [
"SC_SENT"
]
},
"0x7C20": {
"group": "quantum",
"key": "QK_OUTPUT_AUTO",
"aliases": [
"OU_AUTO"
]
},
"0x7C21": {
"group": "quantum",
"key": "QK_OUTPUT_USB",
"aliases": [
"OU_USB"
]
},
"0x7C22": {
"group": "quantum",
"key": "QK_OUTPUT_BLUETOOTH",
"aliases": [
"OU_BT"
]
},
"0x7C30": {
"group": "quantum",
"key": "QK_UNICODE_MODE_NEXT",
"aliases": [
"UC_NEXT"
]
},
"0x7C31": {
"group": "quantum",
"key": "QK_UNICODE_MODE_PREVIOUS",
"aliases": [
"UC_PREV"
]
},
"0x7C32": {
"group": "quantum",
"key": "QK_UNICODE_MODE_MACOS",
"aliases": [
"UC_MAC"
]
},
"0x7C33": {
"group": "quantum",
"key": "QK_UNICODE_MODE_LINUX",
"aliases": [
"UC_LINX"
]
},
"0x7C34": {
"group": "quantum",
"key": "QK_UNICODE_MODE_WINDOWS",
"aliases": [
"UC_WIN"
]
},
"0x7C35": {
"group": "quantum",
"key": "QK_UNICODE_MODE_BSD",
"aliases": [
"UC_BSD"
]
},
"0x7C36": {
"group": "quantum",
"key": "QK_UNICODE_MODE_WINCOMPOSE",
"aliases": [
"UC_WINC"
]
},
"0x7C37": {
"group": "quantum",
"key": "QK_UNICODE_MODE_EMACS",
"aliases": [
"UC_EMAC"
]
},
"0x7C40": {
"group": "quantum",
"key": "QK_HAPTIC_ON",
"aliases": [
"HF_ON"
]
},
"0x7C41": {
"group": "quantum",
"key": "QK_HAPTIC_OFF",
"aliases": [
"HF_OFF"
]
},
"0x7C42": {
"group": "quantum",
"key": "QK_HAPTIC_TOGGLE",
"aliases": [
"HF_TOGG"
]
},
"0x7C43": {
"group": "quantum",
"key": "QK_HAPTIC_RESET",
"aliases": [
"HF_RST"
]
},
"0x7C44": {
"group": "quantum",
"key": "QK_HAPTIC_FEEDBACK_TOGGLE",
"aliases": [
"HF_FDBK"
]
},
"0x7C45": {
"group": "quantum",
"key": "QK_HAPTIC_BUZZ_TOGGLE",
"aliases": [
"HF_BUZZ"
]
},
"0x7C46": {
"group": "quantum",
"key": "QK_HAPTIC_MODE_NEXT",
"aliases": [
"HF_NEXT"
]
},
"0x7C47": {
"group": "quantum",
"key": "QK_HAPTIC_MODE_PREVIOUS",
"aliases": [
"HF_PREV"
]
},
"0x7C48": {
"group": "quantum",
"key": "QK_HAPTIC_CONTINUOUS_TOGGLE",
"aliases": [
"HF_CONT"
]
},
"0x7C49": {
"group": "quantum",
"key": "QK_HAPTIC_CONTINUOUS_UP",
"aliases": [
"HF_CONU"
]
},
"0x7C4A": {
"group": "quantum",
"key": "QK_HAPTIC_CONTINUOUS_DOWN",
"aliases": [
"HF_COND"
]
},
"0x7C4B": {
"group": "quantum",
"key": "QK_HAPTIC_DWELL_UP",
"aliases": [
"HF_DWLU"
]
},
"0x7C4C": {
"group": "quantum",
"key": "QK_HAPTIC_DWELL_DOWN",
"aliases": [
"HF_DWLD"
]
},
"0x7C50": {
"group": "quantum",
"key": "QK_COMBO_ON",
"aliases": [
"CM_ON"
]
},
"0x7C51": {
"group": "quantum",
"key": "QK_COMBO_OFF",
"aliases": [
"CM_OFF"
]
},
"0x7C52": {
"group": "quantum",
"key": "QK_COMBO_TOGGLE",
"aliases": [
"CM_TOGG"
]
},
"0x7C53": {
"group": "quantum",
"key": "QK_DYNAMIC_MACRO_RECORD_START_1",
"aliases": [
"DM_REC1"
]
},
"0x7C54": {
"group": "quantum",
"key": "QK_DYNAMIC_MACRO_RECORD_START_2",
"aliases": [
"DM_REC2"
]
},
"0x7C55": {
"group": "quantum",
"key": "QK_DYNAMIC_MACRO_RECORD_STOP",
"aliases": [
"DM_RSTP"
]
},
"0x7C56": {
"group": "quantum",
"key": "QK_DYNAMIC_MACRO_PLAY_1",
"aliases": [
"DM_PLY1"
]
},
"0x7C57": {
"group": "quantum",
"key": "QK_DYNAMIC_MACRO_PLAY_2",
"aliases": [
"DM_PLY2"
]
},
"0x7C58": {
"group": "quantum",
"key": "QK_LEADER",
"aliases": [
"QK_LEAD"
]
},
"0x7C59": {
"group": "quantum",
"key": "QK_LOCK"
},
"0x7C5A": {
"group": "quantum",
"key": "QK_ONE_SHOT_ON",
"aliases": [
"OS_ON"
]
},
"0x7C5B": {
"group": "quantum",
"key": "QK_ONE_SHOT_OFF",
"aliases": [
"OS_OFF"
]
},
"0x7C5C": {
"group": "quantum",
"key": "QK_ONE_SHOT_TOGGLE",
"aliases": [
"OS_TOGG"
]
},
"0x7C5D": {
"group": "quantum",
"key": "QK_KEY_OVERRIDE_TOGGLE",
"aliases": [
"KO_TOGG"
]
},
"0x7C5E": {
"group": "quantum",
"key": "QK_KEY_OVERRIDE_ON",
"aliases": [
"KO_ON"
]
},
"0x7C5F": {
"group": "quantum",
"key": "QK_KEY_OVERRIDE_OFF",
"aliases": [
"KO_OFF"
]
},
"0x7C60": {
"group": "quantum",
"key": "QK_SECURE_LOCK",
"aliases": [
"SE_LOCK"
]
},
"0x7C61": {
"group": "quantum",
"key": "QK_SECURE_UNLOCK",
"aliases": [
"SE_UNLK"
]
},
"0x7C62": {
"group": "quantum",
"key": "QK_SECURE_TOGGLE",
"aliases": [
"SE_TOGG"
]
},
"0x7C63": {
"group": "quantum",
"key": "QK_SECURE_REQUEST",
"aliases": [
"SE_REQ"
]
},
"0x7C70": {
"group": "quantum",
"key": "QK_DYNAMIC_TAPPING_TERM_PRINT",
"aliases": [
"DT_PRNT"
]
},
"0x7C71": {
"group": "quantum",
"key": "QK_DYNAMIC_TAPPING_TERM_UP",
"aliases": [
"DT_UP"
]
},
"0x7C72": {
"group": "quantum",
"key": "QK_DYNAMIC_TAPPING_TERM_DOWN",
"aliases": [
"DT_DOWN"
]
},
"0x7C73": {
"group": "quantum",
"key": "QK_CAPS_WORD_TOGGLE",
"aliases": [
"CW_TOGG"
]
},
"0x7C74": {
"group": "quantum",
"key": "QK_AUTOCORRECT_ON",
"aliases": [
"AC_ON"
]
},
"0x7C75": {
"group": "quantum",
"key": "QK_AUTOCORRECT_OFF",
"aliases": [
"AC_OFF"
]
},
"0x7C76": {
"group": "quantum",
"key": "QK_AUTOCORRECT_TOGGLE",
"aliases": [
"AC_TOGG"
]
}
}
}

View file

@ -0,0 +1,40 @@
{
"keycodes": {
"0x7200": {
"group": "sequencer",
"key": "SQ_ON"
},
"0x7201": {
"group": "sequencer",
"key": "SQ_OFF"
},
"0x7202": {
"group": "sequencer",
"key": "SQ_TOG"
},
"0x7203": {
"group": "sequencer",
"key": "SQ_TMPD"
},
"0x7204": {
"group": "sequencer",
"key": "SQ_TMPU"
},
"0x7205": {
"group": "sequencer",
"key": "SQ_RESD"
},
"0x7206": {
"group": "sequencer",
"key": "SQ_RESU"
},
"0x7207": {
"group": "sequencer",
"key": "SQ_SALL"
},
"0x7208": {
"group": "sequencer",
"key": "SQ_SCLR"
}
}
}

View file

@ -0,0 +1,20 @@
{
"keycodes": {
"0x74F0": {
"group": "steno",
"key": "QK_STENO_BOLT"
},
"0x74F1": {
"group": "steno",
"key": "QK_STENO_GEMINI"
},
"0x74F2": {
"group": "steno",
"key": "QK_STENO_COMB"
},
"0x74FC": {
"group": "steno",
"key": "QK_STENO_COMB_MAX"
}
}
}

View file

@ -0,0 +1,32 @@
{
"keycodes": {
"0x56F0": {
"group": "swap_hands",
"key": "SH_TG"
},
"0x56F1": {
"group": "swap_hands",
"key": "SH_TT"
},
"0x56F2": {
"group": "swap_hands",
"key": "SH_MON"
},
"0x56F3": {
"group": "swap_hands",
"key": "SH_MOFF"
},
"0x56F4": {
"group": "swap_hands",
"key": "SH_OFF"
},
"0x56F5": {
"group": "swap_hands",
"key": "SH_ON"
},
"0x56F6": {
"group": "swap_hands",
"key": "SH_OS"
}
}
}

View file

@ -10,6 +10,12 @@
"bootloader": "atmel-dfu", "bootloader": "atmel-dfu",
"pin_compatible": "promicro" "pin_compatible": "promicro"
}, },
"elite_pi": {
"processor": "RP2040",
"bootloader": "rp2040",
"board": "QMK_PM2040",
"pin_compatible": "promicro"
},
"proton_c": { "proton_c": {
"processor": "STM32F303", "processor": "STM32F303",
"bootloader": "stm32-dfu", "bootloader": "stm32-dfu",
@ -64,7 +70,7 @@
"bonsai_c4": { "bonsai_c4": {
"processor": "STM32F411", "processor": "STM32F411",
"bootloader": "stm32-dfu", "bootloader": "stm32-dfu",
"board": "GENERIC_STM32_F411XE", "board": "BONSAI_C4",
"pin_compatible": "promicro" "pin_compatible": "promicro"
} }
} }

View file

@ -1,29 +1,28 @@
# 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. // to correctly and consistently map back and forth between the two systems.
{ {
# Format: // Format:
# <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} // <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", "bool", "int", "hex", "list", "mapping", "str", "raw" // value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping", "str", "raw"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json // 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 // 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 // warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists // deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists // invalid: Default `false`. Set to `true` to generate errors when a value exists
# replace_with: use with a key marked deprecated or invalid to designate a replacement // replace_with: use with a key marked deprecated or invalid to designate a replacement
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
"BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"}, "BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
"BACKLIGHT_LIMIT_VAL": {"info_key": "backlight.max_brightness", "value_type": "int"},
"BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"}, "BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
"BACKLIGHT_PIN": {"info_key": "backlight.pin"}, "BACKLIGHT_PIN": {"info_key": "backlight.pin"},
"BACKLIGHT_PINS": {"info_key": "backlight.pins", "value_type": "array"},
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"}, "BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
"CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"}, "CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
"COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"},
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"}, "DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
# TODO: Replace ^^^ with vvv
#"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version"},
"DIODE_DIRECTION": {"info_key": "diode_direction"}, "DIODE_DIRECTION": {"info_key": "diode_direction"},
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"}, "DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"},
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"}, "FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
@ -31,6 +30,8 @@
"DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "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": {"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"}, "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"},
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "bool"},
"HOLD_ON_OTHER_KEY_PRESS_PER_KEY": {"info_key": "tapping.hold_on_other_key_press_per_key", "value_type": "bool"},
"LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"},
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"}, "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_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"},
@ -41,7 +42,14 @@
"LED_COMPOSE_PIN": {"info_key": "indicators.compose"}, "LED_COMPOSE_PIN": {"info_key": "indicators.compose"},
"LED_KANA_PIN": {"info_key": "indicators.kana"}, "LED_KANA_PIN": {"info_key": "indicators.kana"},
"LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"}, "LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"},
"MANUFACTURER": {"info_key": "manufacturer"}, "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
"LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"},
"LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
"LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"},
"LED_MATRIX_HUE_STEP": {"info_key": "led_matrix.hue_steps", "value_type": "int"},
"LED_MATRIX_SAT_STEP": {"info_key": "led_matrix.sat_steps", "value_type": "int"},
"LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"},
"LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"}, "MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"},
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"}, "MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"}, "MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
@ -53,21 +61,13 @@
"ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "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": {"info_key": "tapping.permissive_hold", "value_type": "bool"},
"PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"}, "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"},
"PS2_CLOCK_PIN": {"info_key": "ps2.clock_pin"},
"PS2_DATA_PIN": {"info_key": "ps2.data_pin"},
"RETRO_TAPPING": {"info_key": "tapping.retro", "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"}, "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"},
"RGB_DI_PIN": {"info_key": "rgblight.pin"}, "RGB_DI_PIN": {"info_key": "rgblight.pin"},
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
"RGBLIGHT_EFFECT_ALTERNATING": {"info_key": "rgblight.animations.alternating", "value_type": "bool"},
"RGBLIGHT_EFFECT_BREATHING": {"info_key": "rgblight.animations.breathing", "value_type": "bool"},
"RGBLIGHT_EFFECT_CHRISTMAS": {"info_key": "rgblight.animations.christmas", "value_type": "bool"},
"RGBLIGHT_EFFECT_KNIGHT": {"info_key": "rgblight.animations.knight", "value_type": "bool"},
"RGBLIGHT_EFFECT_RAINBOW_MOOD": {"info_key": "rgblight.animations.rainbow_mood", "value_type": "bool"},
"RGBLIGHT_EFFECT_RAINBOW_SWIRL": {"info_key": "rgblight.animations.rainbow_swirl", "value_type": "bool"},
"RGBLIGHT_EFFECT_RGB_TEST": {"info_key": "rgblight.animations.rgb_test", "value_type": "bool"},
"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_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "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_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
@ -78,10 +78,15 @@
"RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_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_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"},
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
"RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"},
"RGB_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "rgb_matrix.max_brightness", "value_type": "int"},
"RGB_MATRIX_SPLIT": {"info_key": "rgb_matrix.split_count", "value_type": "array.int"},
"RGB_MATRIX_TIMEOUT": {"info_key": "rgb_matrix.timeout", "value_type": "int"},
"RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"},
"RGB_MATRIX_SAT_STEP": {"info_key": "rgb_matrix.sat_steps", "value_type": "int"},
"RGB_MATRIX_VAL_STEP": {"info_key": "rgb_matrix.val_steps", "value_type": "int"},
"RGB_MATRIX_SPD_STEP": {"info_key": "rgb_matrix.speed_steps", "value_type": "int"},
"RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"},
"PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": 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_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"},
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
"QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"},
@ -95,6 +100,8 @@
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "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": {"info_key": "split.usb_detect.timeout", "value_type": "int"},
"SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"}, "SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"},
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "bool"},
"SPLIT_WATCHDOG_TIMEOUT": {"info_key": "split.transport.watchdog_timeout", "value_type": "int"},
"SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"}, "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"}, "SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
"TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"}, "TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"},
@ -108,7 +115,7 @@
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "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"}, "USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},
# Items we want flagged in lint // Items we want flagged in lint
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true}, "NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true}, "NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true}, "DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
@ -116,5 +123,12 @@
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true}, "PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
"UNUSED_PINS": {"info_key": "_invalid.unused_pins", "deprecated": true}, "UNUSED_PINS": {"info_key": "_invalid.unused_pins", "deprecated": true},
"RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool", "deprecated": true}, "RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool", "deprecated": true},
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true} "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true},
// USB params, need to mark as failure when specified in config.h, rather than deprecated
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"},
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.vid` in info.json"},
"PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false, "value_type": "str", "deprecated": true, "replace_with": "`keyboard_name` in info.json"},
"MANUFACTURER": {"info_key": "manufacturer", "value_type": "str", "deprecated": true, "replace_with": "`manufacturer` in info.json"},
"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version", "deprecated": true, "replace_with": "`usb.device_version` in info.json"}
} }

View file

@ -1,18 +1,18 @@
# 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. // to correctly and consistently map back and forth between the two systems.
{ {
# Format: // Format:
# <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} // <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", "bool", "int", "list", "hex", "mapping", "str", "raw" // value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping", "str", "raw"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json // 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 // 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 // warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists // deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists // invalid: Default `false`. Set to `true` to generate errors when a value exists
# replace_with: use with a key marked deprecated or invalid to designate a replacement // replace_with: use with a key marked deprecated or invalid to designate a replacement
"BOARD": {"info_key": "board"}, "BOARD": {"info_key": "board"},
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BLUETOOTH": {"info_key": "bluetooth.driver"}, "BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"}, "CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
"DEBOUNCE_TYPE": {"info_key": "build.debounce_type"}, "DEBOUNCE_TYPE": {"info_key": "build.debounce_type"},
"ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"}, "ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"},
@ -33,8 +33,11 @@
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}, "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"},
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"}, "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
"STENO_PROTOCOL": {"info_key": "stenography.protocol"}, "STENO_PROTOCOL": {"info_key": "stenography.protocol"},
"PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"},
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},
"PS2_DRIVER": {"info_key": "ps2.driver"},
# Items we want flagged in lint // Items we want flagged in lint
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"}, "CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"}, "CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true} "VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -68,20 +68,8 @@
"type": "number" "type": "number"
}, },
"keyboard": { "keyboard": {
"oneOf": [
{
"type": "string",
"enum": [
"converter/numeric_keypad_IIe",
"emptystring/NQG",
"maple_computing/christmas_tree/V2017"
]
},
{
"type": "string", "type": "string",
"pattern": "^[0-9a-z][0-9a-z_/]*$" "pattern": "^[0-9a-z][0-9a-z_/]*$"
}
]
}, },
"mcu_pin_array": { "mcu_pin_array": {
"type": "array", "type": "array",

View file

@ -34,15 +34,66 @@
}, },
"development_board": { "development_board": {
"type": "string", "type": "string",
"enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"] "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"]
}, },
"pin_compatible": { "pin_compatible": {
"type": "string", "type": "string",
"enum": ["promicro"] "enum": ["promicro", "elite_c"]
}, },
"processor": { "processor": {
"type": "string", "type": "string",
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK64FX512", "MK66FX1M0", "RP2040", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "WB32FQ95", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] "enum": [
"cortex-m0",
"cortex-m0plus",
"cortex-m3",
"cortex-m4",
"cortex-m7",
"cortex-m23",
"cortex-m33",
"cortex-m35p",
"cortex-m55",
"cortex-m85",
"MKL26Z64",
"MK20DX128",
"MK20DX256",
"MK64FX512",
"MK66FX1M0",
"RP2040",
"STM32F042",
"STM32F072",
"STM32F103",
"STM32F303",
"STM32F401",
"STM32F405",
"STM32F407",
"STM32F411",
"STM32F446",
"STM32G431",
"STM32G474",
"STM32L412",
"STM32L422",
"STM32L432",
"STM32L433",
"STM32L442",
"STM32L443",
"GD32VF103",
"WB32F3G71",
"WB32FQ95",
"atmega16u2",
"atmega32u2",
"atmega16u4",
"atmega32u4",
"at90usb162",
"at90usb646",
"at90usb647",
"at90usb1286",
"at90usb1287",
"atmega32a",
"atmega328p",
"atmega328",
"attiny85",
"unknown"
]
}, },
"audio": { "audio": {
"type": "object", "type": "object",
@ -64,7 +115,9 @@
"minimum": 1, "minimum": 1,
"maximum": 31 "maximum": 31
}, },
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"on_state": {"$ref": "qmk.definitions.v1#/bit"} "on_state": {"$ref": "qmk.definitions.v1#/bit"}
} }
}, },
@ -75,8 +128,7 @@
"driver": { "driver": {
"type": "string", "type": "string",
"enum": ["BluefruitLE", "RN42"] "enum": ["BluefruitLE", "RN42"]
}, }
"lto": {"type": "boolean"}
} }
}, },
"board": { "board": {
@ -89,7 +141,6 @@
"enum": [ "enum": [
"atmel-dfu", "atmel-dfu",
"bootloadhid", "bootloadhid",
"bootloadHID",
"caterina", "caterina",
"custom", "custom",
"gd32v-dfu", "gd32v-dfu",
@ -106,7 +157,6 @@
"tinyuf2", "tinyuf2",
"unknown", "unknown",
"usbasploader", "usbasploader",
"USBasp",
"wb32-dfu" "wb32-dfu"
] ]
}, },
@ -267,7 +317,31 @@
"led_matrix": { "led_matrix": {
"type": "object", "type": "object",
"properties": { "properties": {
"animations": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"driver": {"type": "string"}, "driver": {"type": "string"},
"center_point": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sat_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"split_count": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
},
"layout": { "layout": {
"type": "array", "type": "array",
"items": { "items": {
@ -294,7 +368,31 @@
"rgb_matrix": { "rgb_matrix": {
"type": "object", "type": "object",
"properties": { "properties": {
"animations": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"driver": {"type": "string"}, "driver": {"type": "string"},
"center_point": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sat_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"split_count": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
},
"layout": { "layout": {
"type": "array", "type": "array",
"items": { "items": {
@ -393,6 +491,20 @@
} }
} }
}, },
"ps2": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {"type": "boolean"},
"mouse_enabled": {"type": "boolean"},
"clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"driver": {
"type": "string",
"enum": ["busywait", "interrupt", "usart", "vendor"]
}
}
},
"split": { "split": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
@ -449,7 +561,9 @@
"enum": ["custom", "i2c", "serial", "serial_usart"] "enum": ["custom", "i2c", "serial", "serial_usart"]
}, },
"sync_matrix_state": {"type": "boolean"}, "sync_matrix_state": {"type": "boolean"},
"sync_modifiers": {"type": "boolean"} "sync_modifiers": {"type": "boolean"},
"watchdog": {"type": "boolean"},
"watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
} }
}, },
"usb_detect": { "usb_detect": {
@ -474,6 +588,8 @@
"force_hold_per_key": {"type": "boolean"}, "force_hold_per_key": {"type": "boolean"},
"ignore_mod_tap_interrupt": {"type": "boolean"}, "ignore_mod_tap_interrupt": {"type": "boolean"},
"ignore_mod_tap_interrupt_per_key": {"type": "boolean"}, "ignore_mod_tap_interrupt_per_key": {"type": "boolean"},
"hold_on_other_key_press": {"type": "boolean"},
"hold_on_other_key_press_per_key": {"type": "boolean"},
"permissive_hold": {"type": "boolean"}, "permissive_hold": {"type": "boolean"},
"permissive_hold_per_key": {"type": "boolean"}, "permissive_hold_per_key": {"type": "boolean"},
"retro": {"type": "boolean"}, "retro": {"type": "boolean"},
@ -487,7 +603,10 @@
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, # Deprecated "device_ver": {
"$ref": "qmk.definitions.v1#/hex_number_4d",
"$comment": "Deprecated: use device_version instead"
},
"device_version": {"$ref": "qmk.definitions.v1#/bcd_version"}, "device_version": {"$ref": "qmk.definitions.v1#/bcd_version"},
"force_nkro": {"type": "boolean"}, "force_nkro": {"type": "boolean"},
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},

View file

@ -0,0 +1,57 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"$id": "qmk.keycodes.v1",
"title": "Keycode Information",
"type": "object",
"definitions": {
"define": {
"type": "string",
"minLength": 2,
"maxLength": 50,
"pattern": "^[A-Zs_0-9]*$"
},
"hex_number_4d": {
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
}
},
"properties": {
"ranges": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "object",
"required": [
"define"
],
"properties": {
"define": {"$ref": "#/definitions/define"}
}
}
},
"keycodes": {
"type": "object",
"propertyNames": {
"$ref": "#/definitions/hex_number_4d"
},
"additionalProperties": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {"$ref": "#/definitions/define"},
"aliases": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
}
}
}
}

View file

@ -5,6 +5,10 @@
"type": "object", "type": "object",
"properties": { "properties": {
"author": {"type": "string"}, "author": {"type": "string"},
"converter": {
"type": "string",
"enum": ["elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bonsai_c4"]
},
"host_language": {"$ref": "qmk.definitions.v1#/text_identifier"}, "host_language": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},

View file

@ -56,19 +56,19 @@ You can now define up to 32 macros in your `keymap.json` file, as used by [QMK C
"keyboard": "handwired/my_macropad", "keyboard": "handwired/my_macropad",
"keymap": "my_keymap", "keymap": "my_keymap",
"macros": [ "macros": [
[ // first listed is MACRO_0... [ // first listed is QK_MACRO_0...
{"action":"down", "keycodes": ["LSFT"]}, {"action":"down", "keycodes": ["LSFT"]},
"hello world1", "hello world1",
{"action": "up","keycodes": ["LSFT"]} {"action": "up","keycodes": ["LSFT"]}
], ],
[ // ...then MACRO_1... [ // ...then QK_MACRO_1...
{"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]} {"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]}
], ],
[ // ...then MACRO_2... [ // ...then QK_MACRO_2...
"ding!", "ding!",
{"action":"beep"} {"action":"beep"}
], ],
[ // ...and MACRO_3. [ // ...and QK_MACRO_3.
{"action":"tap", "keycodes": ["F1"]}, {"action":"tap", "keycodes": ["F1"]},
{"action":"delay", "duration": "1000"}, {"action":"delay", "duration": "1000"},
{"action":"tap", "keycodes": ["PGDN"]} {"action":"tap", "keycodes": ["PGDN"]}
@ -76,7 +76,7 @@ You can now define up to 32 macros in your `keymap.json` file, as used by [QMK C
], ],
"layout": "LAYOUT_all", "layout": "LAYOUT_all",
"layers": [ "layers": [
["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"] ["QK_MACRO_0", "QK_MACRO_1", "QK_MACRO_2", "QK_MACRO_3"]
] ]
} }
``` ```

510
docs/ChangeLog/20221126.md Normal file
View file

@ -0,0 +1,510 @@
# QMK Breaking Changes - 2022 November 26 Changelog
## Notable Features :id=notable-features
### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) :id=autocorrect
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](feature_autocorrect.md) for more ifnormation (grin).
## 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 |
|--------------------------------------|--------------------------------------|
| converter/numeric_keypad_IIe | converter/numeric_keypad_iie |
| durgod/k3x0/k310 | durgod/k310 |
| durgod/k3x0/k320 | durgod/k320 |
| emptystring/NQG | emptystring/nqg |
| handwired/hillside/46 | hillside/46 |
| handwired/hillside/48 | hillside/48 |
| handwired/hillside/52 | hillside/52 |
| maple_computing/christmas_tree/V2017 | maple_computing/christmas_tree/v2017 |
### Keycodes refactoring :id=keycodes-overhaul-user-action
QMK's keycodes got a very significant overhaul this breaking changes cycle, with the bulk of the work done by _@zvecr_ and _@fauxpark_ -- renaming, reordering, removing has been their focus in this area. In an attempt to standardise interoperation with host applications, keycode values now have strong versioning so that any connected application has confidence that the keys it thinks exist on the board actually match up with what's compiled in. These strongly-versioned keycode definitions are now published online and will not change, so tools that remap keycodes have a reference to work with. In future versions of QMK, any new or changed keycodes will result in a new version specification. See [API docs](api_docs.md#qmk-constants) for more information on the published versions if you're writing a tool to manage keycodes.
In most cases user keymaps in the repository have already been updated to reflect the new naming scheme. In some cases user keymaps outside the repository may strike a missing keycode with the old name -- it's highly likely that the name had already been deprecated for some time, and should have been updated previously.
See below for the full list of changesets.
!> Keycode aliases have been put in place in most cases to cater for "old names" being mapped to "new names" -- the documentation already reflects all the new naming of keys.
### Configuration Item Refactoring :id=config-refactoring
A number of configuration items have been renamed for consistency.
RGB Matrix configuration:
| Old Config | New Config |
|-------------------------|-------------------------|
| DRIVER_LED_COUNT | RGB_MATRIX_LED_COUNT |
| RGB_DISABLE_TIMEOUT | RGB_MATRIX_TIMEOUT |
| RGB_MATRIX_STARTUP_HUE | RGB_MATRIX_DEFAULT_HUE |
| RGB_MATRIX_STARTUP_MODE | RGB_MATRIX_DEFAULT_MODE |
| RGB_MATRIX_STARTUP_SAT | RGB_MATRIX_DEFAULT_SAT |
| RGB_MATRIX_STARTUP_SPD | RGB_MATRIX_DEFAULT_SPD |
| RGB_MATRIX_STARTUP_VAL | RGB_MATRIX_DEFAULT_VAL |
LED Matrix configuration:
| Old Config | New Config |
|-------------------------|-------------------------|
| DRIVER_LED_COUNT | LED_MATRIX_LED_COUNT |
| LED_DISABLE_TIMEOUT | LED_MATRIX_TIMEOUT |
| LED_MATRIX_STARTUP_MODE | LED_MATRIX_DEFAULT_MODE |
| LED_MATRIX_STARTUP_SPD | LED_MATRIX_DEFAULT_SPD |
| LED_MATRIX_STARTUP_VAL | LED_MATRIX_DEFAULT_VAL |
Joystick configuration:
| Old Config | New Config |
|--------------------------|--------------------------|
| JOYSTICK_AXES_COUNT | JOYSTICK_AXIS_COUNT |
| JOYSTICK_AXES_RESOLUTION | JOYSTICK_AXIS_RESOLUTION |
### Data-driven USB IDs Refactoring ([#18152](https://github.com/qmk/qmk_firmware/pull/18152)) :id=usb-ids-Refactoring
QMK has decided to deprecate the specification of USB IDs inside `config.h` in favour of `info.json`, leaving data-driven as the only method to specify USB information. As per the deprecation schedule put forward last breaking changes cycle, USB information must be specified in `info.json` instead.
Previously in `config.h`:
```c
#define VENDOR_ID 0x1234
#define PRODUCT_ID 0x5678
#define DEVICE_VER 0x0001
#define MANUFACTURER Me
#define PRODUCT MyKeyboard
```
Replaced by `info.json`:
```json
{
"keyboard_name": "MyKeyboard",
"manufacturer": "Me",
"usb": {
"vid": "0x1234",
"pid": "0x5678",
"device_version": "0.0.1"
}
}
```
### LED Indicator callback refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/18450)) :id=led-callback-refactor
_RGB Matrix_ and _LED Matrix_ Indicator display code was traditionally difficult to override in keymaps as they did not follow the standard pattern of `bool *_kb()` deferring to `bool *_user()` functions, allowing signalling to the higher level that processing had already been done.
This changes the standard callback model to allow for a base implementation to be provided by a keyboard, but also still allow for keymap-level overrides without needing to modify the keyboard's code.
The old RGB Matrix keymap code went something like this:
```c
void rgb_matrix_indicators_user(void) {
// keymap LED code
}
```
...but the new RGB Matrix keymap code looks like this:
```c
bool rgb_matrix_indicators_user(void) {
// keymap LED code
return false;
}
```
Keyboard designers should now structure their keyboard-level routines like the following, in order to allow for keymap overrides:
```c
bool rgb_matrix_indicators_kb(void) {
// Defer to the keymap if they want to override
if (!rgb_matrix_indicators_user()) { return false; }
// keyboard LED code
return true;
}
```
The equivalent transformations should be done for LED Matrix boards.
### Unicode mode refactoring :id=unicode-mode-renaming
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](feature_unicode.md#setting-the-input-mode) for the new list of values and how to configure them.
## Notable core changes :id=notable-core
This breaking changes cycle, a lot of the core changes are related to cleanup and refactoring -- commonly called "tech debt".
### Keycodes refactoring :id=keycodes-overhaul-core-changes
We aren't going to list each and every change -- they're far too numerous -- instead, we'll just list the related PRs in order to convey just how wide-reaching these changes were:
* Align audio keycode names ([#18962](https://github.com/qmk/qmk_firmware/pull/18962))
* Align dynamic tapping term keycode names ([#18963](https://github.com/qmk/qmk_firmware/pull/18963))
* Align haptic feedback keycode names ([#18964](https://github.com/qmk/qmk_firmware/pull/18964))
* Deprecate `CAPS_WORD`/`CAPSWRD` for `CW_TOGG` ([#18834](https://github.com/qmk/qmk_firmware/pull/18834))
* Deprecate `KC_LEAD` for `QK_LEAD` ([#18792](https://github.com/qmk/qmk_firmware/pull/18792))
* Deprecate `KC_LOCK` for `QK_LOCK` ([#18796](https://github.com/qmk/qmk_firmware/pull/18796))
* Deprecate `KEY_OVERRIDE_*` keycodes for `KO_*` ([#18843](https://github.com/qmk/qmk_firmware/pull/18843))
* Deprecate `ONESHOT_*` keycodes for `QK_ONE_SHOT_*` ([#18844](https://github.com/qmk/qmk_firmware/pull/18844))
* Deprecate `SECURE_*` keycodes for `QK_SECURE_*` ([#18847](https://github.com/qmk/qmk_firmware/pull/18847))
* Deprecate `VLK_TOG` for `VK_TOGG` ([#18807](https://github.com/qmk/qmk_firmware/pull/18807))
* Initial DD keycode migration ([#18643](https://github.com/qmk/qmk_firmware/pull/18643))
* Macro keycode name refactoring ([#18958](https://github.com/qmk/qmk_firmware/pull/18958))
* Move mousekey keycodes into newly freed up keycode block ([#16076](https://github.com/qmk/qmk_firmware/pull/16076))
* Normalise Auto Shift keycodes ([#18892](https://github.com/qmk/qmk_firmware/pull/18892))
* Normalise Autocorrect keycodes ([#18893](https://github.com/qmk/qmk_firmware/pull/18893))
* Normalise Combo keycodes ([#18877](https://github.com/qmk/qmk_firmware/pull/18877))
* Normalise Dynamic Macro keycodes ([#18939](https://github.com/qmk/qmk_firmware/pull/18939))
* Normalise Joystick and Programmable Button keycodes ([#18832](https://github.com/qmk/qmk_firmware/pull/18832))
* Normalise MIDI keycodes ([#18972](https://github.com/qmk/qmk_firmware/pull/18972))
* Normalise output selection (Bluetooth) keycodes ([#19004](https://github.com/qmk/qmk_firmware/pull/19004))
* Normalise Space Cadet keycodes ([#18864](https://github.com/qmk/qmk_firmware/pull/18864))
* Normalise Unicode keycodes ([#18898](https://github.com/qmk/qmk_firmware/pull/18898))
* Publish constants metadata to API ([#19143](https://github.com/qmk/qmk_firmware/pull/19143))
* Relocate US ANSI shifted keycode aliases ([#18634](https://github.com/qmk/qmk_firmware/pull/18634))
* Remove `KC_DELT` ([#18882](https://github.com/qmk/qmk_firmware/pull/18882))
* Remove `UNICODE_KEY_OSX` and `UC_OSX` ([#18290](https://github.com/qmk/qmk_firmware/pull/18290))
* Remove deprecated RESET keycode alias ([#18271](https://github.com/qmk/qmk_firmware/pull/18271))
* Remove legacy Debug keycode ([#18769](https://github.com/qmk/qmk_firmware/pull/18769))
* Remove legacy EEPROM clear keycodes ([#18782](https://github.com/qmk/qmk_firmware/pull/18782))
* Remove legacy fauxclicky and unicode keycodes ([#18800](https://github.com/qmk/qmk_firmware/pull/18800))
* Remove legacy Grave Escape keycodes ([#18787](https://github.com/qmk/qmk_firmware/pull/18787))
* Remove legacy international keycodes ([#18588](https://github.com/qmk/qmk_firmware/pull/18588))
* Remove legacy keycodes, part 2 ([#18660](https://github.com/qmk/qmk_firmware/pull/18660))
* Remove legacy keycodes, part 3 ([#18669](https://github.com/qmk/qmk_firmware/pull/18669))
* Remove legacy keycodes, part 4 ([#18683](https://github.com/qmk/qmk_firmware/pull/18683))
* Remove legacy keycodes, part 5 ([#18710](https://github.com/qmk/qmk_firmware/pull/18710))
* Remove legacy keycodes, part 6 ([#18740](https://github.com/qmk/qmk_firmware/pull/18740))
* Remove legacy locking caps/num/scroll keycodes ([#18601](https://github.com/qmk/qmk_firmware/pull/18601))
* Remove legacy sendstring keycodes ([#18749](https://github.com/qmk/qmk_firmware/pull/18749))
* Reworked backlight keycodes. ([#18961](https://github.com/qmk/qmk_firmware/pull/18961))
### Board Converters :id=board-converters
There was additional work in the space of board converters -- historically QMK allowed for "converting" a Pro Micro build to a QMK Proton-C build. The last few versions of QMK have added support for replacement boards much like the Proton-C, and this quarter was no exception:
* Add Bonsai C4 as a platform board file ([#18901](https://github.com/qmk/qmk_firmware/pull/18901))
* Add converter support to keymap.json ([#18776](https://github.com/qmk/qmk_firmware/pull/18776))
* Add Elite-C to converters ([#18309](https://github.com/qmk/qmk_firmware/pull/18309))
* Add Elite-Pi converter ([#18236](https://github.com/qmk/qmk_firmware/pull/18236))
* Allow QK_MAKE to work with converters ([#18637](https://github.com/qmk/qmk_firmware/pull/18637))
See [Feature: Converters](feature_converters.md) for the full list of board conversions available.
### Pointing and Digitizer device updates :id=pointing-and-digitizer
Both pointing devices and digitizer got a host of updates this cycle. Inertia, automatic mouse layers, fixes for preventing sleep... you even get more buttons with digitizers!
* add "inertia" mode for mouse keys ([#18774](https://github.com/qmk/qmk_firmware/pull/18774))
* Digitizer feature improvements ([#19034](https://github.com/qmk/qmk_firmware/pull/19034))
* Enabling Pointing Device support in register code functions ([#18363](https://github.com/qmk/qmk_firmware/pull/18363))
* Feature: pointing device automatic mouse layer ([#17962](https://github.com/qmk/qmk_firmware/pull/17962))
* Fix mouse report comparison failing on shared EP (fixes KB preventing sleep) ([#18060](https://github.com/qmk/qmk_firmware/pull/18060))
* Fix mouse use within send_string ([#18659](https://github.com/qmk/qmk_firmware/pull/18659))
* Handle mouse keys more consistently ([#18513](https://github.com/qmk/qmk_firmware/pull/18513))
* Invert pointing device motion pin for cirque touchpads ([#18404](https://github.com/qmk/qmk_firmware/pull/18404))
* Refactor more host code (programmable button & digitizer) ([#18565](https://github.com/qmk/qmk_firmware/pull/18565))
## Full changelist :id=full-changelist
Core:
* quantum: led: split out led_update_ports() for customization of led behaviour ([#14452](https://github.com/qmk/qmk_firmware/pull/14452))
* Add getreuer's Autocorrect feature to core ([#15699](https://github.com/qmk/qmk_firmware/pull/15699))
* Move mousekey keycodes into newly freed up keycode block ([#16076](https://github.com/qmk/qmk_firmware/pull/16076))
* Introduce pointing device specific debug messages ([#17663](https://github.com/qmk/qmk_firmware/pull/17663))
* PWM Backlight for RP2040 ([#17706](https://github.com/qmk/qmk_firmware/pull/17706))
* Adjust PWM hardware audio driver for RP2040 ([#17723](https://github.com/qmk/qmk_firmware/pull/17723))
* Prevent tap dance from wiping dynamic macros ([#17880](https://github.com/qmk/qmk_firmware/pull/17880))
* Feature: pointing device automatic mouse layer ([#17962](https://github.com/qmk/qmk_firmware/pull/17962))
* Allow custom timings for WS2812 PIO driver ([#18006](https://github.com/qmk/qmk_firmware/pull/18006))
* Use `TAP_CODE_DELAY` for encoder mapping by default. Add docs. ([#18098](https://github.com/qmk/qmk_firmware/pull/18098))
* Move Oneshot mod callbacks to after mods are set ([#18101](https://github.com/qmk/qmk_firmware/pull/18101))
* mcp23018: add return status to init ([#18178](https://github.com/qmk/qmk_firmware/pull/18178))
* Switch over MANUFACTURER and PRODUCT to string literals ([#18183](https://github.com/qmk/qmk_firmware/pull/18183))
* Remove deprecated USBasp and bootloadHID bootloader types ([#18195](https://github.com/qmk/qmk_firmware/pull/18195))
* Chromeos keycodes ([#18212](https://github.com/qmk/qmk_firmware/pull/18212))
* VIA V3 - The Custom UI Update ([#18222](https://github.com/qmk/qmk_firmware/pull/18222))
* Move bootloader.mk to platforms ([#18228](https://github.com/qmk/qmk_firmware/pull/18228))
* Simplify extrakeys sending at the host driver level ([#18230](https://github.com/qmk/qmk_firmware/pull/18230))
* Add unicode mode change callbacks ([#18235](https://github.com/qmk/qmk_firmware/pull/18235))
* Add Elite-Pi converter ([#18236](https://github.com/qmk/qmk_firmware/pull/18236))
* Better handle EEPROM reset keycode ([#18244](https://github.com/qmk/qmk_firmware/pull/18244))
* Work around WinCompose issue for U+Axxx or U+Exxx ([#18260](https://github.com/qmk/qmk_firmware/pull/18260))
* Remove deprecated RESET keycode alias ([#18271](https://github.com/qmk/qmk_firmware/pull/18271))
* Move Bluetooth-related function calls up to host/keyboard level ([#18274](https://github.com/qmk/qmk_firmware/pull/18274))
* Added analog support for WB32 MCU. ([#18289](https://github.com/qmk/qmk_firmware/pull/18289))
* Remove `UNICODE_KEY_OSX` and `UC_OSX` ([#18290](https://github.com/qmk/qmk_firmware/pull/18290))
* Add Elite-C to converters ([#18309](https://github.com/qmk/qmk_firmware/pull/18309))
* RN42 driver: small cleanups ([#18310](https://github.com/qmk/qmk_firmware/pull/18310))
* Reboot wb32 devices after flashing ([#18323](https://github.com/qmk/qmk_firmware/pull/18323))
* Refactor Unicode feature ([#18333](https://github.com/qmk/qmk_firmware/pull/18333))
* Move fake EE_HANDS from EEPROM init. ([#18352](https://github.com/qmk/qmk_firmware/pull/18352))
* Enabling Pointing Device support in register code functions ([#18363](https://github.com/qmk/qmk_firmware/pull/18363))
* Start Bluetooth API ([#18366](https://github.com/qmk/qmk_firmware/pull/18366))
* Add UART support for Kinetis boards ([#18370](https://github.com/qmk/qmk_firmware/pull/18370))
* [QP] Add RGB565 surface. Docs clarification, cleanup, tabsification, and reordering. ([#18396](https://github.com/qmk/qmk_firmware/pull/18396))
* Change `DRIVER_LED_COUNT` to `{LED,RGB}_MATRIX_LED_COUNT` ([#18399](https://github.com/qmk/qmk_firmware/pull/18399))
* Invert pointing device motion pin for cirque touchpads ([#18404](https://github.com/qmk/qmk_firmware/pull/18404))
* Change `{LED,RGB}_DISABLE_TIMEOUT` to `{LED,RGB}_MATRIX_TIMEOUT` ([#18415](https://github.com/qmk/qmk_firmware/pull/18415))
* rewrite locking in split transaction handlers ([#18417](https://github.com/qmk/qmk_firmware/pull/18417))
* remove busy waiting from rgblight functions ([#18418](https://github.com/qmk/qmk_firmware/pull/18418))
* Serial-protocol: always clear receive queue on main half of split keyboard ([#18419](https://github.com/qmk/qmk_firmware/pull/18419))
* Stabilize RP2040 Half-duplex PIO split comms take 2 ([#18421](https://github.com/qmk/qmk_firmware/pull/18421))
* Copy RP2040 vector table to RAM on startup ([#18424](https://github.com/qmk/qmk_firmware/pull/18424))
* Further refactoring of joystick feature ([#18437](https://github.com/qmk/qmk_firmware/pull/18437))
* Start moving towards introspection-based data retrieval ([#18441](https://github.com/qmk/qmk_firmware/pull/18441))
* RP2040: use built-in integer hardware divider and optimized i64 multiplication ([#18464](https://github.com/qmk/qmk_firmware/pull/18464))
* Only trigger encoder callbacks on primary side ([#18467](https://github.com/qmk/qmk_firmware/pull/18467))
* Handle mouse keys more consistently ([#18513](https://github.com/qmk/qmk_firmware/pull/18513))
* Gentoo install script — build newlib with `nano` USE flag ([#18527](https://github.com/qmk/qmk_firmware/pull/18527))
* Small un/register_code() cleanups ([#18544](https://github.com/qmk/qmk_firmware/pull/18544))
* Refactor more host code (programmable button & digitizer) ([#18565](https://github.com/qmk/qmk_firmware/pull/18565))
* Don't clear keys on layer change unless STRICT_LAYER_RELEASE is enabled ([#18577](https://github.com/qmk/qmk_firmware/pull/18577))
* Remove legacy international keycodes ([#18588](https://github.com/qmk/qmk_firmware/pull/18588))
* onekey: Enable ADC for STM32F072 Discovery ([#18592](https://github.com/qmk/qmk_firmware/pull/18592))
* Implement split comms watchdog ([#18599](https://github.com/qmk/qmk_firmware/pull/18599))
* Remove legacy locking caps/num/scroll keycodes ([#18601](https://github.com/qmk/qmk_firmware/pull/18601))
* Use `get_u16_str` instead of `snprintf` in `autoshift_timer_report` ([#18606](https://github.com/qmk/qmk_firmware/pull/18606))
* Refactor `send_extra` ([#18615](https://github.com/qmk/qmk_firmware/pull/18615))
* LUFA: Consolidate report sending code ([#18629](https://github.com/qmk/qmk_firmware/pull/18629))
* Relocate US ANSI shifted keycode aliases ([#18634](https://github.com/qmk/qmk_firmware/pull/18634))
* Allow QK_MAKE to work with converters ([#18637](https://github.com/qmk/qmk_firmware/pull/18637))
* Programmable Button API refactor and improve docs ([#18641](https://github.com/qmk/qmk_firmware/pull/18641))
* Initial DD keycode migration ([#18643](https://github.com/qmk/qmk_firmware/pull/18643))
* Remove legacy keycodes, part 2 ([#18660](https://github.com/qmk/qmk_firmware/pull/18660))
* Remove legacy keycodes, part 3 ([#18669](https://github.com/qmk/qmk_firmware/pull/18669))
* Remove legacy keycodes, part 4 ([#18683](https://github.com/qmk/qmk_firmware/pull/18683))
* Revert "mcp23018: add return status to init" ([#18709](https://github.com/qmk/qmk_firmware/pull/18709))
* Remove legacy keycodes, part 5 ([#18710](https://github.com/qmk/qmk_firmware/pull/18710))
* Make QP driver init functions weak. ([#18717](https://github.com/qmk/qmk_firmware/pull/18717))
* Add unit tests for HOLD_ON_OTHER_KEY_PRESS ([#18721](https://github.com/qmk/qmk_firmware/pull/18721))
* Remove legacy keycodes, part 6 ([#18740](https://github.com/qmk/qmk_firmware/pull/18740))
* Remove legacy sendstring keycodes ([#18749](https://github.com/qmk/qmk_firmware/pull/18749))
* 4 Driver support for IS31FL3737 ([#18750](https://github.com/qmk/qmk_firmware/pull/18750))
* Remove quantum/audio from global VPATH ([#18753](https://github.com/qmk/qmk_firmware/pull/18753))
* Widen the ARM Cortex-M family support. Allow USB peripheral change. ([#18767](https://github.com/qmk/qmk_firmware/pull/18767))
* Remove legacy Debug keycode ([#18769](https://github.com/qmk/qmk_firmware/pull/18769))
* add "inertia" mode for mouse keys ([#18774](https://github.com/qmk/qmk_firmware/pull/18774))
* Remove legacy EEPROM clear keycodes ([#18782](https://github.com/qmk/qmk_firmware/pull/18782))
* Remove legacy Grave Escape keycodes ([#18787](https://github.com/qmk/qmk_firmware/pull/18787))
* Deprecate `KC_LEAD` for `QK_LEAD` ([#18792](https://github.com/qmk/qmk_firmware/pull/18792))
* Deprecate `KC_LOCK` for `QK_LOCK` ([#18796](https://github.com/qmk/qmk_firmware/pull/18796))
* Remove legacy fauxclicky and unicode keycodes ([#18800](https://github.com/qmk/qmk_firmware/pull/18800))
* Generalise CTPC logic from common_features ([#18803](https://github.com/qmk/qmk_firmware/pull/18803))
* Deprecate `VLK_TOG` for `VK_TOGG` ([#18807](https://github.com/qmk/qmk_firmware/pull/18807))
* ChibiOS USB: Add a dummy IN callback to work around LLD bugs ([#18811](https://github.com/qmk/qmk_firmware/pull/18811))
* Normalise Joystick and Programmable Button keycodes ([#18832](https://github.com/qmk/qmk_firmware/pull/18832))
* Deprecate `CAPS_WORD`/`CAPSWRD` for `CW_TOGG` ([#18834](https://github.com/qmk/qmk_firmware/pull/18834))
* added BS_TOGG so BS_SWAP and BS_NORM can be on a single key ([#18837](https://github.com/qmk/qmk_firmware/pull/18837))
* Remove some assumptions on sequential keycode ranges ([#18838](https://github.com/qmk/qmk_firmware/pull/18838))
* Deprecate `KEY_OVERRIDE_*` keycodes for `KO_*` ([#18843](https://github.com/qmk/qmk_firmware/pull/18843))
* Deprecate `ONESHOT_*` keycodes for `QK_ONE_SHOT_*` ([#18844](https://github.com/qmk/qmk_firmware/pull/18844))
* Deprecate `SECURE_*` keycodes for `QK_SECURE_*` ([#18847](https://github.com/qmk/qmk_firmware/pull/18847))
* Normalise Space Cadet keycodes ([#18864](https://github.com/qmk/qmk_firmware/pull/18864))
* Allow overriding of dynamic keymap start address. ([#18867](https://github.com/qmk/qmk_firmware/pull/18867))
* Formalise keyboard- and user-specific EEPROM blocks ([#18874](https://github.com/qmk/qmk_firmware/pull/18874))
* Normalise Combo keycodes ([#18877](https://github.com/qmk/qmk_firmware/pull/18877))
* Remove rgblight_list.h ([#18878](https://github.com/qmk/qmk_firmware/pull/18878))
* Remove `KC_DELT` ([#18882](https://github.com/qmk/qmk_firmware/pull/18882))
* Simplify Keymap Config EEPROM ([#18886](https://github.com/qmk/qmk_firmware/pull/18886))
* Normalise Auto Shift keycodes ([#18892](https://github.com/qmk/qmk_firmware/pull/18892))
* Normalise Autocorrect keycodes ([#18893](https://github.com/qmk/qmk_firmware/pull/18893))
* Normalise Unicode keycodes ([#18898](https://github.com/qmk/qmk_firmware/pull/18898))
* Add Bonsai C4 as a platform board file ([#18901](https://github.com/qmk/qmk_firmware/pull/18901))
* Normalise Dynamic Macro keycodes ([#18939](https://github.com/qmk/qmk_firmware/pull/18939))
* Reduce includes for sequencer header ([#18946](https://github.com/qmk/qmk_firmware/pull/18946))
* Reduce includes for crc header ([#18947](https://github.com/qmk/qmk_firmware/pull/18947))
* Reduce includes for caps_word header ([#18948](https://github.com/qmk/qmk_firmware/pull/18948))
* Reduce includes for wpm header ([#18949](https://github.com/qmk/qmk_firmware/pull/18949))
* Reduce includes for dip_switch header ([#18951](https://github.com/qmk/qmk_firmware/pull/18951))
* Reduce includes for send_string header ([#18952](https://github.com/qmk/qmk_firmware/pull/18952))
* Macro keycode name refactoring ([#18958](https://github.com/qmk/qmk_firmware/pull/18958))
* Remove thermal printer. ([#18959](https://github.com/qmk/qmk_firmware/pull/18959))
* Reworked backlight keycodes. ([#18961](https://github.com/qmk/qmk_firmware/pull/18961))
* Align audio keycode names ([#18962](https://github.com/qmk/qmk_firmware/pull/18962))
* Align dynamic tapping term keycode names ([#18963](https://github.com/qmk/qmk_firmware/pull/18963))
* Align haptic feedback keycode names ([#18964](https://github.com/qmk/qmk_firmware/pull/18964))
* NVRAM refactor, phase 1. ([#18969](https://github.com/qmk/qmk_firmware/pull/18969))
* Normalise MIDI keycodes ([#18972](https://github.com/qmk/qmk_firmware/pull/18972))
* Normalise output selection (Bluetooth) keycodes ([#19004](https://github.com/qmk/qmk_firmware/pull/19004))
* Move EFL wear-leveling driver to be default for F1, F3, F4, L4, G4, WB32, GD32V. ([#19020](https://github.com/qmk/qmk_firmware/pull/19020))
* Digitizer feature improvements ([#19034](https://github.com/qmk/qmk_firmware/pull/19034))
* Joystick feature improvements ([#19052](https://github.com/qmk/qmk_firmware/pull/19052))
* Add default limit to OLED dirty processing ([#19068](https://github.com/qmk/qmk_firmware/pull/19068))
* Change `RGB_MATRIX_STARTUP_*` defines to `RGB_MATRIX_DEFAULT_*` ([#19079](https://github.com/qmk/qmk_firmware/pull/19079))
* Change `LED_MATRIX_STARTUP_*` defines to `LED_MATRIX_DEFAULT_*` ([#19080](https://github.com/qmk/qmk_firmware/pull/19080))
* Extend eeconfig kb/user datablock API ([#19094](https://github.com/qmk/qmk_firmware/pull/19094))
* Remove .noci functionality ([#19122](https://github.com/qmk/qmk_firmware/pull/19122))
CLI:
* Reject json with duplicate keys ([#18108](https://github.com/qmk/qmk_firmware/pull/18108))
* Add pointing device support to data driven config ([#18215](https://github.com/qmk/qmk_firmware/pull/18215))
* Disconnect `usb.device_ver` ([#18259](https://github.com/qmk/qmk_firmware/pull/18259))
* Normalise info_config.h define generation ([#18439](https://github.com/qmk/qmk_firmware/pull/18439))
* Generate DD RGBLight/LED/RGB Matrix animation defines ([#18459](https://github.com/qmk/qmk_firmware/pull/18459))
* Add converter support to keymap.json ([#18776](https://github.com/qmk/qmk_firmware/pull/18776))
* Ensure consistent clean behaviour ([#18781](https://github.com/qmk/qmk_firmware/pull/18781))
* Format DD mappings and schemas ([#18924](https://github.com/qmk/qmk_firmware/pull/18924))
* Publish hjson files as json ([#18996](https://github.com/qmk/qmk_firmware/pull/18996))
* Add raw output option for QGF/QFF files. ([#18998](https://github.com/qmk/qmk_firmware/pull/18998))
* Improve LED config parsing error messages ([#19007](https://github.com/qmk/qmk_firmware/pull/19007))
* Revert "Add pointing device support to data driven config (#18215)" ([#19063](https://github.com/qmk/qmk_firmware/pull/19063))
* Additional DD backlight config ([#19124](https://github.com/qmk/qmk_firmware/pull/19124))
* Publish constants metadata to API ([#19143](https://github.com/qmk/qmk_firmware/pull/19143))
Submodule updates:
* Use a macro to compute the size of arrays at compile time ([#18044](https://github.com/qmk/qmk_firmware/pull/18044))
* Update pico-sdk to version 1.4.0 ([#18423](https://github.com/qmk/qmk_firmware/pull/18423))
Keyboards:
* Rework PS/2 driver selection ([#17892](https://github.com/qmk/qmk_firmware/pull/17892))
* Durgod K310/K320 Refactor ([#18224](https://github.com/qmk/qmk_firmware/pull/18224))
* Optimise LAYOUT macro generation ([#18262](https://github.com/qmk/qmk_firmware/pull/18262))
* Rename keyboards with uppercase letters ([#18268](https://github.com/qmk/qmk_firmware/pull/18268))
* Remove legacy USE_SERIAL define ([#18292](https://github.com/qmk/qmk_firmware/pull/18292))
* Resolve conflict merging master to develop ([#18297](https://github.com/qmk/qmk_firmware/pull/18297))
* Remove legacy define USE_SERIAL_PD2 ([#18298](https://github.com/qmk/qmk_firmware/pull/18298))
* Remove legacy define SERIAL_USE_MULTI_TRANSACTION ([#18299](https://github.com/qmk/qmk_firmware/pull/18299))
* Adapt spidey3 userspace to recent unicode refactoring ([#18345](https://github.com/qmk/qmk_firmware/pull/18345))
* Remove remaining use of terminal keys and related comment labels ([#18402](https://github.com/qmk/qmk_firmware/pull/18402))
* Add DD mapping for LED/RGB Matrix center ([#18432](https://github.com/qmk/qmk_firmware/pull/18432))
* develop updates for Drashna Keymaps ([#18472](https://github.com/qmk/qmk_firmware/pull/18472))
* Remove lingering `DRIVER_LED_TOTAL` references ([#18475](https://github.com/qmk/qmk_firmware/pull/18475))
* Remove lingering `DRIVER_LED_TOTAL` references ([#18594](https://github.com/qmk/qmk_firmware/pull/18594))
* update andrebrait GMMK Pro keymap ([#18608](https://github.com/qmk/qmk_firmware/pull/18608))
* AnnePro2: Adjust RGB flushing ([#18640](https://github.com/qmk/qmk_firmware/pull/18640))
* Remove lingering `DRIVER_LED_TOTAL` references ([#18662](https://github.com/qmk/qmk_firmware/pull/18662))
* Update snowe's KC_RESET to use QK_BOOT ([#18667](https://github.com/qmk/qmk_firmware/pull/18667))
* Remove some .gitignore files ([#18689](https://github.com/qmk/qmk_firmware/pull/18689))
* Remove keymaps that still reference legacy macros ([#18690](https://github.com/qmk/qmk_firmware/pull/18690))
* Remove keymaps that still reference legacy macros ([#18693](https://github.com/qmk/qmk_firmware/pull/18693))
* Remove stale userspace/keymaps ([#18700](https://github.com/qmk/qmk_firmware/pull/18700))
* Update keyboards readme ([#18714](https://github.com/qmk/qmk_firmware/pull/18714))
* Allow changes to the moonlander default music map ([#18715](https://github.com/qmk/qmk_firmware/pull/18715))
* led_update_kb -> led_update_ports where appropriate ([#18716](https://github.com/qmk/qmk_firmware/pull/18716))
* Update converter/usb_usb user keymaps to use LAYOUT_fullsize ([#18720](https://github.com/qmk/qmk_firmware/pull/18720))
* Remove RGBLIGHT_ANIMATION and clean up effect defines for G-K ([#18726](https://github.com/qmk/qmk_firmware/pull/18726))
* Remove RGBLIGHT_ANIMATION and clean up effect defines for L-Q ([#18727](https://github.com/qmk/qmk_firmware/pull/18727))
* Remove RGBLIGHT_ANIMATION and clean up effect defines for R-Z ([#18728](https://github.com/qmk/qmk_firmware/pull/18728))
* Remove RGBLIGHT_ANIMATION and clean up effect defines for layouts+users ([#18729](https://github.com/qmk/qmk_firmware/pull/18729))
* Update info.json configs to explicitly list RGBLIGHT animations ([#18730](https://github.com/qmk/qmk_firmware/pull/18730))
* A little personal cleanup after #18726 and #18729 ([#18734](https://github.com/qmk/qmk_firmware/pull/18734))
* Move Hillside out of handwired ([#18751](https://github.com/qmk/qmk_firmware/pull/18751))
* wilba_tech: allow keymaps to override backlight_effect_indicators() ([#18791](https://github.com/qmk/qmk_firmware/pull/18791))
* Remove broken userspace and keymaps ([#18806](https://github.com/qmk/qmk_firmware/pull/18806))
* Add support for KBDfans Odin V2 ([#18910](https://github.com/qmk/qmk_firmware/pull/18910))
* Remove more `UNUSED_PINS` defines ([#18940](https://github.com/qmk/qmk_firmware/pull/18940))
* Remove hardcoded VIA keycode range ([#18956](https://github.com/qmk/qmk_firmware/pull/18956))
* KC_GESC -> QK_GESC, better alignment for OCD ([#19018](https://github.com/qmk/qmk_firmware/pull/19018))
* Add missing `manufacturer` fields ([#19065](https://github.com/qmk/qmk_firmware/pull/19065))
* Update use of legacy keycodes ([#19120](https://github.com/qmk/qmk_firmware/pull/19120))
Keyboard fixes:
* [GMMK Pro] Fix unintentional taps to the volume keys when using the encoder ([#17129](https://github.com/qmk/qmk_firmware/pull/17129))
* Luna keyboard pet OLED timeout fix ([#17189](https://github.com/qmk/qmk_firmware/pull/17189))
* Handle escaping of manufacturer/product strings ([#18194](https://github.com/qmk/qmk_firmware/pull/18194))
* kegen/gboy: add manufacturer string ([#18196](https://github.com/qmk/qmk_firmware/pull/18196))
* Ensure all keyboards have a bootloader set ([#18234](https://github.com/qmk/qmk_firmware/pull/18234))
* Reverse keymap search order ([#18449](https://github.com/qmk/qmk_firmware/pull/18449))
* Fixup cradio bootloader/processor ([#18477](https://github.com/qmk/qmk_firmware/pull/18477))
* onekey: enable ADC for Bluepill and Blackpill ([#18545](https://github.com/qmk/qmk_firmware/pull/18545))
* Fixup controllerworks/mini42 ([#18553](https://github.com/qmk/qmk_firmware/pull/18553))
* RESET -> QK_BOOT user keymaps ([#18560](https://github.com/qmk/qmk_firmware/pull/18560))
* Fixup linworks/fave84h ([#18593](https://github.com/qmk/qmk_firmware/pull/18593))
* Fix compilation of 1upkeyboards on develop ([#18618](https://github.com/qmk/qmk_firmware/pull/18618))
* Various keyboard fixes ([#18649](https://github.com/qmk/qmk_firmware/pull/18649))
* Fixup twig50 ([#18651](https://github.com/qmk/qmk_firmware/pull/18651))
* Fixup handwired/jopr — remove deprecated keycode ([#18668](https://github.com/qmk/qmk_firmware/pull/18668))
* Fixup keychron/q3 ([#18687](https://github.com/qmk/qmk_firmware/pull/18687))
* Fixup dumbpad/v3x ([#18692](https://github.com/qmk/qmk_firmware/pull/18692))
* Fix aurora/sweep ([#18701](https://github.com/qmk/qmk_firmware/pull/18701))
* Fix build failures uncovered by #18753 ([#18789](https://github.com/qmk/qmk_firmware/pull/18789))
* Fixup emptystring/nqg ([#18804](https://github.com/qmk/qmk_firmware/pull/18804))
* Fixup controllerwords/mini36 ([#18840](https://github.com/qmk/qmk_firmware/pull/18840))
* Fixup 1upkeyboards/pi60_rgb ([#18858](https://github.com/qmk/qmk_firmware/pull/18858))
* Fixup doio/kb16 ([#18859](https://github.com/qmk/qmk_firmware/pull/18859))
* Fixup keebio/sinc/rev3 ([#18866](https://github.com/qmk/qmk_firmware/pull/18866))
* elephant42: fix default keymap ([#18884](https://github.com/qmk/qmk_firmware/pull/18884))
* Properly fix elephant42 ([#18908](https://github.com/qmk/qmk_firmware/pull/18908))
* Fix syntax error introduced in #18800 ([#18933](https://github.com/qmk/qmk_firmware/pull/18933))
* Resolve info.json/rules.mk feature conflicts in three boards ([#18942](https://github.com/qmk/qmk_firmware/pull/18942))
* Fix DD warnings for RGBKB boards ([#18944](https://github.com/qmk/qmk_firmware/pull/18944))
* Fix "no matrix definition" errors for some boards ([#18954](https://github.com/qmk/qmk_firmware/pull/18954))
* LED config fixes ([#18973](https://github.com/qmk/qmk_firmware/pull/18973))
* `handwired/swiftrax/walter`: fix layout mismatch ([#18974](https://github.com/qmk/qmk_firmware/pull/18974))
* Fix use of shifted custom keycode ([#18978](https://github.com/qmk/qmk_firmware/pull/18978))
* `pizzakeyboards/pizza65`: fix layouts ([#18979](https://github.com/qmk/qmk_firmware/pull/18979))
* `cannonkeys/db60/hotswap`: fix layouts ([#18982](https://github.com/qmk/qmk_firmware/pull/18982))
* `handwired/swiftrax/cowfish`: fix layouts ([#18984](https://github.com/qmk/qmk_firmware/pull/18984))
* Fixup hotdox76v2 on develop ([#18991](https://github.com/qmk/qmk_firmware/pull/18991))
* `mechlovin/adelais/standard_led/avr/rev1`: fix layout ([#18997](https://github.com/qmk/qmk_firmware/pull/18997))
* `gboards/gergoplex`: fix matrix pins ([#18999](https://github.com/qmk/qmk_firmware/pull/18999))
* Fixup keychron/q1/iso_encoder ([#19006](https://github.com/qmk/qmk_firmware/pull/19006))
* Rollback unrelated changes from previous PR. ([#19015](https://github.com/qmk/qmk_firmware/pull/19015))
* Fixup bn006 on develop ([#19029](https://github.com/qmk/qmk_firmware/pull/19029))
* onekey: disable NKRO and mousekeys by default ([#19038](https://github.com/qmk/qmk_firmware/pull/19038))
* Fix up laser_ninja/pumpkin_pad ([#19060](https://github.com/qmk/qmk_firmware/pull/19060))
* Fixup keychron/q6 ([#19066](https://github.com/qmk/qmk_firmware/pull/19066))
* Fixup handwired/alcor_dactyl ([#19072](https://github.com/qmk/qmk_firmware/pull/19072))
* Fix some old keycodes ([#19086](https://github.com/qmk/qmk_firmware/pull/19086))
* Update more `DRIVER_LED_TOTAL` defines to `RGB_MATRIX_LED_COUNT` ([#19089](https://github.com/qmk/qmk_firmware/pull/19089))
* Fix references to `mouse_report_t` (which doesnt exist) ([#19107](https://github.com/qmk/qmk_firmware/pull/19107))
* Fixup keychron/q5 ([#19119](https://github.com/qmk/qmk_firmware/pull/19119))
* Fixup aeboards/satellite ([#19137](https://github.com/qmk/qmk_firmware/pull/19137))
* Fixup aurora/corne on develop ([#19144](https://github.com/qmk/qmk_firmware/pull/19144))
* Minor lint fixes for various info.json ([#19146](https://github.com/qmk/qmk_firmware/pull/19146))
Others:
* Add DD mapping for LED/RGB Matrix max brightness ([#18403](https://github.com/qmk/qmk_firmware/pull/18403))
* Add DD mapping for LED/RGB Matrix split count ([#18408](https://github.com/qmk/qmk_firmware/pull/18408))
* Add DD mapping for LED/RGB Matrix HSVS steps ([#18414](https://github.com/qmk/qmk_firmware/pull/18414))
* Remove RGBLIGHT_ANIMTION and clean up effect defines for 0-F ([#18725](https://github.com/qmk/qmk_firmware/pull/18725))
* Merge API update workflow ([#19121](https://github.com/qmk/qmk_firmware/pull/19121))
Bugs:
* Fix layer switching from tap dances by redoing the keymap lookup ([#17935](https://github.com/qmk/qmk_firmware/pull/17935))
* ws2812: replace RGBLED_NUM with driver-owned constant to decouple driver from RGBLEDs/RGBMATRIX defines ([#18036](https://github.com/qmk/qmk_firmware/pull/18036))
* Prevent USB peripheral fault when restarting USB on WB32 MCUs ([#18058](https://github.com/qmk/qmk_firmware/pull/18058))
* Fix mouse report comparison failing on shared EP (fixes KB preventing sleep) ([#18060](https://github.com/qmk/qmk_firmware/pull/18060))
* Fix incorrect `bluetooth.driver` rules.mk mapping ([#18205](https://github.com/qmk/qmk_firmware/pull/18205))
* Adjust `EXTRAKEY_ENABLE` ifdefs for `send_extra()` ([#18249](https://github.com/qmk/qmk_firmware/pull/18249))
* Fix docs regarding cirque pinnacle attenuation ([#18279](https://github.com/qmk/qmk_firmware/pull/18279))
* Avoid repeated calls to rgblight_set() in tight succession when setting lighting layers ([#18338](https://github.com/qmk/qmk_firmware/pull/18338))
* Fix cirque tap from secondary side of split keyboard ([#18351](https://github.com/qmk/qmk_firmware/pull/18351))
* Fix EECONFIG_KEYMAP_UPPER_BYTE init ([#18394](https://github.com/qmk/qmk_firmware/pull/18394))
* Fix retain brightness when val is changed while a layer is active ([#18426](https://github.com/qmk/qmk_firmware/pull/18426))
* Update Chibios to latest 21.11.2 changes for RP2040 XIP deadlock mitigation ([#18428](https://github.com/qmk/qmk_firmware/pull/18428))
* Fix incorrect g_led_config generation ([#18431](https://github.com/qmk/qmk_firmware/pull/18431))
* Fix Per Key LED Indicator Callbacks ([#18450](https://github.com/qmk/qmk_firmware/pull/18450))
* Update chibios-contrib for RP2040 i2c fixes take 2 ([#18455](https://github.com/qmk/qmk_firmware/pull/18455))
* Fix comment of CM_QUES (Colemak question mark) ([#18557](https://github.com/qmk/qmk_firmware/pull/18557))
* ChibiOS: Fix USB bus disconnect handling ([#18566](https://github.com/qmk/qmk_firmware/pull/18566))
* Update ChibiOS-Contrib for USB IRQ and bus handling fixes ([#18574](https://github.com/qmk/qmk_firmware/pull/18574))
* RP2040: only clear RX FIFO for serial pio driver clear ([#18581](https://github.com/qmk/qmk_firmware/pull/18581))
* Fix ST7565 handler deadlock ([#18609](https://github.com/qmk/qmk_firmware/pull/18609))
* Fix/Update ChibiOS hardware ID ([#18613](https://github.com/qmk/qmk_firmware/pull/18613))
* Fix some rp2040 hardware ID errors ([#18617](https://github.com/qmk/qmk_firmware/pull/18617))
* Fix joystick functionality for ChibiOS and OTG (Blackpill) ([#18631](https://github.com/qmk/qmk_firmware/pull/18631))
* fix typo in solenoid.h ([#18635](https://github.com/qmk/qmk_firmware/pull/18635))
* Fix boundary in `RGB_MATRIX_INDICATOR_SET_COLOR` ([#18650](https://github.com/qmk/qmk_firmware/pull/18650))
* Fix MIDI output endpoint to use the out direction ([#18654](https://github.com/qmk/qmk_firmware/pull/18654))
* Fix mouse use within send_string ([#18659](https://github.com/qmk/qmk_firmware/pull/18659))
* Correctly build keymap.json containing additional config ([#18766](https://github.com/qmk/qmk_firmware/pull/18766))
* Correctly build out of tree keymap.json containing additional config ([#18775](https://github.com/qmk/qmk_firmware/pull/18775))
* Fix garbled test output ([#18822](https://github.com/qmk/qmk_firmware/pull/18822))
* Fix rgb_matrix_set_flags_noeeprom declaration ([#18860](https://github.com/qmk/qmk_firmware/pull/18860))
* Add missing Space Cadet alias ([#18876](https://github.com/qmk/qmk_firmware/pull/18876))
* Fix oled_render to render all dirty blocks. ([#18887](https://github.com/qmk/qmk_firmware/pull/18887))
* compiler.txt: ensure file exists before comparison ([#18921](https://github.com/qmk/qmk_firmware/pull/18921))
* Fix compilation issue with WPM ([#18965](https://github.com/qmk/qmk_firmware/pull/18965))
* Fix keycode parameter extraction to match the new DD keycodes ([#18977](https://github.com/qmk/qmk_firmware/pull/18977))
* Fix jump in mouse_report value when scale changes during cirque get report ([#18992](https://github.com/qmk/qmk_firmware/pull/18992))
* Fixup WS2812 vendor driver ([#19028](https://github.com/qmk/qmk_firmware/pull/19028))
* Add missing prototype for get_hold_on_other_key_press to resolve #18855 ([#19056](https://github.com/qmk/qmk_firmware/pull/19056))
* Fix duplicate key in keyboard.jsonschema ([#19058](https://github.com/qmk/qmk_firmware/pull/19058))
* Fixup `keyboard.jsonschema`. ([#19059](https://github.com/qmk/qmk_firmware/pull/19059))
* fixed MOUSEKEY_INERTIA on AVR ([#19096](https://github.com/qmk/qmk_firmware/pull/19096))
* Fix encoder_init call order in keyboard_init ([#19140](https://github.com/qmk/qmk_firmware/pull/19140))
* Fixup installation procedure for different Fedora versions. ([#19159](https://github.com/qmk/qmk_firmware/pull/19159))

View file

@ -76,6 +76,7 @@
* Software Features * Software Features
* [Auto Shift](feature_auto_shift.md) * [Auto Shift](feature_auto_shift.md)
* [Autocorrect](feature_autocorrect.md)
* [Caps Word](feature_caps_word.md) * [Caps Word](feature_caps_word.md)
* [Combos](feature_combo.md) * [Combos](feature_combo.md)
* [Debounce API](feature_debounce_type.md) * [Debounce API](feature_debounce_type.md)
@ -122,7 +123,6 @@
* [PS/2 Mouse](feature_ps2_mouse.md) * [PS/2 Mouse](feature_ps2_mouse.md)
* [Split Keyboard](feature_split_keyboard.md) * [Split Keyboard](feature_split_keyboard.md)
* [Stenography](feature_stenography.md) * [Stenography](feature_stenography.md)
* [Thermal Printer](feature_thermal_printer.md)
* [Velocikey](feature_velocikey.md) * [Velocikey](feature_velocikey.md)
* Keyboard Building * Keyboard Building
@ -136,7 +136,7 @@
* Breaking Changes * Breaking Changes
* [Overview](breaking_changes.md) * [Overview](breaking_changes.md)
* [My Pull Request Was Flagged](breaking_changes_instructions.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md)
* [Most Recent ChangeLog](ChangeLog/20220827.md "QMK v0.18.0 - 2022 Aug 27") * [Most Recent ChangeLog](ChangeLog/20221126.md "QMK v0.19.0 - 2022 Nov 26")
* [Past Breaking Changes](breaking_changes_history.md) * [Past Breaking Changes](breaking_changes_history.md)
* C Development * C Development

View file

@ -14,8 +14,8 @@ This service is an asynchronous API for compiling custom keymaps. You POST some
"keymap": "my_awesome_keymap", "keymap": "my_awesome_keymap",
"layout": "LAYOUT_all", "layout": "LAYOUT_all",
"layers": [ "layers": [
["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_MINS","KC_EQL","KC_GRV","KC_BSPC","KC_PGUP","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_LBRC","KC_RBRC","KC_BSLS","KC_PGDN","KC_CAPS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_NUHS","KC_ENT","KC_LSFT","KC_NUBS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RO","KC_RSFT","KC_UP","KC_LCTL","KC_LGUI","KC_LALT","KC_MHEN","KC_SPC","KC_SPC","KC_HENK","KC_RALT","KC_RCTL","MO(1)","KC_LEFT","KC_DOWN","KC_RIGHT"], ["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_MINS","KC_EQL","KC_GRV","KC_BSPC","KC_PGUP","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_LBRC","KC_RBRC","KC_BSLS","KC_PGDN","KC_CAPS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_NUHS","KC_ENT","KC_LSFT","KC_NUBS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_INT1","KC_RSFT","KC_UP","KC_LCTL","KC_LGUI","KC_LALT","KC_INT5","KC_SPC","KC_SPC","KC_INT4","KC_RALT","KC_RCTL","MO(1)","KC_LEFT","KC_DOWN","KC_RIGHT"],
["KC_ESC","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12","KC_TRNS","KC_DEL","BL_STEP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","_______","KC_TRNS","KC_PSCR","KC_SLCK","KC_PAUS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_LEFT","KC_PGDN","KC_RGHT"], ["KC_ESC","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12","KC_TRNS","KC_DEL","BL_STEP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","_______","KC_TRNS","KC_PSCR","KC_SCRL","KC_PAUS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_LEFT","KC_PGDN","KC_RGHT"],
["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","QK_BOOT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_TRNS","KC_TRNS","KC_TRNS"] ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","QK_BOOT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_TRNS","KC_TRNS","KC_TRNS"]
] ]
} }
@ -66,3 +66,41 @@ Once your compile job has finished you'll check the `result` key. The value of t
* `firmware_keymap_url`: A list of URLs for the `keymap.c` * `firmware_keymap_url`: A list of URLs for the `keymap.c`
* `firmware_source_url`: A list of URLs for the full firmware source code * `firmware_source_url`: A list of URLs for the full firmware source code
* `output`: The stdout and stderr for this compile job. Errors will be found here. * `output`: The stdout and stderr for this compile job. Errors will be found here.
## Constants :id=qmk-constants
If you're writing a tool that leverages constants used within QMK, the API is used to publish "locked-in" versions of those constants in order to ensure that any third-party tooling has a canonical set of information to work with.
The list of available constants can be retrieved by accessing one of the following endpoints:
```
$ curl https://keyboards.qmk.fm/v1/constants_metadata.json # For `master`
{"last_updated": "2022-11-26 00:00:00 GMT", "constants": {"keycodes": ["0.0.1"]}}
$ curl https://keyboards.develop.qmk.fm/v1/constants_metadata.json # For `develop`
{"last_updated": "2022-11-26 12:00:00 GMT", "constants": {"keycodes": ["0.0.1", "0.0.2"]}}
```
!> Versions exported by the `master` endpoint are locked-in. Any extra versions that exist on the `develop` endpoint which don't exist in `master` are subject to change.
?> Only keycodes are currently published, but over time all other "externally visible" IDs are expected to appear on these endpoints.
To retrieve the constants associated with a subsystem, the endpoint format is as follows:
```
# https://keyboards.qmk.fm/v1/constants/{subsystem}_{version}.json
```
Which, for the metadata endpoint above results in a request of:
```
$ curl https://keyboards.qmk.fm/v1/constants/keycodes_0.0.1.json
{
"ranges": {
"0x0000/0x00FF": {
"define": "QK_BASIC"
},
"0x0100/0x1EFF": {
"define": "QK_MODS"
},
"0x2000/0x1FFF": {
"define": "QK_MOD_TAP"
<snip>
```

View file

@ -159,7 +159,6 @@ A configuration example for the STM32F103C8 would be:
//halconf.h: //halconf.h:
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE #define HAL_USE_PAL TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h> #include_next <halconf.h>
``` ```
@ -168,8 +167,6 @@ A configuration example for the STM32F103C8 would be:
#include_next <mcuconf.h> #include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM1 #undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE #define STM32_PWM_USE_TIM1 TRUE
#undef STM32_GPT_USE_TIM4
#define STM32_GPT_USE_TIM4 TRUE
``` ```
If we now target pin A8, looking through the data-sheet of the STM32F103C8, for the timers and alternate functions If we now target pin A8, looking through the data-sheet of the STM32F103C8, for the timers and alternate functions
@ -184,7 +181,6 @@ with all this information, the configuration would contain these lines:
#define AUDIO_PIN A8 #define AUDIO_PIN A8
#define AUDIO_PWM_DRIVER PWMD1 #define AUDIO_PWM_DRIVER PWMD1
#define AUDIO_PWM_CHANNEL 1 #define AUDIO_PWM_CHANNEL 1
#define AUDIO_STATE_TIMER GPTD4
``` ```
ChibiOS uses GPIOv1 for the F103, which only knows of one alternate function. ChibiOS uses GPIOv1 for the F103, which only knows of one alternate function.
@ -208,14 +204,14 @@ You can also change the timer used for software PWM by defining the driver. For
While not an exhaustive list, the following table provides the scenarios that have been partially validated: While not an exhaustive list, the following table provides the scenarios that have been partially validated:
| | DAC basic | DAC additive | PWM hardware | PWM software | | | DAC basic | DAC additive | PWM hardware | PWM software |
|--------------------------|--------------------|--------------------|--------------------|--------------------| | ------------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| Atmega32U4 | :o: | :o: | :heavy_check_mark: | :o: | | Atmega32U4 | :o: | :o: | :heavy_check_mark: | :o: |
| RP2040 | :x: | :x: | :heavy_check_mark: | ? |
| STM32F103C8 (bluepill) | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | | STM32F103C8 (bluepill) | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| STM32F303CCT6 (proton-c) | :heavy_check_mark: | :heavy_check_mark: | ? | :heavy_check_mark: | | STM32F303CCT6 (proton-c) | :heavy_check_mark: | :heavy_check_mark: | ? | :heavy_check_mark: |
| STM32F405VG | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | STM32F405VG | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| L0xx | :x: (no Tim8) | ? | ? | ? | | L0xx | :x: (no Tim8) | ? | ? | ? |
:heavy_check_mark: : works and was tested :heavy_check_mark: : works and was tested
:o: : does not apply :o: : does not apply
:x: : not supported by MCU :x: : not supported by MCU

View file

@ -8,6 +8,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? ## What has been included in past Breaking Changes?
* [2022 Nov 26](ChangeLog/20221126.md)
* [2022 Aug 27](ChangeLog/20220827.md) * [2022 Aug 27](ChangeLog/20220827.md)
* [2022 May 28](ChangeLog/20220528.md) * [2022 May 28](ChangeLog/20220528.md)
* [2022 Feb 26](ChangeLog/20220226.md) * [2022 Feb 26](ChangeLog/20220226.md)
@ -23,18 +24,18 @@ The breaking change period is when we will merge PR's that change QMK in dangero
## When is the next Breaking Change? ## When is the next Breaking Change?
The next Breaking Change is scheduled for November 26, 2022. The next Breaking Change is scheduled for February 26, 2023.
### Important Dates ### Important Dates
* 2022 Aug 27 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions. * 2022 Nov 26 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions.
* 2022 Oct 29 - `develop` closed to new PR's. * 2022 Jan 29 - `develop` closed to new PR's.
* 2022 Oct 29 - Call for testers. * 2022 Jan 29 - Call for testers.
* 2022 Nov 12 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes * 2022 Feb 12 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes
* 2022 Nov 19 - `develop` is locked, only critical bugfix PR's merged. * 2022 Feb 19 - `develop` is locked, only critical bugfix PR's merged.
* 2022 Nov 24 - `master` is locked, no PR's merged. * 2022 Feb 24 - `master` is locked, no PR's merged.
* 2022 Nov 26 - Merge `develop` to `master`. * 2022 Feb 26 - Merge `develop` to `master`.
* 2022 Nov 26 - `master` is unlocked. PR's can be merged again. * 2023 Feb 26 - `master` is unlocked. PR's can be merged again.
## What changes will be included? ## What changes will be included?

View file

@ -2,6 +2,7 @@
This page links to all previous changelogs from the QMK Breaking Changes process. This page links to all previous changelogs from the QMK Breaking Changes process.
* [2022 Nov 26](ChangeLog/20221126.md) - version 0.19.0
* [2022 Aug 27](ChangeLog/20220827.md) - version 0.18.0 * [2022 Aug 27](ChangeLog/20220827.md) - version 0.18.0
* [2022 May 28](ChangeLog/20220528.md) - version 0.17.0 * [2022 May 28](ChangeLog/20220528.md) - version 0.17.0
* [2022 Feb 26](ChangeLog/20220226.md) - version 0.16.0 * [2022 Feb 26](ChangeLog/20220226.md) - version 0.16.0

View file

@ -49,11 +49,11 @@ This is a C header file that is one of the first things included, and will persi
* defines your VID, and for most DIY projects, can be whatever you want * defines your VID, and for most DIY projects, can be whatever you want
* `#define PRODUCT_ID 0x5678` * `#define PRODUCT_ID 0x5678`
* defines your PID, and for most DIY projects, can be whatever you want * defines your PID, and for most DIY projects, can be whatever you want
* `#define DEVICE_VER 0` * `#define DEVICE_VER 0x0100`
* defines the device version (often used for revisions) * defines the device version (often used for revisions)
* `#define MANUFACTURER Me` * `#define MANUFACTURER "Me"`
* generally who/whatever brand produced the board * generally who/whatever brand produced the board
* `#define PRODUCT Board` * `#define PRODUCT "Board"`
* the name of the keyboard * the name of the keyboard
* `#define MATRIX_ROWS 5` * `#define MATRIX_ROWS 5`
* the number of rows in your keyboard's matrix * the number of rows in your keyboard's matrix
@ -326,6 +326,13 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_TIMEOUT_POLL 10` * `#define SPLIT_USB_TIMEOUT_POLL 10`
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` * Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
* `#define SPLIT_WATCHDOG_ENABLE`
* Reboot slave if no communication from master within timeout.
* Helps resolve issue where both sides detect as slave using `SPLIT_USB_DETECT`
* `#define SPLIT_WATCHDOG_TIMEOUT 3000`
* Maximum slave timeout when waiting for communication from master when using `SPLIT_WATCHDOG_ENABLE`
* `#define FORCED_SYNC_THROTTLE_MS 100` * `#define FORCED_SYNC_THROTTLE_MS 100`
* Deadline for synchronizing data from master to slave when using the QMK-provided split transport. * Deadline for synchronizing data from master to slave when using the QMK-provided split transport.

View file

@ -122,26 +122,26 @@ There is a way to support custom keycodes: if the logic for a custom keycode is
```c ```c
enum custom_keycodes { enum custom_keycodes {
MACRO_1 = SAFE_RANGE, CUSTOM_1 = SAFE_RANGE,
MACRO_2, CUSTOM_2,
MACRO_3 CUSTOM_3
}; };
... ...
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case MACRO_1: case CUSTOM_1:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #1."); SEND_STRING("This is custom keycode #1.");
} }
return false; return false;
case MACRO_2: case CUSTOM_2:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #2."); SEND_STRING("This is custom keycode #2.");
} }
return false; return false;
case MACRO_3: case CUSTOM_3:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #3."); SEND_STRING("This is custom keycode #3.");
} }
return false; return false;
} }
@ -153,9 +153,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
```c ```c
enum keyboard_keycodes { enum keyboard_keycodes {
MACRO_1 = SAFE_RANGE, CUSTOM_1 = SAFE_RANGE,
MACRO_2, CUSTOM_2,
MACRO_3, CUSTOM_3,
NEW_SAFE_RANGE // Important! NEW_SAFE_RANGE // Important!
}; };
``` ```
@ -165,19 +165,19 @@ enum keyboard_keycodes {
```c ```c
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case MACRO_1: case CUSTOM_1:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #1."); SEND_STRING("This is custom keycode #1.");
} }
return false; return false;
case MACRO_2: case CUSTOM_2:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #2."); SEND_STRING("This is custom keycode #2.");
} }
return false; return false;
case MACRO_3: case CUSTOM_3:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #3."); SEND_STRING("This is custom keycode #3.");
} }
return false; return false;
} }

View file

@ -41,7 +41,7 @@ In other cases you should group like options together in an `object`. This is pa
### Add a mapping ### Add a mapping
In most cases you can add a simple mapping. These are maintained as JSON files in `data/mappings/info_config.json` and `data/mappings/info_rules.json`, and control mapping for `config.h` and `rules.mk`, respectively. Each mapping is keyed by the `config.h` or `rules.mk` variable, and the value is a hash with the following keys: In most cases you can add a simple mapping. These are maintained as JSON files in `data/mappings/info_config.hjson` and `data/mappings/info_rules.hjson`, and control mapping for `config.h` and `rules.mk`, respectively. Each mapping is keyed by the `config.h` or `rules.mk` variable, and the value is a hash with the following keys:
* `info_key`: (required) The location within `info.json` for this value. See below. * `info_key`: (required) The location within `info.json` for this value. See below.
* `value_type`: (optional) Default `raw`. The format for this variable's value. See below. * `value_type`: (optional) Default `raw`. The format for this variable's value. See below.

View file

@ -4,7 +4,7 @@ This page details various common questions people have about troubleshooting the
## Debugging :id=debugging ## Debugging :id=debugging
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap. Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
```c ```c
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {

View file

@ -161,9 +161,11 @@ It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif
The available keycodes for audio are: The available keycodes for audio are:
* `AU_ON` - Turn Audio Feature on |Key |Aliases |Description |
* `AU_OFF` - Turn Audio Feature off |-------------------------|---------|-------------------------------------------|
* `AU_TOG` - Toggle Audio Feature state |`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
!> 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. !> 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.
@ -219,6 +221,12 @@ Aka "audio effects", different ones can be enabled by setting in `config.h` thes
`#define AUDIO_VOICES` to enable the feature, and `#define AUDIO_VOICE_DEFAULT something` to select a specific effect `#define AUDIO_VOICES` to enable the feature, and `#define AUDIO_VOICE_DEFAULT something` to select a specific effect
for details see quantum/audio/voices.h and .c for details see quantum/audio/voices.h and .c
Keycodes available:
|Key |Aliases |Description |
|-------------------------|---------|-------------------------------------------|
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |
## Music Mode ## Music Mode
@ -228,10 +236,14 @@ Recording is experimental due to some memory issues - if you experience some wei
Keycodes available: Keycodes available:
* `MU_ON` - Turn music mode on |Key |Aliases |Description |
* `MU_OFF` - Turn music mode off |-------------------------|---------|-------------------------------------------|
* `MU_TOG` - Toggle music mode |`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
* `MU_MOD` - Cycle through the music modes: |`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
Available Modes:
* `CHROMATIC_MODE` - Chromatic scale, row changes the octave * `CHROMATIC_MODE` - Chromatic scale, row changes the octave
* `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st) * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
* `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st) * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
@ -300,13 +312,16 @@ You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e
This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly. This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly.
* `CK_TOGG` - Toggles the status (will play sound if enabled) Keycodes available:
* `CK_ON` - Turns on Audio Click (plays sound)
* `CK_OFF` - Turns off Audio Click (doesn't play sound)
* `CK_RST` - Resets the frequency to the default state (plays sound at default frequency)
* `CK_UP` - Increases the frequency of the clicks (plays sound at new frequency)
* `CK_DOWN` - Decreases the frequency of the clicks (plays sound at new frequency)
|Key |Aliases |Description |
|-------------------------|---------|-------------------------------------------|
|`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
The feature is disabled by default, to save space. To enable it, add this to your `config.h`: The feature is disabled by default, to save space. To enable it, add this to your `config.h`:
@ -334,15 +349,19 @@ See [MIDI](feature_midi.md)
## Audio Keycodes ## Audio Keycodes
|Key |Aliases |Description | |Key |Aliases |Description |
|----------------|---------|----------------------------------| |-------------------------|---------|-------------------------------------------|
|`AU_ON` | |Audio mode on | |`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|`AU_OFF` | |Audio mode off | |`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|`AU_TOG` | |Toggles Audio mode | |`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode | |`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks | |`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks | |`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default | |`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|`MU_ON` | |Turns on Music Mode | |`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|`MU_OFF` | |Turns off Music Mode | |`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|`MU_TOG` | |Toggles Music Mode | |`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
|`MU_MOD` | |Cycles through the music modes | |`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |

View file

@ -300,14 +300,14 @@ This will enable you to define three keys temporarily to increase, decrease and
Map three keys temporarily in your keymap: Map three keys temporarily in your keymap:
| Key Name | Description | |Keycode |Aliases |Description |
|----------|-----------------------------------------------------| |----------------------|---------|--------------------------------------------|
| KC_ASDN | Lower the Auto Shift timeout variable (down) | |`QK_AUTO_SHIFT_DOWN` |`AS_DOWN`|Lower the Auto Shift timeout variable (down)|
| KC_ASUP | Raise the Auto Shift timeout variable (up) | |`QK_AUTO_SHIFT_UP` |`AS_UP` |Raise the Auto Shift timeout variable (up) |
| KC_ASRP | Report your current Auto Shift timeout value | |`QK_AUTO_SHIFT_REPORT`|`AS_RPT` |Report your current Auto Shift timeout value|
| KC_ASON | Turns on the Auto Shift Function | |`QK_AUTO_SHIFT_ON` |`AS_ON` |Turns on the Auto Shift Function |
| KC_ASOFF | Turns off the Auto Shift Function | |`QK_AUTO_SHIFT_OFF` |`AS_OFF` |Turns off the Auto Shift Function |
| KC_ASTG | Toggles the state of the Auto Shift feature | |`QK_AUTO_SHIFT_TOGGLE`|`AS_TOGG`|Toggles the state of the Auto Shift feature |
Compile and upload your new firmware. Compile and upload your new firmware.
@ -318,18 +318,18 @@ completely normal and with no intention of shifted keys.
1. Type multiple sentences of alphabetical letters. 1. Type multiple sentences of alphabetical letters.
2. Observe any upper case letters. 2. Observe any upper case letters.
3. If there are none, press the key you have mapped to `KC_ASDN` to decrease 3. If there are none, press the key you have mapped to `AS_DOWN` to decrease
time Auto Shift timeout value and go back to step 1. time Auto Shift timeout value and go back to step 1.
4. If there are some upper case letters, decide if you need to work on tapping 4. If there are some upper case letters, decide if you need to work on tapping
those keys with less down time, or if you need to increase the timeout. those keys with less down time, or if you need to increase the timeout.
5. If you decide to increase the timeout, press the key you have mapped to 5. If you decide to increase the timeout, press the key you have mapped to
`KC_ASUP` and go back to step 1. `AS_UP` and go back to step 1.
6. Once you are happy with your results, press the key you have mapped to 6. Once you are happy with your results, press the key you have mapped to
`KC_ASRP`. The keyboard will type by itself the value of your `AS_RPT`. The keyboard will type by itself the value of your
`AUTO_SHIFT_TIMEOUT`. `AUTO_SHIFT_TIMEOUT`.
7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported. 7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported.
8. Add `AUTO_SHIFT_NO_SETUP` to your `config.h`. 8. Add `AUTO_SHIFT_NO_SETUP` to your `config.h`.
9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`. 9. Remove the key bindings `AS_DOWN`, `AS_UP` and `AS_RPT`.
10. Compile and upload your new firmware. 10. Compile and upload your new firmware.
#### An Example Run #### An Example Run
@ -337,17 +337,17 @@ completely normal and with no intention of shifted keys.
hello world. my name is john doe. i am a computer programmer playing with hello world. my name is john doe. i am a computer programmer playing with
keyboards right now. keyboards right now.
[PRESS KC_ASDN quite a few times] [PRESS AS_DOWN quite a few times]
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
KEYboArDS RiGHT NOw. KEYboArDS RiGHT NOw.
[PRESS KC_ASUP a few times] [PRESS AS_UP a few times]
hello world. my name is john Doe. i am a computer programmer playing with hello world. my name is john Doe. i am a computer programmer playing with
keyboarDs right now. keyboarDs right now.
[PRESS KC_ASRP] [PRESS AS_RPT]
115 115

295
docs/feature_autocorrect.md Normal file
View file

@ -0,0 +1,295 @@
# Autocorrect
There are a lot of words that are prone to being typed incorrectly, due to habit, sequence or just user error. This feature leverages your firmware to automatically correct these errors, to help reduce typos.
## How does it work? :id=how-does-it-work
The feature maintains a small buffer of recent key presses. On each key press, it checks whether the buffer ends in a recognized typo, and if so, automatically sends keystrokes to correct it.
The tricky part is how to efficiently check the buffer for typos. We dont want to spend too much memory or time on storing or searching the typos. A good solution is to represent the typos with a trie data structure. A trie is a tree data structure where each node is a letter, and words are formed by following a path to one of the leaves.
![An example trie](https://i.imgur.com/HL5DP8H.png)
Since we search whether the buffer ends in a typo, we store the trie writing in reverse. The trie is queried starting from the last letter, then second to last letter, and so on, until either a letter doesnt match or we reach a leaf, meaning a typo was found.
## How do I enable Autocorrection :id=how-do-i-enable-autocorrection
In your `rules.mk`, add this:
```make
AUTOCORRECT_ENABLE = yes
```
Additionally, you will need a library for autocorrection. A small sample library is included by default, so that you can get up and running right away, but you can provide a customized library.
By default, autocorrect is disabled. To enable it, you need to use the `AC_TOGG` keycode to enable it. The status is stored in persistent memory, so you shouldn't need to enabled it again.
## Customizing autocorrect library :id=customizing-autocorrect-library
To provide a custom library, you need to create a text file with the corrections. For instance:
```text
:thier -> their
fitler -> filter
lenght -> length
ouput -> output
widht -> width
```
The syntax is `typo -> correction`. Typos and corrections are case insensitive, and any whitespace before or after the typo and correction is ignored. The typo must be only the letters az, or the special character : representing a word break. The correction may have any non-unicode characters.
Then, run:
```sh
qmk generate-autocorrect-data autocorrect_dictionary.txt
```
This will process the file and produce an `autocorrect_data.h` file with the trie library, in the folder that you are at. You can specify the keyboard and keymap (eg `-kb planck/rev6 -km jackhumbert`), and it will place the file in that folder instead. But as long as the file is located in your keymap folder, or user folder, it should be picked up automatically.
This file will look like this:
```c
// :thier -> their
// fitler -> filter
// lenght -> length
// ouput -> output
// widht -> width
#define AUTOCORRECT_MIN_LENGTH 5 // "ouput"
#define AUTOCORRECT_MAX_LENGTH 6 // ":thier"
#define DICTIONARY_SIZE 74
static const uint8_t autocorrect_data[DICTIONARY_SIZE] PROGMEM = {85, 7, 0, 23, 35, 0, 0, 8, 0, 76, 16, 0, 15, 25, 0, 0,
11, 23, 44, 0, 130, 101, 105, 114, 0, 23, 12, 9, 0, 131, 108, 116, 101, 114, 0, 75, 42, 0, 24, 64, 0, 0, 71, 49, 0,
10, 56, 0, 0, 12, 26, 0, 129, 116, 104, 0, 17, 8, 15, 0, 129, 116, 104, 0, 19, 24, 18, 0, 130, 116, 112, 117, 116,
0};
```
### Avoiding false triggers :id=avoiding-false-triggers
By default, typos are searched within words, to find typos within longer identifiers like maxFitlerOuput. While this is useful, a consequence is that autocorrection will falsely trigger when a typo happens to be a substring of a correctly-spelled word. For instance, if we had thier -> their as an entry, it would falsely trigger on (correct, though relatively uncommon) words like “wealthier” and “filthier.”
The solution is to set a word break : before and/or after the typo to constrain matching. : matches space, period, comma, underscore, digits, and most other non-alpha characters.
|Text |thier |:thier |thier: |:thier: |
|-----------------|:------:|:------:|:------:|:------:|
|see `thier` typo |matches |matches |matches |matches |
|its `thiers` |matches |matches |no |no |
|wealthier words |matches |no |matches |no |
:thier: is most restrictive, matching only when thier is a whole word.
The `qmk generate-autocorrect-data` commands can make an effort to check for entries that would false trigger as substrings of correct words. It searches each typo against a dictionary of 25K English words from the english_words Python package, provided its installed. (run `python3 -m pip install english_words` to install it.)
?> Unfortunately, this is limited to just english words, at this point.
## Overriding Autocorrect
Occasionally you might actually want to type a typo (for instance, while editing autocorrection_dict.txt) without being autocorrected. There are a couple of ways to do this:
1. Begin typing the typo.
2. Before typing the last letter, press and release the Ctrl or Alt key.
3. Type the remaining letters.
This works because the autocorrection implementation doesnt understand hotkeys, so it resets itself whenever a modifier other than shift is held.
Additionally, you can use the `AC_TOGG` keycode to toggle the on/off status for Autocorrect.
### Keycodes :id=keycodes
|Keycode |Aliases |Description |
|-----------------------|---------|----------------------------------------------|
|`QK_AUTOCORRECT_ON` |`AC_ON` |Turns on the Autocorrect feature. |
|`QK_AUTOCORRECT_OFF` |`AC_OFF` |Turns off the Autocorrect feature. |
|`QK_AUTOCORRECT_TOGGLE`|`AC_TOGG`|Toggles the status of the Autocorrect feature.|
## User Callback Functions
### Process Autocorrect
Callback function `bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods)` is available to customise incoming keycodes and handle exceptions. You can use this function to sanitise input before they are passed onto the autocorrect engine
?> Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](keycodes_basic.md) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](mod_tap.md) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`.
The default user callback function is found inside `quantum/process_keycode/process_autocorrect.c`. It covers most use-cases for QMK special functions and quantum keycodes, including [overriding autocorrect](#overriding-autocorrect) with a modifier other than shift. The `process_autocorrect_user` function is `weak` defined to allow user's copy inside `keymap.c` (or code files) to overwrite it.
#### Process Autocorrect Example
If you have a custom keycode `QMKBEST` that should be ignored as part of a word, and another custom keycode `QMKLAYER` that should override autocorrect, both can be added to the bottom of the `process_autocorrect_user` `switch` statement in your source code:
```c
bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods) {
// See quantum_keycodes.h for reference on these matched ranges.
switch (*keycode) {
// Exclude these keycodes from processing.
case KC_LSFT:
case KC_RSFT:
case KC_CAPS:
case QK_TO ... QK_ONE_SHOT_LAYER_MAX:
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX:
case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:
return false;
// Mask for base keycode from shifted keys.
case QK_LSFT ... QK_LSFT + 255:
case QK_RSFT ... QK_RSFT + 255:
if (*keycode >= QK_LSFT && *keycode <= (QK_LSFT + 255)) {
*mods |= MOD_LSFT;
} else {
*mods |= MOD_RSFT;
}
*keycode &= 0xFF; // Get the basic keycode.
return true;
#ifndef NO_ACTION_TAPPING
// Exclude tap-hold keys when they are held down
// and mask for base keycode when they are tapped.
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
# ifdef NO_ACTION_LAYER
// Exclude Layer Tap, if layers are disabled
// but action tapping is still enabled.
return false;
# endif
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
// Exclude hold if mods other than Shift is not active
if (!record->tap.count) {
return false;
}
*keycode &= 0xFF;
break;
#else
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
// Exclude if disabled
return false;
#endif
// Exclude swap hands keys when they are held down
// and mask for base keycode when they are tapped.
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
#ifdef SWAP_HANDS_ENABLE
if (*keycode >= 0x56F0 || !record->tap.count) {
return false;
}
*keycode &= 0xFF;
break;
#else
// Exclude if disabled
return false;
#endif
// Handle custom keycodes
case QMKBEST:
return false;
case QMKLAYER:
*typo_buffer_size = 0;
return false;
}
// Disable autocorrect while a mod other than shift is active.
if ((*mods & ~MOD_MASK_SHIFT) != 0) {
*typo_buffer_size = 0;
return false;
}
return true;
}
```
?> In this callback function, `return false` will skip processing of that keycode for autocorrect. Adding `*typo_buffer_size = 0` will also reset the autocorrect buffer at the same time, cancelling any current letters already stored in the buffer.
### Apply Autocorrect
Additionally, `apply_autocorrect(uint8_t backspaces, const char *str)` allows for users to add additional handling to the autocorrection, or replace the functionality entirely. This passes on the number of backspaces needed to replace the words, as well as the replacement string (partial word, not the full word).
#### Apply Autocorrect Example
This following example will play a sound when a typo is autocorrected and execute the autocorrection itself:
```c
#ifdef AUDIO_ENABLE
float autocorrect_song[][2] = SONG(TERMINAL_SOUND);
#endif
bool apply_autocorrect(uint8_t backspaces, const char *str) {
#ifdef AUDIO_ENABLE
PLAY_SONG(autocorrect_song);
#endif
for (uint8_t i = 0; i < backspaces; ++i) {
tap_code(KC_BSPC);
}
send_string_P(str);
return false;
}
```
?> In this callback function, `return false` will stop the normal processing of autocorrect, which requires manually handling of removing the "bad" characters and typing the new characters.
!> ***IMPORTANT***: `str` is a pointer to `PROGMEM` data for the autocorrection. If you return false, and want to send the string, this needs to use `send_string_P` and not `send_string` or `SEND_STRING`.
You can also use `apply_autocorrect` to detect and display the event but allow internal code to execute the autocorrection with `return true`:
```c
bool apply_autocorrect(uint8_t backspaces, const char *str) {
#ifdef OLED_ENABLE
oled_write_P(PSTR("Auto-corrected"), false);
#endif
return true;
}
```
## Appendix: Trie binary data format :id=appendix
This section details how the trie is serialized to byte data in autocorrection_data. You dont need to care about this to use this autocorrection implementation. But it is documented for the record in case anyone is interested in modifying the implementation, or just curious how it works.
What I did here is fairly arbitrary, but it is simple to decode and gets the job done.
### Encoding :id=encoding
All autocorrection data is stored in a single flat array autocorrection_data. Each trie node is associated with a byte offset into this array, where data for that node is encoded, beginning with root at offset 0. There are three kinds of nodes. The highest two bits of the first byte of the node indicate what kind:
* 00 ⇒ chain node: a trie node with a single child.
* 01 ⇒ branching node: a trie node with multiple children.
* 10 ⇒ leaf node: a leaf, corresponding to a typo and storing its correction.
![An example trie](https://i.imgur.com/HL5DP8H.png)
**Branching node**. Each branch is encoded with one byte for the keycode (KC_AKC_Z) followed by a link to the child node. Links between nodes are 16-bit byte offsets relative to the beginning of the array, serialized in little endian order.
All branches are serialized this way, one after another, and terminated with a zero byte. As described above, the node is identified as a branch by setting the two high bits of the first byte to 01, done by bitwise ORing the first keycode with 64. keycode. The root node for the above figure would be serialized like:
```
+-------+-------+-------+-------+-------+-------+-------+
| R|64 | node 2 | T | node 3 | 0 |
+-------+-------+-------+-------+-------+-------+-------+
```
**Chain node**. Tries tend to have long chains of single-child nodes, as seen in the example above with f-i-t-l in fitler. So to save space, we use a different format to encode chains than branching nodes. A chain is encoded as a string of keycodes, beginning with the node closest to the root, and terminated with a zero byte. The child of the last node in the chain is encoded immediately after. That child could be either a branching node or a leaf.
In the figure above, the f-i-t-l chain is encoded as
```
+-------+-------+-------+-------+-------+
| L | T | I | F | 0 |
+-------+-------+-------+-------+-------+
```
If we were to encode this chain using the same format used for branching nodes, we would encode a 16-bit node link with every node, costing 8 more bytes in this example. Across the whole trie, this adds up. Conveniently, we can point to intermediate points in the chain and interpret the bytes in the same way as before. E.g. starting at the i instead of the l, and the subchain has the same format.
**Leaf node**. A leaf node corresponds to a particular typo and stores data to correct the typo. The leaf begins with a byte for the number of backspaces to type, and is followed by a null-terminated ASCII string of the replacement text. The idea is, after tapping backspace the indicated number of times, we can simply pass this string to the `send_string_P` function. For fitler, we need to tap backspace 3 times (not 4, because we catch the typo as the final r is pressed) and replace it with lter. To identify the node as a leaf, the two high bits are set to 10 by ORing the backspace count with 128:
```
+-------+-------+-------+-------+-------+-------+
| 3|128 | 'l' | 't' | 'e' | 'r' | 0 |
+-------+-------+-------+-------+-------+-------+
```
### Decoding :id=decoding
This format is by design decodable with fairly simple logic. A 16-bit variable state represents our current position in the trie, initialized with 0 to start at the root node. Then, for each keycode, test the highest two bits in the byte at state to identify the kind of node.
* 00 ⇒ **chain node**: If the nodes byte matches the keycode, increment state by one to go to the next byte. If the next byte is zero, increment again to go to the following node.
* 01 ⇒ **branching node**: Search the branches for one that matches the keycode, and follow its node link.
* 10 ⇒ **leaf node**: a typo has been found! We read its first byte for the number of backspaces to type, then pass its following bytes to send_string_P to type the correction.
## Credits
Credit goes to [getreuer](https://github.com/getreuer) for originally implementing this [here](https://getreuer.info/posts/keyboards/autocorrection/#how-does-it-work). As well as to [filterpaper](https://github.com/filterpaper) for converting the code to use PROGMEM, and additional improvements.

View file

@ -16,15 +16,15 @@ BACKLIGHT_ENABLE = yes
Once enabled, the following keycodes below can be used to change the backlight level. Once enabled, the following keycodes below can be used to change the backlight level.
|Key |Description | | Key | Aliases | Description |
|---------|-----------------------------------| |---------------------------------|-----------|-------------------------------------|
|`BL_TOGG`|Turn the backlight on or off | | `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Turn the backlight on or off |
|`BL_STEP`|Cycle through backlight levels | | `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through backlight levels |
|`BL_ON` |Set the backlight to max brightness| | `QK_BACKLIGHT_ON` | `BL_ON` | Set the backlight to max brightness |
|`BL_OFF` |Turn the backlight off | | `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn the backlight off |
|`BL_INC` |Increase the backlight level | | `QK_BACKLIGHT_UP` | `BL_UP` | Increase the backlight level |
|`BL_DEC` |Decrease the backlight level | | `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
|`BL_BRTG`|Toggle backlight breathing | | `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
## Functions :id=functions ## Functions :id=functions

View file

@ -39,8 +39,8 @@ BLUETOOTH_DRIVER = BluefruitLE # or RN42
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both. This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|Name |Description | |Key |Aliases |Description |
|----------|----------------------------------------------| |---------------------|---------|----------------------------------------------|
|`OUT_AUTO`|Automatically switch between USB and Bluetooth| |`QK_OUTPUT_AUTO` |`OU_AUTO`|Automatically switch between USB and Bluetooth|
|`OUT_USB` |USB only | |`QK_OUTPUT_USB` |`OU_USB` |USB only |
|`OUT_BT` |Bluetooth only | |`QK_OUTPUT_BLUETOOTH`|`OU_BT` |Bluetooth only |

View file

@ -42,8 +42,8 @@ CAPS_WORD_ENABLE = yes
Next, use one the following methods to activate Caps Word: Next, use one the following methods to activate Caps Word:
* **Activate by pressing a key**: Use the `CAPS_WORD` keycode (short * **Activate by pressing a key**: Use the `QK_CAPS_WORD_TOGGLE` keycode (short
alias `CAPSWRD`) in your keymap. alias `CW_TOGG`) in your keymap.
* **Activate by pressing Left Shift + Right Shift**: Add `#define * **Activate by pressing Left Shift + Right Shift**: Add `#define
BOTH_SHIFTS_TURNS_ON_CAPS_WORD` to config.h. You may also need to disable or BOTH_SHIFTS_TURNS_ON_CAPS_WORD` to config.h. You may also need to disable or

View file

@ -105,11 +105,11 @@ It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](
## Keycodes ## 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` 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 | |Keycode |Aliases |Description |
|----------|---------------------------------| |-----------------|---------|--------------------------------|
|`CMB_ON` |Turns on Combo feature | |`QK_COMBO_ON` |`CM_ON` |Turns on Combo feature |
|`CMB_OFF` |Turns off Combo feature | |`QK_COMBO_OFF` |`CM_OFF` |Turns off Combo feature |
|`CMB_TOG` |Toggles Combo feature on and off | |`QK_COMBO_TOGGLE`|`CM_TOGG`|Toggles Combo feature on and off|
# Advanced Configuration # Advanced Configuration
These configuration settings can be set in your `config.h` file. These configuration settings can be set in your `config.h` file.
@ -255,7 +255,7 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
``` ```
## Variable Length Combos ## 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: 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 = ARRAY_SIZE(key_combos);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such:
```c ```c
enum myCombos { enum myCombos {
..., ...,

View file

@ -17,6 +17,9 @@ Currently the following converters are available:
| `promicro` | `bit_c_pro` | | `promicro` | `bit_c_pro` |
| `promicro` | `stemcell` | | `promicro` | `stemcell` |
| `promicro` | `bonsai_c4` | | `promicro` | `bonsai_c4` |
| `promicro` | `elite_pi` |
| `elite_c` | `stemcell` |
| `elite_c` | `elite_pi` |
See below for more in depth information on each converter. See below for more in depth information on each converter.
@ -47,6 +50,23 @@ Once a converter is enabled, it exposes the `CONVERT_TO_<target_uppercase>` flag
#endif #endif
``` ```
### Pin Compatibility
To ensure compatibility, provide validation, and power future workflows, a keyboard should declare its `pin compatibility`. For legacy reasons, this is currently assumed to be `promicro`.
Currently the following pin compatibility interfaces are defined:
| Pinout | Notes |
|------------|-----------------------------------|
| `promicro` | Includes RX/TX LEDs |
| `elite_c` | Includes bottom row pins, no LEDs |
To declare the base for conversions, add this line to your keyboard's `rules.mk`:
```makefile
PIN_COMPATIBLE = elite_c
```
## Pro Micro ## Pro Micro
If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are: If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are:
@ -60,6 +80,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | | [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` |
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | | [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` | | [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` |
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
Converter summary: Converter summary:
@ -72,6 +93,7 @@ Converter summary:
| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` | | `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
| `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` | | `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` |
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
### Proton C :id=proton_c ### Proton C :id=proton_c
@ -102,7 +124,7 @@ The following defaults are based on what has been implemented for [RP2040](platf
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
| [Split keyboards](feature_split_keyboard.md) | Partial via `PIO` vendor driver - heavily dependent on enabled features | | [Split keyboards](feature_split_keyboard.md) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
### SparkFun Pro Micro - RP2040, Blok, and Bit-C PRO :id=promicro_rp2040 ### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO, and Elite-Pi :id=promicro_rp2040
Currently identical to [Adafruit KB2040](#kb2040). Currently identical to [Adafruit KB2040](#kb2040).
@ -135,4 +157,26 @@ The Bonsai C4 only has one on-board LED (B2), and by default, both the Pro Micro
#define B0 PAL_LINE(GPIOA, 9) #define B0 PAL_LINE(GPIOA, 9)
``` ```
No peripherals are enabled by default at this time, but example code to enable SPI, I2C, PWM, and Serial communications can be found [here](/keyboards/custommk/bonsai_c4_template) ## Elite-C
If a board currently supported in QMK uses an [Elite-C](https://keeb.io/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4), the supported alternative controllers are:
| Device | Target |
|----------------------------------------------------------------------------------|-------------------|
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
Converter summary:
| Target | Argument | `rules.mk` | Condition |
|-------------------|---------------------------------|------------------------------|-------------------------------------|
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
### STeMCell :id=stemcell_elite
Currently identical to [STeMCell](#stemcell) with support for the additional bottom row of pins.
### Elite-Pi :id=elite_pi
Currently identical to [Adafruit KB2040](#kb2040), with support for the additional bottom row of pins.

View file

@ -1,35 +1,117 @@
## Digitizer # Digitizer :id=digitizer
The digitizer HID interface allows setting the mouse cursor position at absolute coordinates, unlike the Pointing Device feature that applies relative displacements. Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](feature_pointing_device.md) feature which applies relative displacements.
To enable the digitizer interface, add the following line to your rules.mk: This feature implements a stylus device with a tip switch and barrel switch (generally equivalent to the primary and secondary mouse buttons respectively). Tip pressure is not currently implemented.
## Usage :id=usage
Add the following to your `rules.mk`:
```make ```make
DIGITIZER_ENABLE = yes DIGITIZER_ENABLE = yes
``` ```
In order to change the mouse cursor position from your keymap.c file, include the digitizer header : ## Positioning :id=positioning
The X and Y coordinates are normalized, meaning their value must be set between 0 and 1. For the X component, the value `0` is the leftmost position, whereas the value `1` is the rightmost position. Similarly for the Y component, `0` is at the top and `1` at the bottom.
?> Since there is no display attached, the OS will likely map these coordinates to the virtual desktop. This may be important to know if you have multiple monitors.
## Examples :id=examples
This example simply places the cursor in the middle of the screen:
```c ```c
#include "digitizer.h" digitizer_in_range_on();
digitizer_set_position(0.5, 0.5);
``` ```
This gives you access to the `digitizer` structure which members allow you to change the cursor position. The "in range" indicator is required to be on for the change in coordinates to be taken. It can then be turned off again to signal the end of the digitizer interaction, but it is not strictly required.
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. You can also modify the digitizer state directly, if you need to change multiple fields in a single report:
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 ```c
digitizer_t digitizer; digitizer_state.in_range = true;
digitizer.x = 0.5; digitizer_state.dirty = true;
digitizer.y = 0.5; digitizer_flush();
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. `digitizer_state` is a struct of type `digitizer_t`.
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.
## API :id=api
### `struct digitizer_t` :id=api-digitizer-t
Contains the state of the digitizer.
#### Members :id=api-digitizer-t-members
- `bool in_range`
Indicates to the host that the contact is within range (ie. close to or in contact with the digitizer surface).
- `bool tip`
The state of the tip switch.
- `bool barrel`
The state of the barrel switch.
- `float x`
The X coordinate of the digitizer contact.
- `float y`
The Y coordinate of the digitizer contact.
- `bool dirty`
Whether the current state needs to be sent to the host.
---
### `void digitizer_flush(void)` :id=api-digitizer-flush
Send the digitizer report to the host if it is marked as dirty.
---
### `void digitizer_in_range_on(void)` :api-digitizer-in-range-on
Assert the "in range" indicator, and flush the report.
---
### `void digitizer_in_range_off(void)` :api-digitizer-in-range-off
Deassert the "in range" indicator, and flush the report.
---
### `void digitizer_tip_switch_on(void)` :api-digitizer-tip-switch-on
Assert the tip switch, and flush the report.
---
### `void digitizer_tip_switch_off(void)` :api-digitizer-tip-switch-off
Deassert the tip switch, and flush the report.
---
### `void digitizer_barrel_switch_on(void)` :api-digitizer-barrel-switch-on
Assert the barrel switch, and flush the report.
---
### `void digitizer_barrel_switch_off(void)` :api-digitizer-barrel-switch-off
Deassert the barrel switch, and flush the report.
---
### `void digitizer_set_position(float x, float y)` :api-digitizer-set-position
Set the absolute X and Y position of the digitizer contact, and flush the report.
#### Arguments :id=api-digitizer-set-position-arguments
- `float x`
The X value of the contact position, from 0 to 1.
- `float y`
The Y value of the contact position, from 0 to 1.

View file

@ -7,20 +7,20 @@ You can store one or two macros and they may have a combined total of 128 keypre
To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap: To enable them, first include `DYNAMIC_MACRO_ENABLE = yes` in your `rules.mk`. Then, add the following keys to your keymap:
|Key |Alias |Description | |Key |Alias |Description |
|------------------|----------|---------------------------------------------------| |---------------------------------|---------|--------------------------------------------------|
|`DYN_REC_START1` |`DM_REC1` |Start recording Macro 1 | |`QK_DYNAMIC_MACRO_RECORD_START_1`|`DM_REC1`|Start recording Macro 1 |
|`DYN_REC_START2` |`DM_REC2` |Start recording Macro 2 | |`QK_DYNAMIC_MACRO_RECORD_START_2`|`DM_REC2`|Start recording Macro 2 |
|`DYN_MACRO_PLAY1` |`DM_PLY1` |Replay Macro 1 | |`QK_DYNAMIC_MACRO_PLAY_1` |`DM_PLY1`|Replay Macro 1 |
|`DYN_MACRO_PLAY2` |`DM_PLY2` |Replay Macro 2 | |`QK_DYNAMIC_MACRO_PLAY_2` |`DM_PLY2`|Replay Macro 2 |
|`DYN_REC_STOP` |`DM_RSTP` |Finish the macro that is currently being recorded. | |`QK_DYNAMIC_MACRO_RECORD_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.|
That should be everything necessary. That should be everything necessary.
To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To start recording the macro, press either `DM_REC1` or `DM_REC2`.
To finish the recording, press the `DYN_REC_STOP` layer button. You can also press `DYN_REC_START1` or `DYN_REC_START2` again to stop the recording. To finish the recording, press the `DM_RSTP` layer button. You can also press `DM_REC1` or `DM_REC2` again to stop the recording.
To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. To replay the macro, press either `DM_PLY1` or `DM_PLY2`.
It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completely by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completely by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file.
@ -43,10 +43,10 @@ If the LEDs start blinking during the recording with each keypress, it means the
### DYNAMIC_MACRO_USER_CALL ### DYNAMIC_MACRO_USER_CALL
For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function: For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DM_RSTP` key. If you want this behavior back, add `#define DYNAMIC_MACRO_USER_CALL` to your `config.h` and insert the following snippet at the beginning of your `process_record_user()` function:
```c ```c
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); uint16_t macro_kc = (keycode == MO(_DYN) ? DM_RSTP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) { if (!process_record_dynamic_macro(macro_kc, record)) {
return false; return false;

View file

@ -40,7 +40,7 @@ void keyboard_post_init_user(void) {
// Set default layer, if enabled // Set default layer, if enabled
if (user_config.rgb_layer_change) { if (user_config.rgb_layer_change) {
rgblight_enable_noeeprom(); rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan(); rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(1); rgblight_mode_noeeprom(1);
} }
} }
@ -51,19 +51,19 @@ The above function will use the EEPROM config immediately after reading it, to s
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) { switch (get_highest_layer(state)) {
case _RAISE: case _RAISE:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_MAGENTA); rgblight_mode_noeeprom(1); }
break; break;
case _LOWER: case _LOWER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_RED); rgblight_mode_noeeprom(1); }
break; break;
case _PLOVER: case _PLOVER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_GREEN); rgblight_mode_noeeprom(1); }
break; break;
case _ADJUST: case _ADJUST:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_WHITE); rgblight_mode_noeeprom(1); }
break; break;
default: // for any other layers, or the default layer default: // for any other layers, or the default layer
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); } if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_CYAN); rgblight_mode_noeeprom(1); }
break; break;
} }
return state; return state;
@ -109,7 +109,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 Lite](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 `EE_CLR` 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 ```c
void eeconfig_init_user(void) { // EEPROM is getting reset! void eeconfig_init_user(void) { // EEPROM is getting reset!
@ -119,7 +119,7 @@ void eeconfig_init_user(void) { // EEPROM is getting reset!
// use the non noeeprom versions, to write these values to EEPROM too // use the non noeeprom versions, to write these values to EEPROM too
rgblight_enable(); // Enable RGB by default rgblight_enable(); // Enable RGB by default
rgblight_sethsv_cyan(); // Set it to CYAN by default rgblight_sethsv(HSV_CYAN); // Set it to CYAN by default
rgblight_mode(1); // set to solid by default rgblight_mode(1); // set to solid by default
} }
``` ```

View file

@ -90,6 +90,14 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
?> This should only be enabled at the keymap level. ?> This should only be enabled at the keymap level.
Using encoder mapping pumps events through the normal QMK keycode processing pipeline, resulting in a _keydown/keyup_ combination pushed through `process_record_xxxxx()`. To configure the amount of time between the encoder "keyup" and "keydown", you can add the following to your `config.h`:
```c
#define ENCODER_MAP_KEY_DELAY 10
```
?> By default, the encoder map delay matches the value of `TAP_CODE_DELAY`.
## Callbacks ## Callbacks
When not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`: When not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`:

View file

@ -32,21 +32,21 @@ The following `config.h` settings are available for all types of haptic feedback
Not all keycodes below will work depending on which haptic mechanism you have chosen. Not all keycodes below will work depending on which haptic mechanism you have chosen.
| Name | Description | | Key | Aliases | Description |
|-----------|-------------------------------------------------------| |-----------------------------|---------|-------------------------------------------------------|
|`HPT_ON` | Turn haptic feedback on | |`QK_HAPTIC_ON` |`HF_ON` | Turn haptic feedback on |
|`HPT_OFF` | Turn haptic feedback off | |`QK_HAPTIC_OFF` |`HF_OFF` | Turn haptic feedback off |
|`HPT_TOG` | Toggle haptic feedback on/off | |`QK_HAPTIC_TOGGLE` |`HF_TOGG`| Toggle haptic feedback on/off |
|`HPT_RST` | Reset haptic feedback config to default | |`QK_HAPTIC_RESET` |`HF_RST` | Reset haptic feedback config to default |
|`HPT_FBK` | Toggle feedback to occur on keypress, release or both | |`QK_HAPTIC_FEEDBACK_TOGGLE` |`HF_FDBK`| Toggle feedback to occur on keypress, release or both |
|`HPT_BUZ` | Toggle solenoid buzz on/off | |`QK_HAPTIC_BUZZ_TOGGLE` |`HF_BUZZ`| Toggle solenoid buzz on/off |
|`HPT_MODI` | Go to next DRV2605L waveform | |`QK_HAPTIC_MODE_NEXT` |`HF_NEXT`| Go to next DRV2605L waveform |
|`HPT_MODD` | Go to previous DRV2605L waveform | |`QK_HAPTIC_MODE_PREVIOUS` |`HF_PREV`| Go to previous DRV2605L waveform |
|`HPT_CONT` | Toggle continuous haptic mode on/off | |`QK_HAPTIC_CONTINUOUS_TOGGLE`|`HF_CONT`| Toggle continuous haptic mode on/off |
|`HPT_CONI` | Increase DRV2605L continous haptic strength | |`QK_HAPTIC_CONTINUOUS_UP` |`HF_CONU`| Increase DRV2605L continous haptic strength |
|`HPT_COND` | Decrease DRV2605L continous haptic strength | |`QK_HAPTIC_CONTINUOUS_DOWN` |`HF_COND`| Decrease DRV2605L continous haptic strength |
|`HPT_DWLI` | Increase Solenoid dwell time | |`QK_HAPTIC_DWELL_UP` |`HF_DWLU`| Increase Solenoid dwell time |
|`HPT_DWLD` | Decrease Solenoid dwell time | |`QK_HAPTIC_DWELL_DOWN` |`HF_DWLD`| Decrease Solenoid dwell time |
### Solenoids ### Solenoids
@ -68,8 +68,8 @@ For relay switches, the hardware may already contain all of that ciruitry, and j
|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the switch. | |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the switch. |
|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | |`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. |
|`SOLENOID_DWELL_STEP_SIZE` | `1` ms |The step size to use when `HPT_DWL*` keycodes are sent. | |`SOLENOID_DWELL_STEP_SIZE` | `1` ms |The step size to use when `HF_DWL*` keycodes are sent. |
|`SOLENOID_DEFAULT_BUZZ` | `0` (disabled) |On HPT_RST buzz is set "on" if this is "1" | |`SOLENOID_DEFAULT_BUZZ` | `0` (disabled) |On `HF_RST` buzz is set "on" if this is "1" |
|`SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` |Actuated-time when the switch is in buzz mode. | |`SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` |Actuated-time when the switch is in buzz mode. |
|`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the switch is in buzz mode. | |`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the switch is in buzz mode. |
@ -178,7 +178,7 @@ If haptic feedback is enabled, the keyboard will vibrate to a specific sequence
``` ```
#define DRV_MODE_DEFAULT *sequence name or number* #define DRV_MODE_DEFAULT *sequence name or number*
``` ```
This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed. This will set what sequence `HF_RST` will set as the active mode. If not defined, mode will be set to 1 when `HF_RST` is pressed.
### DRV2605L Continuous Haptic Mode ### DRV2605L Continuous Haptic Mode

View file

@ -1,154 +1,228 @@
## Joystick # Joystick :id=joystick
The keyboard can be made to be recognized as a joystick HID device by the operating system. This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](adc_driver.md), or can be virtual, so that its value is provided by your code.
!> Joystick support is not currently available on V-USB devices. An analog device such as a [potentiometer](https://en.wikipedia.org/wiki/Potentiometer) found on an analog joystick's axes is based on a voltage divider, where adjusting the movable wiper controls the output voltage which can then be read by the microcontroller's ADC.
The joystick feature provides two services: ## Usage :id=usage
* reading analog input devices (eg. potentiometers)
* sending gamepad HID reports
Both services can be used without the other, depending on whether you just want to read a device but not send gamepad reports (for volume control for instance) Add the following to your `rules.mk`:
or send gamepad reports based on values computed by the keyboard.
### Analog Input
To use analog input you must first enable it in `rules.mk`:
```make ```make
JOYSTICK_ENABLE = yes 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). By default the joystick driver is `analog`, but you can change this with:
It is composed of three connectors linked to the ground, the power input and power output (usually the middle one). The power output holds the voltage that varies based on the position of the cursor,
which value will be read using your MCU's [ADC](https://en.wikipedia.org/wiki/Analog-to-digital_converter).
Depending on which pins are already used by your keyboard's matrix, the rest of the circuit can get a little bit more complicated,
feeding the power input and ground connection through pins and using diodes to avoid bad interactions with the matrix scanning procedures.
### Configuring the Joystick ```make
JOYSTICK_DRIVER = digital
```
By default, two axes and eight buttons are defined. This can be changed in your `config.h`: ## Configuration :id=configuration
By default, two axes and eight buttons are defined, with a reported resolution of 8 bits (-127 to +127). This can be changed in your `config.h`:
```c ```c
// Max 32 // Min 0, max 32
#define JOYSTICK_BUTTON_COUNT 16 #define JOYSTICK_BUTTON_COUNT 16
// Max 6: X, Y, Z, Rx, Ry, Rz // Min 0, max 6: X, Y, Z, Rx, Ry, Rz
#define JOYSTICK_AXES_COUNT 3 #define JOYSTICK_AXIS_COUNT 3
// Min 8, max 16
#define JOYSTICK_AXIS_RESOLUTION 10
``` ```
When defining axes for your joystick, you have to provide a definition array. You can do this from your keymap.c file. ?> You must define at least one button or axis. Also note that the maximum ADC resolution of the supported AVR MCUs is 10-bit, and 12-bit for most STM32 MCUs.
A joystick will either be read from an input pin that allows the use of the ADC, or can be virtual, so that its value is provided by your code.
You have to define an array of type ''joystick_config_t'' and of proper size.
There are three ways for your circuit to work with the ADC, that relies on the use of 1, 2 or 3 pins of the MCU: ### Axes :id=axes
* 1 pin: your analog device is directly connected to your device GND and VCC. The only pin used is the ADC pin of your choice.
* 2 pins: your analog device is powered through a pin that allows toggling it on or off. The other pin is used to read the input value through the ADC.
* 3 pins: both the power input and ground are connected to pins that must be set to a proper state before reading and restored afterwards.
The configuration of each axis is performed using one of four macros: When defining axes for your joystick, you must provide a definition array typically in your `keymap.c`.
* `JOYSTICK_AXIS_VIRTUAL`: no ADC reading must be performed, that value will be provided by keyboard/keymap-level code
* `JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH)`: a voltage will be read on the provided pin, which must be an ADC-capable pin.
* `JOYSTICK_AXIS_IN_OUT(INPUT_PIN, OUTPUT_PIN, LOW, REST, HIGH)`: the provided `OUTPUT_PIN` will be set high before `INPUT_PIN` is read.
* `JOYSTICK_AXIS_IN_OUT_GROUND(INPUT_PIN, OUTPUT_PIN, GROUND_PIN, LOW, REST, HIGH)`: the `OUTPUT_PIN` will be set high and `GROUND_PIN` will be set low before reading from `INPUT_PIN`.
In any case where an ADC reading takes place (when `INPUT_PIN` is provided), additional `LOW`, `REST` and `HIGH` parameters are used. For instance, the below example configures two axes. The X axis is read from the `A4` pin. With the default axis resolution of 8 bits, the range of values between 900 and 575 are scaled to -127 through 0, and values 575 to 285 are scaled to 0 through 127. The Y axis is configured as a virtual axis, and its value is not read from any pin. Instead, the user must update the axis value programmatically.
These implement the calibration of the analog device by defining the range of read values that will be mapped to the lowest, resting position and highest possible value for the axis (-127 to 127).
In practice, you have to provide the lowest/highest raw ADC reading, and the raw reading at resting position, when no deflection is applied. You can provide inverted `LOW` and `HIGH` to invert the axis.
For instance, an axes configuration can be defined in the following way:
```c ```c
//joystick config
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
[0] = JOYSTICK_AXIS_IN_OUT_GROUND(A4, B0, A7, 900, 575, 285), JOYSTICK_AXIS_IN(A4, 900, 575, 285),
[1] = JOYSTICK_AXIS_VIRTUAL JOYSTICK_AXIS_VIRTUAL
}; };
``` ```
When the ADC reads 900 or higher, the returned axis value will be -127, whereas it will be 127 when the ADC reads 285 or lower. Zero is returned when 575 is read. Axes can be configured using one of the following macros:
In this example, the first axis will be read from the `A4` pin while `B0` is set high and `A7` is set low, using `analogReadPin()`, whereas the second axis will not be read. * `JOYSTICK_AXIS_IN(input_pin, low, rest, high)`
The ADC samples the provided pin. `low`, `high` and `rest` correspond to the minimum, maximum, and resting (or centered) analog values of the axis, respectively.
* `JOYSTICK_AXIS_IN_OUT(input_pin, output_pin, low, rest, high)`
Same as `JOYSTICK_AXIS_IN()`, but the provided `output_pin` will be pulled high before `input_pin` is read.
* `JOYSTICK_AXIS_IN_OUT_GROUND(input_pin, output_pin, ground_pin, low, rest, high)`
Same as `JOYSTICK_AXIS_IN_OUT()`, but the provided `ground_pin` will be pulled low before reading from `input_pin`.
* `JOYSTICK_AXIS_VIRTUAL`
No ADC reading is performed. The value should be provided by user code.
In order to give a value to the second axis, you can do so in any customizable entry point: as an action, in `process_record_user()` or in `matrix_scan_user()`, or even in `joystick_task()` which is called even when no key has been pressed. The `low` and `high` values can be swapped to effectively invert the axis.
You assign a value by writing to `joystick_status.axes[axis_index]` a signed 8-bit value (ranging from -127 to 127). Then it is necessary to assign the flag `JS_UPDATED` to `joystick_status.status` in order for an updated HID report to be sent.
The following example writes two axes based on keypad presses, with `KC_P5` as a precision modifier: #### Virtual Axes :id=virtual-axes
The following example adjusts two virtual axes (X and Y) based on keypad presses, with `KC_P0` as a precision modifier:
```c ```c
#ifdef ANALOG_JOYSTICK_ENABLE joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
static uint8_t precision_val = 70; JOYSTICK_AXIS_VIRTUAL, // x
static uint8_t axesFlags = 0; JOYSTICK_AXIS_VIRTUAL // y
enum axes {
Precision = 1,
Axis1High = 2,
Axis1Low = 4,
Axis2High = 8,
Axis2Low = 16
}; };
#endif
static bool precision = false;
static uint16_t precision_mod = 64;
static uint16_t axis_val = 127;
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
int16_t precision_val = axis_val;
if (precision) {
precision_val -= precision_mod;
}
switch (keycode) { switch (keycode) {
#ifdef ANALOG_JOYSTICK_ENABLE
// virtual joystick
# if JOYSTICK_AXES_COUNT > 1
case KC_P8: case KC_P8:
if (record->event.pressed) { joystick_set_axis(1, record->event.pressed ? -precision_val : 0);
axesFlags |= Axis2Low; return false;
} else {
axesFlags &= ~Axis2Low;
}
joystick_status.status |= JS_UPDATED;
break;
case KC_P2: case KC_P2:
if (record->event.pressed) { joystick_set_axis(1, record->event.pressed ? precision_val : 0);
axesFlags |= Axis2High; return false;
} else {
axesFlags &= ~Axis2High;
}
joystick_status.status |= JS_UPDATED;
break;
# endif
case KC_P4: case KC_P4:
if (record->event.pressed) { joystick_set_axis(0, record->event.pressed ? -precision_val : 0);
axesFlags |= Axis1Low; return false;
} else {
axesFlags &= ~Axis1Low;
}
joystick_status.status |= JS_UPDATED;
break;
case KC_P6: case KC_P6:
if (record->event.pressed) { joystick_set_axis(0, record->event.pressed ? precision_val : 0);
axesFlags |= Axis1High; return false;
} else { case KC_P0:
axesFlags &= ~Axis1High; precision = record->event.pressed;
} return false;
joystick_status.status |= JS_UPDATED;
break;
case KC_P5:
if (record->event.pressed) {
axesFlags |= Precision;
} else {
axesFlags &= ~Precision;
}
joystick_status.status |= JS_UPDATED;
break;
#endif
} }
return true; return true;
} }
``` ```
### Axis Resolution ## Keycodes :id=keycodes
By default, the resolution of each axis is 8 bit, giving a range of -127 to +127. If you need higher precision, you can increase it by defining eg. `JOYSTICK_AXES_RESOLUTION 12` in your `config.h`. The resolution must be between 8 and 16. |Key |Aliases|Description|
|-----------------------|-------|-----------|
|`QK_JOYSTICK_BUTTON_0` |`JS_0` |Button 0 |
|`QK_JOYSTICK_BUTTON_1` |`JS_1` |Button 1 |
|`QK_JOYSTICK_BUTTON_2` |`JS_2` |Button 2 |
|`QK_JOYSTICK_BUTTON_3` |`JS_3` |Button 3 |
|`QK_JOYSTICK_BUTTON_4` |`JS_4` |Button 4 |
|`QK_JOYSTICK_BUTTON_5` |`JS_5` |Button 5 |
|`QK_JOYSTICK_BUTTON_6` |`JS_6` |Button 6 |
|`QK_JOYSTICK_BUTTON_7` |`JS_7` |Button 7 |
|`QK_JOYSTICK_BUTTON_8` |`JS_8` |Button 8 |
|`QK_JOYSTICK_BUTTON_9` |`JS_9` |Button 9 |
|`QK_JOYSTICK_BUTTON_10`|`JS_10`|Button 10 |
|`QK_JOYSTICK_BUTTON_11`|`JS_11`|Button 11 |
|`QK_JOYSTICK_BUTTON_12`|`JS_12`|Button 12 |
|`QK_JOYSTICK_BUTTON_13`|`JS_13`|Button 13 |
|`QK_JOYSTICK_BUTTON_14`|`JS_14`|Button 14 |
|`QK_JOYSTICK_BUTTON_15`|`JS_15`|Button 15 |
|`QK_JOYSTICK_BUTTON_16`|`JS_16`|Button 16 |
|`QK_JOYSTICK_BUTTON_17`|`JS_17`|Button 17 |
|`QK_JOYSTICK_BUTTON_18`|`JS_18`|Button 18 |
|`QK_JOYSTICK_BUTTON_19`|`JS_19`|Button 19 |
|`QK_JOYSTICK_BUTTON_20`|`JS_20`|Button 20 |
|`QK_JOYSTICK_BUTTON_21`|`JS_21`|Button 21 |
|`QK_JOYSTICK_BUTTON_22`|`JS_22`|Button 22 |
|`QK_JOYSTICK_BUTTON_23`|`JS_23`|Button 23 |
|`QK_JOYSTICK_BUTTON_24`|`JS_24`|Button 24 |
|`QK_JOYSTICK_BUTTON_25`|`JS_25`|Button 25 |
|`QK_JOYSTICK_BUTTON_26`|`JS_26`|Button 26 |
|`QK_JOYSTICK_BUTTON_27`|`JS_27`|Button 27 |
|`QK_JOYSTICK_BUTTON_28`|`JS_28`|Button 28 |
|`QK_JOYSTICK_BUTTON_29`|`JS_29`|Button 29 |
|`QK_JOYSTICK_BUTTON_30`|`JS_30`|Button 30 |
|`QK_JOYSTICK_BUTTON_31`|`JS_31`|Button 31 |
Note that the supported AVR MCUs have a 10-bit ADC, and 12-bit for most STM32 MCUs. ## API :id=api
### Triggering Joystick Buttons ### `struct joystick_t` :id=api-joystick-t
Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured. Contains the state of the joystick.
To trigger a joystick button, just add the corresponding keycode to your keymap.
You can also trigger joystick buttons in code with `register_joystick_button(button)` and `unregister_joystick_button(button)`, where `button` is the 0-based button index (0 = button 1). #### Members :id=api-joystick-t-members
- `uint8_t buttons[]`
A bit-packed array containing the joystick button states. The size is calculated as `(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1`.
- `int16_t axes[]`
An array of analog values for each defined axis.
- `bool dirty`
Whether the current state needs to be sent to the host.
---
### `struct joystick_config_t` :id=api-joystick-config-t
Describes a single axis.
#### Members :id=api-joystick-config-t-members
- `pin_t output_pin`
A pin to set as output high when reading the analog value, or `JS_VIRTUAL_AXIS`.
- `pin_t input_pin`
The pin to read the analog value from, or `JS_VIRTUAL_AXIS`.
- `pin_t ground_pin`
A pin to set as output low when reading the analog value, or `JS_VIRTUAL_AXIS`.
- `uint16_t min_digit`
The minimum analog value.
- `uint16_t mid_digit`
The resting or midpoint analog value.
- `uint16_t max_digit`
The maximum analog value.
---
### `void joystick_flush(void)` :id=api-joystick-flush
Send the joystick report to the host, if it has been marked as dirty.
---
### `void register_joystick_button(uint8_t button)` :id=api-register-joystick-button
Set the state of a button, and flush the report.
#### Arguments :id=api-register-joystick-button-arguments
- `uint8_t button`
The index of the button to press, from 0 to 31.
---
### `void register_joystick_button(uint8_t button)` :id=api-unregister-joystick-button
Reset the state of a button, and flush the report.
#### Arguments :id=api-unregister-joystick-button-arguments
- `uint8_t button`
The index of the button to release, from 0 to 31.
---
### `int16_t joystick_read_axis(uint8_t axis)` :id=api-joystick-read-axis
Sample and process the analog value of the given axis.
#### Arguments :id=api-joystick-read-axis-arguments
- `uint8_t axis`
The axis to read.
#### Return Value :id=api-joystick-read-axis-return
A signed 16-bit integer, where 0 is the resting or mid point.
### `void joystick_set_axis(uint8_t axis, int16_t value)` :id=api-joystick-set-axis
Set the value of the given axis.
#### Arguments :id=api-joystick-set-axis-arguments
- `uint8_t axis`
The axis to set the value of.
- `int16_t value`
The value to set.

View file

@ -2,17 +2,17 @@
Sometimes you may find yourself needing to hold down a specific key for a long period of time. Key Lock holds down the next key you press for you. Press it again, and it will be released. Sometimes you may find yourself needing to hold down a specific key for a long period of time. Key Lock holds down the next key you press for you. Press it again, and it will be released.
Let's say you need to type in ALL CAPS for a few sentences. Hit `KC_LOCK`, and then Shift. Now, Shift will be considered held until you tap it again. You can think of Key Lock as Caps Lock, but supercharged. Let's say you need to type in ALL CAPS for a few sentences. Hit `QK_LOCK`, and then Shift. Now, Shift will be considered held until you tap it again. You can think of Key Lock as Caps Lock, but supercharged.
## Usage ## Usage
First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Then pick a key in your keymap and assign it the keycode `KC_LOCK`. First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Then pick a key in your keymap and assign it the keycode `QK_LOCK`.
## Keycodes ## Keycodes
|Keycode |Description | |Keycode |Description |
|---------|--------------------------------------------------------------| |---------|--------------------------------------------------------------|
|`KC_LOCK`|Hold down the next key pressed, until the key is pressed again| |`QK_LOCK`|Hold down the next key pressed, until the key is pressed again|
## Caveats ## Caveats

View file

@ -152,13 +152,11 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) |
## Keycodes ## Keycodes
You can enable, disable and toggle all key overrides on the fly. |Keycode |Aliases |Description |
|------------------------|---------|----------------------|
|Keycode |Description |Function Equivalent| |`QK_KEY_OVERRIDE_TOGGLE`|`KO_TOGG`|Toggle key overrides |
|----------|---------------------------------|--------| |`QK_KEY_OVERRIDE_ON` |`KO_ON` |Turn on key overrides |
|`KEY_OVERRIDE_ON` |Turns on Key Override feature | `key_override_on(void)`| |`QK_KEY_OVERRIDE_OFF` |`KO_OFF` |Turn off key overrides|
|`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` ## Reference for `key_override_t`

View file

@ -2,11 +2,11 @@
If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen. If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
That's what `KC_LEAD` does. Here's an example: That's what `QK_LEAD` does. Here's an example:
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else. 1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `QK_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. 2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `QK_LEAD` key. Specifically, when you press the `QK_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low.
* By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`. * By default, this timeout is how long after pressing `QK_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
3. Within your `matrix_scan_user` function, add something like this: 3. Within your `matrix_scan_user` function, add something like this:
```c ```c
@ -95,7 +95,7 @@ While, this may be fine for most, if you want to specify the whole keycode (eg,
The Leader Key feature has some additional customization to how the Leader Key feature works. It has two functions that can be called at certain parts of the process. Namely `leader_start()` and `leader_end()`. The Leader Key feature has some additional customization to how the Leader Key feature works. It has two functions that can be called at certain parts of the process. Namely `leader_start()` and `leader_end()`.
The `leader_start()` function is called when you tap the `KC_LEAD` key, and the `leader_end()` function is called when either the leader sequence is completed, or the leader timeout is hit. The `leader_start()` function is called when you tap the `QK_LEAD` key, and the `leader_end()` function is called when either the leader sequence is completed, or the leader timeout is hit.
You can add these functions to your code (`keymap.c` usually) to add feedback to the Leader sequences (such as beeping or playing music). You can add these functions to your code (`keymap.c` usually) to add feedback to the Leader sequences (such as beeping or playing music).
@ -111,7 +111,7 @@ void leader_end(void) {
### Example ### Example
This example will play the Mario "One Up" sound when you hit `KC_LEAD` to start the Leader Sequence, and will play "All Star" if it completes successfully or "Rick Roll" you if it fails. This example will play the Mario "One Up" sound when you hit `QK_LEAD` to start the Leader Sequence, and will play "All Star" if it completes successfully or "Rick Roll" you if it fails.
```c ```c
bool did_leader_succeed; bool did_leader_succeed;

View file

@ -101,6 +101,13 @@ The `host_keyboard_led_state()` function will report the LED state returned from
bool caps = host_keyboard_led_state().caps_lock; bool caps = host_keyboard_led_state().caps_lock;
``` ```
## `led_update_ports()`
This function writes the LED state to the actual hardware. Call it manually
from your `led_update_*()` callbacks to modify the handling of the standard
keyboard LEDs.
For example when repurposing a standard LED indicator as layer indicator.
## Setting Physical LED State ## Setting Physical LED State
Some keyboard implementations provide convenient methods for setting the state of the physical LEDs. Some keyboard implementations provide convenient methods for setting the state of the physical LEDs.

View file

@ -22,7 +22,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | | | `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | | | `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | | | `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | | | `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | | | `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | |
@ -44,17 +44,17 @@ Here is an example using 2 drivers.
#define LED_DRIVER_COUNT 2 #define LED_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_TOTAL 25 #define LED_DRIVER_1_LED_TOTAL 25
#define LED_DRIVER_2_LED_TOTAL 24 #define LED_DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL) #define LED_MATRIX_LED_COUNT (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
``` ```
!> Note the parentheses, this is so when `LED_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() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`. !> Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | LED address * | LED address
@ -95,7 +95,7 @@ Configure the hardware via your `config.h`:
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `DRIVER_COUNT` | (Required) How many LED driver IC's are present | | | `DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | | | `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Optional) Address for the first LED driver | | | `DRIVER_ADDR_1` | (Optional) Address for the first LED driver | |
| `DRIVER_ADDR_<N>` | (Required) Address for the additional LED drivers | | | `DRIVER_ADDR_<N>` | (Required) Address for the additional LED drivers | |
| `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | | | `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | |
@ -130,16 +130,16 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66 #define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 42 #define DRIVER_2_LED_TOTAL 42
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define LED_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model. Currently only 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led __flash g_is31_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | LED address * | LED address
@ -221,14 +221,14 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
All LED matrix keycodes are currently shared with the [Backlight feature](feature_backlight.md). All LED matrix keycodes are currently shared with the [Backlight feature](feature_backlight.md).
|Key |Description | | Key | Aliases | Description |
|---------|-----------------------------| |-------------------------|-----------|-------------------------------|
|`BL_TOGG`|Toggle LED Matrix on or off | | `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Toggle LED Matrix on or off |
|`BL_STEP`|Cycle through modes | | `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through modes |
|`BL_ON` |Turn on LED Matrix | | `QK_BACKLIGHT_ON` | `BL_ON` | Turn on LED Matrix |
|`BL_OFF` |Turn off LED Matrix | | `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn off LED Matrix |
|`BL_INC` |Increase the brightness level| | `QK_BACKLIGHT_UP` | `BL_UP` | Increase the brightness level |
|`BL_DEC` |Decrease the brightness level| | `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the brightness level |
## LED Matrix Effects :id=led-matrix-effects ## LED Matrix Effects :id=led-matrix-effects
@ -364,15 +364,14 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_KEYPRESSES // reacts to keypresses #define LED_MATRIX_KEYPRESSES // reacts to keypresses
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects #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_MATRIX_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 // 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_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 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_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 #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
#define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set #define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
#define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set #define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define LED_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set #define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. #define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
``` ```
@ -391,7 +390,7 @@ Where `28` is an unused index from `eeconfig.h`.
|Function |Description | |Function |Description |
|--------------------------------------------|-------------| |--------------------------------------------|-------------|
|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) | |`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) |
|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) | |`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `LED_MATRIX_LED_COUNT` (not written to EEPROM) |
### Disable/Enable Effects :id=disable-enable-effects ### Disable/Enable Effects :id=disable-enable-effects
|Function |Description | |Function |Description |
@ -442,8 +441,12 @@ Where `28` is an unused index from `eeconfig.h`.
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that: If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that:
```c ```c
void led_matrix_indicators_kb(void) { bool led_matrix_indicators_kb(void) {
if (!led_matrix_indicators_user()) {
return false;
}
led_matrix_set_value(index, value); led_matrix_set_value(index, value);
return true;
} }
``` ```
@ -452,5 +455,6 @@ In addition, there are the advanced indicator functions. These are aimed at tho
```c ```c
void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
LED_MATRIX_INDICATOR_SET_VALUE(index, value); LED_MATRIX_INDICATOR_SET_VALUE(index, value);
return false;
} }
``` ```

View file

@ -33,7 +33,7 @@ You can define up to 32 macros in a `keymap.json` file, as used by [Configurator
], ],
"layout": "LAYOUT_all", "layout": "LAYOUT_all",
"layers": [ "layers": [
["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"] ["QK_MACRO_0", "QK_MACRO_1", "QK_MACRO_2", "QK_MACRO_3"]
] ]
} }
``` ```
@ -52,7 +52,7 @@ If you type in a language other than English, or use a non-QWERTY layout like Co
], ],
"layout": "LAYOUT_all", "layout": "LAYOUT_all",
"layers": [ "layers": [
["MACRO_0"] ["QK_MACRO_0"]
] ]
} }
``` ```

View file

@ -81,159 +81,159 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
### Keycodes ### Keycodes
|Keycode |Aliases |Description | |Keycode |Aliases |Description |
|------------|---------|---------------------------------| |-------------------------------|------------------|---------------------------------|
|`MI_ON` | |Turn MIDI on | |`QK_MIDI_ON` |`MI_ON` |Turn MIDI on |
|`MI_OFF` | |Turn MIDI off | |`QK_MIDI_OFF` |`MI_OFF` |Turn MIDI off |
|`MI_TOG` | |Toggle MIDI enabled | |`QK_MIDI_TOGGLE` |`MI_TOGG` |Toggle MIDI enabled |
|`MI_C` | |C octave 0 | |`QK_MIDI_NOTE_C_0` |`MI_C` |C octave 0 |
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 | |`QK_MIDI_NOTE_C_SHARP_0` |`MI_Cs`, `MI_Db` |C♯/D♭ octave 0 |
|`MI_D` | |D octave 0 | |`QK_MIDI_NOTE_D_0` |`MI_D` |D octave 0 |
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 | |`QK_MIDI_NOTE_D_SHARP_0` |`MI_Ds`, `MI_Eb` |D♯/E♭ octave 0 |
|`MI_E` | |E octave 0 | |`QK_MIDI_NOTE_E_0` |`MI_E` |E octave 0 |
|`MI_F` | |F octave 0 | |`QK_MIDI_NOTE_F_0` |`MI_F` |F octave 0 |
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 | |`QK_MIDI_NOTE_F_SHARP_0` |`MI_Fs`, `MI_Gb` |F♯/G♭ octave 0 |
|`MI_G` | |G octave 0 | |`QK_MIDI_NOTE_G_0` |`MI_G` |G octave 0 |
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 | |`QK_MIDI_NOTE_G_SHARP_0` |`MI_Gs`, `MI_Ab` |G♯/A♭ octave 0 |
|`MI_A` | |A octave 0 | |`QK_MIDI_NOTE_A_0` |`MI_A` |A octave 0 |
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 | |`QK_MIDI_NOTE_A_SHARP_0` |`MI_As`, `MI_Bb` |A♯/B♭ octave 0 |
|`MI_B` | |B octave 0 | |`QK_MIDI_NOTE_B_0` |`MI_B` |B octave 0 |
|`MI_C_1` | |C octave 1 | |`QK_MIDI_NOTE_C_1` |`MI_C1` |C octave 1 |
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 | |`QK_MIDI_NOTE_C_SHARP_1` |`MI_Cs1`, `MI_Db1`|C♯/D♭ octave 1 |
|`MI_D_1` | |D octave 1 | |`QK_MIDI_NOTE_D_1` |`MI_D1` |D octave 1 |
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 | |`QK_MIDI_NOTE_D_SHARP_1` |`MI_Ds1`, `MI_Eb1`|D♯/E♭ octave 1 |
|`MI_E_1` | |E octave 1 | |`QK_MIDI_NOTE_E_1` |`MI_E1` |E octave 1 |
|`MI_F_1` | |F octave 1 | |`QK_MIDI_NOTE_F_1` |`MI_F1` |F octave 1 |
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 | |`QK_MIDI_NOTE_F_SHARP_1` |`MI_Fs1`, `MI_Gb1`|F♯/G♭ octave 1 |
|`MI_G_1` | |G octave 1 | |`QK_MIDI_NOTE_G_1` |`MI_G1` |G octave 1 |
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 | |`QK_MIDI_NOTE_G_SHARP_1` |`MI_Gs1`, `MI_Ab1`|G♯/A♭ octave 1 |
|`MI_A_1` | |A octave 1 | |`QK_MIDI_NOTE_A_1` |`MI_A1` |A octave 1 |
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 | |`QK_MIDI_NOTE_A_SHARP_1` |`MI_As1`, `MI_Bb1`|A♯/B♭ octave 1 |
|`MI_B_1` | |B octave 1 | |`QK_MIDI_NOTE_B_1` |`MI_B1` |B octave 1 |
|`MI_C_2` | |C octave 2 | |`QK_MIDI_NOTE_C_2` |`MI_C2` |C octave 2 |
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 | |`QK_MIDI_NOTE_C_SHARP_2` |`MI_Cs2`, `MI_Db2`|C♯/D♭ octave 2 |
|`MI_D_2` | |D octave 2 | |`QK_MIDI_NOTE_D_2` |`MI_D2` |D octave 2 |
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 | |`QK_MIDI_NOTE_D_SHARP_2` |`MI_Ds2`, `MI_Eb2`|D♯/E♭ octave 2 |
|`MI_E_2` | |E octave 2 | |`QK_MIDI_NOTE_E_2` |`MI_E2` |E octave 2 |
|`MI_F_2` | |F octave 2 | |`QK_MIDI_NOTE_F_2` |`MI_F2` |F octave 2 |
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 | |`QK_MIDI_NOTE_F_SHARP_2` |`MI_Fs2`, `MI_Gb2`|F♯/G♭ octave 2 |
|`MI_G_2` | |G octave 2 | |`QK_MIDI_NOTE_G_2` |`MI_G2` |G octave 2 |
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 | |`QK_MIDI_NOTE_G_SHARP_2` |`MI_Gs2`, `MI_Ab2`|G♯/A♭ octave 2 |
|`MI_A_2` | |A octave 2 | |`QK_MIDI_NOTE_A_2` |`MI_A2` |A octave 2 |
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 | |`QK_MIDI_NOTE_A_SHARP_2` |`MI_As2`, `MI_Bb2`|A♯/B♭ octave 2 |
|`MI_B_2` | |B octave 2 | |`QK_MIDI_NOTE_B_2` |`MI_B2` |B octave 2 |
|`MI_C_3` | |C octave 3 | |`QK_MIDI_NOTE_C_3` |`MI_C3` |C octave 3 |
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 | |`QK_MIDI_NOTE_C_SHARP_3` |`MI_Cs3`, `MI_Db3`|C♯/D♭ octave 3 |
|`MI_D_3` | |D octave 3 | |`QK_MIDI_NOTE_D_3` |`MI_D3` |D octave 3 |
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 | |`QK_MIDI_NOTE_D_SHARP_3` |`MI_Ds3`, `MI_Eb3`|D♯/E♭ octave 3 |
|`MI_E_3` | |E octave 3 | |`QK_MIDI_NOTE_E_3` |`MI_E3` |E octave 3 |
|`MI_F_3` | |F octave 3 | |`QK_MIDI_NOTE_F_3` |`MI_F3` |F octave 3 |
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 | |`QK_MIDI_NOTE_F_SHARP_3` |`MI_Fs3`, `MI_Gb3`|F♯/G♭ octave 3 |
|`MI_G_3` | |G octave 3 | |`QK_MIDI_NOTE_G_3` |`MI_G3` |G octave 3 |
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 | |`QK_MIDI_NOTE_G_SHARP_3` |`MI_Gs3`, `MI_Ab3`|G♯/A♭ octave 3 |
|`MI_A_3` | |A octave 3 | |`QK_MIDI_NOTE_A_3` |`MI_A3` |A octave 3 |
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 | |`QK_MIDI_NOTE_A_SHARP_3` |`MI_As3`, `MI_Bb3`|A♯/B♭ octave 3 |
|`MI_B_3` | |B octave 3 | |`QK_MIDI_NOTE_B_3` |`MI_B3` |B octave 3 |
|`MI_C_4` | |C octave 4 | |`QK_MIDI_NOTE_C_4` |`MI_C4` |C octave 4 |
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 | |`QK_MIDI_NOTE_C_SHARP_4` |`MI_Cs4`, `MI_Db4`|C♯/D♭ octave 4 |
|`MI_D_4` | |D octave 4 | |`QK_MIDI_NOTE_D_4` |`MI_D4` |D octave 4 |
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 | |`QK_MIDI_NOTE_D_SHARP_4` |`MI_Ds4`, `MI_Eb4`|D♯/E♭ octave 4 |
|`MI_E_4` | |E octave 4 | |`QK_MIDI_NOTE_E_4` |`MI_E4` |E octave 4 |
|`MI_F_4` | |F octave 4 | |`QK_MIDI_NOTE_F_4` |`MI_F4` |F octave 4 |
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 | |`QK_MIDI_NOTE_F_SHARP_4` |`MI_Fs4`, `MI_Gb4`|F♯/G♭ octave 4 |
|`MI_G_4` | |G octave 4 | |`QK_MIDI_NOTE_G_4` |`MI_G4` |G octave 4 |
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 | |`QK_MIDI_NOTE_G_SHARP_4` |`MI_Gs4`, `MI_Ab4`|G♯/A♭ octave 4 |
|`MI_A_4` | |A octave 4 | |`QK_MIDI_NOTE_A_4` |`MI_A4` |A octave 4 |
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 | |`QK_MIDI_NOTE_A_SHARP_4` |`MI_As4`, `MI_Bb4`|A♯/B♭ octave 4 |
|`MI_B_4` | |B octave 4 | |`QK_MIDI_NOTE_B_4` |`MI_B4` |B octave 4 |
|`MI_C_5` | |C octave 5 | |`QK_MIDI_NOTE_C_5` |`MI_C5` |C octave 5 |
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 | |`QK_MIDI_NOTE_C_SHARP_5` |`MI_Cs5`, `MI_Db5`|C♯/D♭ octave 5 |
|`MI_D_5` | |D octave 5 | |`QK_MIDI_NOTE_D_5` |`MI_D5` |D octave 5 |
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 | |`QK_MIDI_NOTE_D_SHARP_5` |`MI_Ds5`, `MI_Eb5`|D♯/E♭ octave 5 |
|`MI_E_5` | |E octave 5 | |`QK_MIDI_NOTE_E_5` |`MI_E5` |E octave 5 |
|`MI_F_5` | |F octave 5 | |`QK_MIDI_NOTE_F_5` |`MI_F5` |F octave 5 |
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 | |`QK_MIDI_NOTE_F_SHARP_5` |`MI_Fs5`, `MI_Gb5`|F♯/G♭ octave 5 |
|`MI_G_5` | |G octave 5 | |`QK_MIDI_NOTE_G_5` |`MI_G5` |G octave 5 |
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 | |`QK_MIDI_NOTE_G_SHARP_5` |`MI_Gs5`, `MI_Ab5`|G♯/A♭ octave 5 |
|`MI_A_5` | |A octave 5 | |`QK_MIDI_NOTE_A_5` |`MI_A5` |A octave 5 |
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 | |`QK_MIDI_NOTE_A_SHARP_5` |`MI_As5`, `MI_Bb5`|A♯/B♭ octave 5 |
|`MI_B_5` | |B octave 5 | |`QK_MIDI_NOTE_B_5` |`MI_B5` |B octave 5 |
|`MI_OCT_N2` | |Set octave to -2 | |`QK_MIDI_OCTAVE_N2` |`MI_OCN2` |Set octave to -2 |
|`MI_OCT_N1` | |Set octave to -1 | |`QK_MIDI_OCTAVE_N1` |`MI_OCN1` |Set octave to -1 |
|`MI_OCT_0` | |Set octave to 0 | |`QK_MIDI_OCTAVE_0` |`MI_OC0` |Set octave to 0 |
|`MI_OCT_1` | |Set octave to 1 | |`QK_MIDI_OCTAVE_1` |`MI_OC1` |Set octave to 1 |
|`MI_OCT_2` | |Set octave to 2 | |`QK_MIDI_OCTAVE_2` |`MI_OC2` |Set octave to 2 |
|`MI_OCT_3` | |Set octave to 3 | |`QK_MIDI_OCTAVE_3` |`MI_OC3` |Set octave to 3 |
|`MI_OCT_4` | |Set octave to 4 | |`QK_MIDI_OCTAVE_4` |`MI_OC4` |Set octave to 4 |
|`MI_OCT_5` | |Set octave to 5 | |`QK_MIDI_OCTAVE_5` |`MI_OC5` |Set octave to 5 |
|`MI_OCT_6` | |Set octave to 6 | |`QK_MIDI_OCTAVE_6` |`MI_OC6` |Set octave to 6 |
|`MI_OCT_7` | |Set octave to 7 | |`QK_MIDI_OCTAVE_7` |`MI_OC7` |Set octave to 7 |
|`MI_OCTD` | |Move down an octave | |`QK_MIDI_OCTAVE_DOWN` |`MI_OCTD` |Move down an octave |
|`MI_OCTU` | |Move up an octave | |`QK_MIDI_OCTAVE_UP` |`MI_OCTU` |Move up an octave |
|`MI_TRNS_N6`| |Set transposition to -6 semitones| |`QK_MIDI_TRANSPOSE_N6` |`MI_TRN6` |Set transposition to -6 semitones|
|`MI_TRNS_N5`| |Set transposition to -5 semitones| |`QK_MIDI_TRANSPOSE_N5` |`MI_TRN5` |Set transposition to -5 semitones|
|`MI_TRNS_N4`| |Set transposition to -4 semitones| |`QK_MIDI_TRANSPOSE_N4` |`MI_TRN4` |Set transposition to -4 semitones|
|`MI_TRNS_N3`| |Set transposition to -3 semitones| |`QK_MIDI_TRANSPOSE_N3` |`MI_TRN3` |Set transposition to -3 semitones|
|`MI_TRNS_N2`| |Set transposition to -2 semitones| |`QK_MIDI_TRANSPOSE_N2` |`MI_TRN2` |Set transposition to -2 semitones|
|`MI_TRNS_N1`| |Set transposition to -1 semitone | |`QK_MIDI_TRANSPOSE_N1` |`MI_TRN1` |Set transposition to -1 semitone |
|`MI_TRNS_0` | |No transposition | |`QK_MIDI_TRANSPOSE_0` |`MI_TR0` |No transposition |
|`MI_TRNS_1` | |Set transposition to +1 semitone | |`QK_MIDI_TRANSPOSE_1` |`MI_TR1` |Set transposition to +1 semitone |
|`MI_TRNS_2` | |Set transposition to +2 semitones| |`QK_MIDI_TRANSPOSE_2` |`MI_TR2` |Set transposition to +2 semitones|
|`MI_TRNS_3` | |Set transposition to +3 semitones| |`QK_MIDI_TRANSPOSE_3` |`MI_TR3` |Set transposition to +3 semitones|
|`MI_TRNS_4` | |Set transposition to +4 semitones| |`QK_MIDI_TRANSPOSE_4` |`MI_TR4` |Set transposition to +4 semitones|
|`MI_TRNS_5` | |Set transposition to +5 semitones| |`QK_MIDI_TRANSPOSE_5` |`MI_TR5` |Set transposition to +5 semitones|
|`MI_TRNS_6` | |Set transposition to +6 semitones| |`QK_MIDI_TRANSPOSE_6` |`MI_TR6` |Set transposition to +6 semitones|
|`MI_TRNSD` | |Decrease transposition | |`QK_MIDI_TRANSPOSE_DOWN` |`MI_TRSD` |Decrease transposition |
|`MI_TRNSU` | |Increase transposition | |`QK_MIDI_TRANSPOSE_UP` |`MI_TRSU` |Increase transposition |
|`MI_VEL_0` | |Set velocity to 0 | |`QK_MIDI_VELOCITY_0` |`MI_VL0` |Set velocity to 0 |
|`MI_VEL_1` | |Set velocity to 12 | |`QK_MIDI_VELOCITY_1` |`MI_VL1` |Set velocity to 12 |
|`MI_VEL_2` | |Set velocity to 25 | |`QK_MIDI_VELOCITY_2` |`MI_VL2` |Set velocity to 25 |
|`MI_VEL_3` | |Set velocity to 38 | |`QK_MIDI_VELOCITY_3` |`MI_VL3` |Set velocity to 38 |
|`MI_VEL_4` | |Set velocity to 51 | |`QK_MIDI_VELOCITY_4` |`MI_VL4` |Set velocity to 51 |
|`MI_VEL_5` | |Set velocity to 64 | |`QK_MIDI_VELOCITY_5` |`MI_VL5` |Set velocity to 64 |
|`MI_VEL_6` | |Set velocity to 76 | |`QK_MIDI_VELOCITY_6` |`MI_VL6` |Set velocity to 76 |
|`MI_VEL_7` | |Set velocity to 89 | |`QK_MIDI_VELOCITY_7` |`MI_VL7` |Set velocity to 89 |
|`MI_VEL_8` | |Set velocity to 102 | |`QK_MIDI_VELOCITY_8` |`MI_VL8` |Set velocity to 102 |
|`MI_VEL_9` | |Set velocity to 114 | |`QK_MIDI_VELOCITY_9` |`MI_VL9` |Set velocity to 114 |
|`MI_VEL_10` | |Set velocity to 127 | |`QK_MIDI_VELOCITY_10` |`MI_VL10` |Set velocity to 127 |
|`MI_VELD` | |Decrease velocity | |`QK_MIDI_VELOCITY_DOWN` |`MI_VELD` |Decrease velocity |
|`MI_VELU` | |Increase velocity | |`QK_MIDI_VELOCITY_UP` |`MI_VELU` |Increase velocity |
|`MI_CH1` | |Set channel to 1 | |`QK_MIDI_CHANNEL_1` |`MI_CH1` |Set channel to 1 |
|`MI_CH2` | |Set channel to 2 | |`QK_MIDI_CHANNEL_2` |`MI_CH2` |Set channel to 2 |
|`MI_CH3` | |Set channel to 3 | |`QK_MIDI_CHANNEL_3` |`MI_CH3` |Set channel to 3 |
|`MI_CH4` | |Set channel to 4 | |`QK_MIDI_CHANNEL_4` |`MI_CH4` |Set channel to 4 |
|`MI_CH5` | |Set channel to 5 | |`QK_MIDI_CHANNEL_5` |`MI_CH5` |Set channel to 5 |
|`MI_CH6` | |Set channel to 6 | |`QK_MIDI_CHANNEL_6` |`MI_CH6` |Set channel to 6 |
|`MI_CH7` | |Set channel to 7 | |`QK_MIDI_CHANNEL_7` |`MI_CH7` |Set channel to 7 |
|`MI_CH8` | |Set channel to 8 | |`QK_MIDI_CHANNEL_8` |`MI_CH8` |Set channel to 8 |
|`MI_CH9` | |Set channel to 9 | |`QK_MIDI_CHANNEL_9` |`MI_CH9` |Set channel to 9 |
|`MI_CH10` | |Set channel to 10 | |`QK_MIDI_CHANNEL_10` |`MI_CH10` |Set channel to 10 |
|`MI_CH11` | |Set channel to 11 | |`QK_MIDI_CHANNEL_11` |`MI_CH11` |Set channel to 11 |
|`MI_CH12` | |Set channel to 12 | |`QK_MIDI_CHANNEL_12` |`MI_CH12` |Set channel to 12 |
|`MI_CH13` | |Set channel to 13 | |`QK_MIDI_CHANNEL_13` |`MI_CH13` |Set channel to 13 |
|`MI_CH14` | |Set channel to 14 | |`QK_MIDI_CHANNEL_14` |`MI_CH14` |Set channel to 14 |
|`MI_CH15` | |Set channel to 15 | |`QK_MIDI_CHANNEL_15` |`MI_CH15` |Set channel to 15 |
|`MI_CH16` | |Set channel to 16 | |`QK_MIDI_CHANNEL_16` |`MI_CH16` |Set channel to 16 |
|`MI_CHD` | |Decrease channel | |`QK_MIDI_CHANNEL_DOWN` |`MI_CHND` |Decrease channel |
|`MI_CHU` | |Increase channel | |`QK_MIDI_CHANNEL_UP` |`MI_CHNU` |Increase channel |
|`MI_ALLOFF` | |Stop all notes | |`QK_MIDI_ALL_NOTES_OFF` |`MI_AOFF` |Stop all notes |
|`MI_SUS` | |Sustain | |`QK_MIDI_SUSTAIN` |`MI_SUST` |Sustain |
|`MI_PORT` | |Portmento | |`QK_MIDI_PORTAMENTO` |`MI_PORT` |Portmento |
|`MI_SOST` | |Sostenuto | |`QK_MIDI_SOSTENUTO` |`MI_SOST` |Sostenuto |
|`MI_SOFT` | |Soft Pedal | |`QK_MIDI_SOFT` |`MI_SOFT` |Soft Pedal |
|`MI_LEG` | |Legato | |`QK_MIDI_LEGATO` |`MI_LEG` |Legato |
|`MI_MOD` | |Modulation | |`QK_MIDI_MODULATION` |`MI_MOD` |Modulation |
|`MI_MODSD` | |Decrease modulation speed | |`QK_MIDI_MODULATION_SPEED_DOWN`|`MI_MODD` |Decrease modulation speed |
|`MI_MODSU` | |Increase modulation speed | |`QK_MIDI_MODULATION_SPEED_UP` |`MI_MODU` |Increase modulation speed |
|`MI_BENDD` | |Bend pitch down | |`QK_MIDI_PITCH_BEND_DOWN` |`MI_BNDD` |Bend pitch down |
|`MI_BENDU` | |Bend pitch up | |`QK_MIDI_PITCH_BEND_UP` |`MI_BNDU` |Bend pitch up |
### Configuration ### Configuration
Certain values are stored in the `midi_config` struct. This configuration is not persisted to EEPROM. By default, these values are: Certain values are stored in the `midi_config` struct. This configuration is not persisted to EEPROM. By default, these values are:
|Configuration |Value|Comments | |Configuration |Value|Comments |
|-------------------|-----|-------------------------| |-------------------|-----|-----------------------|
|Octave |`4` |Corresponds to `MI_OCT_2`| |Octave |`4` |Corresponds to `MI_OC2`|
|Transposition |`0` | | |Transposition |`0` | |
|Velocity |`127`| | |Velocity |`127`| |
|Channel |`0` | | |Channel |`0` | |

View file

@ -48,8 +48,9 @@ Mouse keys supports three different modes to move the cursor:
* **Kinetic:** Holding movement keys accelerates the cursor with its speed following a quadratic curve until it reaches its maximum speed. * **Kinetic:** Holding movement keys accelerates the cursor with its speed following a quadratic curve until it reaches its maximum speed.
* **Constant:** Holding movement keys moves the cursor at constant speeds. * **Constant:** Holding movement keys moves the cursor at constant speeds.
* **Combined:** Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds. * **Combined:** Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds.
* **Inertia:** Cursor accelerates when key held, and decelerates after key release. Tracks X and Y velocity separately for more nuanced movements. Applies to cursor only, not scrolling.
The same principle applies to scrolling. The same principle applies to scrolling, in most modes.
Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application. Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application.
@ -170,6 +171,37 @@ To use combined speed mode, you must at least define `MK_COMBINED` in your keyma
#define MK_COMBINED #define MK_COMBINED
``` ```
### Inertia mode
This mode provides smooth motion, like sliding on ice. The cursor accelerates
along a quadratic curve while a key is held, then glides to a stop after the
key is released. Vertical and horizontal movements are tracked independently,
so the cursor can move in many directions and make curves.
Cannot be used at the same time as Kinetic mode, Constant mode, or Combined mode.
Recommended settings in your keymaps `config.h` file:
|Define |Default |Description |
|----------------------------|---------|-----------------------------------------------------------|
|`MOUSEKEY_INERTIA` |undefined|Enable Inertia mode |
|`MOUSEKEY_DELAY` |150 |Delay between pressing a movement key and cursor movement |
|`MOUSEKEY_INTERVAL` |16 |Time between cursor movements in milliseconds (16 = 60fps) |
|`MOUSEKEY_MAX_SPEED` |32 |Maximum cursor speed at which acceleration stops |
|`MOUSEKEY_TIME_TO_MAX` |32 |Number of frames until maximum cursor speed is reached |
|`MOUSEKEY_FRICTION` |24 |How quickly the cursor stops after releasing a key |
|`MOUSEKEY_MOVE_DELTA` |1 |How much to move on first frame (1 strongly recommended) |
Tips:
* Set `MOUSEKEY_DELAY` to roughly the same value as your host computer's key repeat delay, in ms. Recommended values are 100 to 300.
* Set `MOUSEKEY_INTERVAL` to a value of 1000 / your monitor's FPS. For 60 FPS, 1000/60 = 16.
* Set `MOUSEKEY_MAX_SPEED` based on your screen resolution and refresh rate, like Width / FPS. For example, 1920 pixels / 60 FPS = 32 pixels per frame.
* Set `MOUSEKEY_TIME_TO_MAX` to a value of approximately FPS / 2, to make it reach full speed in half a second (or so).
* Set `MOUSEKEY_FRICTION` to something between 1 and 255. Lower makes the cursor glide longer. Values from 8 to 40 are the most effective.
* Keep `MOUSEKEY_MOVE_DELTA` at 1. This allows precise movements before the gliding effect starts.
* Mouse wheel options are the same as the default accelerated mode, and do not use inertia.
## Use with PS/2 Mouse and Pointing Device ## Use with PS/2 Mouse and Pointing Device
Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse.md) and [pointing device](feature_pointing_device.md) so mouse keys button presses can be used for clicks and drags. Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse.md) and [pointing device](feature_pointing_device.md) so mouse keys button presses can be used for clicks and drags.

View file

@ -94,19 +94,19 @@ This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the
#### Common settings #### Common settings
| Setting | Description | Default | | Setting | Description | Default |
| -------------------------------- | ---------------------------------------------------------- | ------------------ | | -------------------------------- | ---------------------------------------------------------- | ------------------------------------------- |
| `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` | | `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` |
| `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `ADC_ATTENUATE_4X` | | `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X` |
| `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ | | `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ |
| `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ | | `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ |
**`CIRQUE_PINNACLE_ATTENUATION`** is a measure of how much data is suppressed in regards to sensitivity. The higher the attenuation, the less sensitive the touchpad will be. **`CIRQUE_PINNACLE_ATTENUATION`** is a measure of how much data is suppressed in regards to sensitivity. The higher the attenuation, the less sensitive the touchpad will be.
Default attenuation is set to 4X, although if you are using a thicker overlay (such as the curved overlay) you will want a lower attenuation such as 2X. The possible values are: Default attenuation is set to 4X, although if you are using a thicker overlay (such as the curved overlay) you will want a lower attenuation such as 2X. The possible values are:
* `ADC_ATTENUATE_4X`: Least sensitive * `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X`: Least sensitive
* `ADC_ATTENUATE_3X` * `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_3X`
* `ADC_ATTENUATE_2X` * `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_2X`
* `ADC_ATTENUATE_1X`: Most sensitive * `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_1X`: Most sensitive
**`CIRQUE_PINNACLE_POSITION_MODE`** can be `CIRQUE_PINNACLE_ABSOLUTE_MODE` or `CIRQUE_PINNACLE_RELATIVE_MODE`. Modes differ in supported features/gestures. **`CIRQUE_PINNACLE_POSITION_MODE`** can be `CIRQUE_PINNACLE_ABSOLUTE_MODE` or `CIRQUE_PINNACLE_RELATIVE_MODE`. Modes differ in supported features/gestures.
@ -289,6 +289,7 @@ void pointing_device_driver_set_cpi(uint16_t cpi) {}
| `POINTING_DEVICE_INVERT_X` | (Optional) Inverts the X axis report. | _not defined_ | | `POINTING_DEVICE_INVERT_X` | (Optional) Inverts the X axis report. | _not defined_ |
| `POINTING_DEVICE_INVERT_Y` | (Optional) Inverts the Y axis report. | _not defined_ | | `POINTING_DEVICE_INVERT_Y` | (Optional) Inverts the Y axis report. | _not defined_ |
| `POINTING_DEVICE_MOTION_PIN` | (Optional) If supported, will only read from sensor if pin is active. | _not defined_ | | `POINTING_DEVICE_MOTION_PIN` | (Optional) If supported, will only read from sensor if pin is active. | _not defined_ |
| `POINTING_DEVICE_MOTION_PIN_ACTIVE_LOW` | (Optional) If defined then the motion pin is active-low. | _varies_ |
| `POINTING_DEVICE_TASK_THROTTLE_MS` | (Optional) Limits the frequency that the sensor is polled for motion. | _not defined_ | | `POINTING_DEVICE_TASK_THROTTLE_MS` | (Optional) Limits the frequency that the sensor is polled for motion. | _not defined_ |
| `POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE` | (Optional) Enable inertial cursor. Cursor continues moving after a flick gesture and slows down by kinetic friction. | _not defined_ | | `POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE` | (Optional) Enable inertial cursor. Cursor continues moving after a flick gesture and slows down by kinetic friction. | _not defined_ |
| `POINTING_DEVICE_GESTURES_SCROLL_ENABLE` | (Optional) Enable scroll gesture. The gesture that activates the scroll is device dependent. | _not defined_ | | `POINTING_DEVICE_GESTURES_SCROLL_ENABLE` | (Optional) Enable scroll gesture. The gesture that activates the scroll is device dependent. | _not defined_ |
@ -331,10 +332,10 @@ The following configuration options are only available when using `SPLIT_POINTIN
| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. | | `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. |
| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. | | `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. |
| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. | | `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. |
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `mouse_report_t` data structure). | | `pointing_device_get_report(void)` | Returns the current mouse report (as a `report_mouse_t` data structure). |
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `mouse_report_t` data structured passed to the function. | | `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `report_mouse_t` data structured passed to the function. |
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. | | `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `mouse_report_t` data and returns true only if it has changed. | | `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `report_mouse_t` data and returns true only if it has changed. |
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. | | `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |
@ -344,9 +345,9 @@ The combined functions below are only available when using `SPLIT_POINTING_ENABL
| Function | Description | | Function | Description |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `pointing_device_set_shared_report(mouse_report)` | Sets the shared mouse report to the assigned `mouse_report_t` data structured passed to the function. | | `pointing_device_set_shared_report(mouse_report)` | Sets the shared mouse report to the assigned `report_mouse_t` data structured passed to the function. |
| `pointing_device_set_cpi_on_side(bool, uint16_t)` | Sets the CPI/DPI of one side, if supported. Passing `true` will set the left and `false` the right` | | `pointing_device_set_cpi_on_side(bool, uint16_t)` | Sets the CPI/DPI of one side, if supported. Passing `true` will set the left and `false` the right |
| `pointing_device_combine_reports(left_report, right_report)` | Returns a combined mouse_report of left_report and right_report (as a `mouse_report_t` data structure) | | `pointing_device_combine_reports(left_report, right_report)` | Returns a combined mouse_report of left_report and right_report (as a `report_mouse_t` data structure) |
| `pointing_device_task_combined_kb(left_report, right_report)` | Callback, so keyboard code can intercept and modify the data. Returns a combined mouse report. | | `pointing_device_task_combined_kb(left_report, right_report)` | Callback, so keyboard code can intercept and modify the data. Returns a combined mouse report. |
| `pointing_device_task_combined_user(left_report, right_report)` | Callback, so user code can intercept and modify. Returns a combined mouse report using `pointing_device_combine_reports` | | `pointing_device_task_combined_user(left_report, right_report)` | Callback, so user code can intercept and modify. Returns a combined mouse report using `pointing_device_combine_reports` |
| `pointing_device_adjust_by_defines_right(mouse_report)` | Applies right side rotations and invert configurations to a raw mouse report. | | `pointing_device_adjust_by_defines_right(mouse_report)` | Applies right side rotations and invert configurations to a raw mouse report. |
@ -487,3 +488,243 @@ report_mouse_t pointing_device_task_combined_user(report_mouse_t left_report, re
return pointing_device_combine_reports(left_report, right_report); return pointing_device_combine_reports(left_report, right_report);
} }
``` ```
# Troubleshooting
If you are having issues with pointing device drivers debug messages can be enabled that will give you insights in the inner workings. To enable these add to your keyboards `config.h` file:
```c
#define POINTING_DEVICE_DEBUG
```
?> The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md).
---
# Automatic Mouse Layer :id=pointing-device-auto-mouse
When using a pointing device combined with a keyboard the mouse buttons are often kept on a separate layer from the default keyboard layer, which requires pressing or holding a key to change layers before using the mouse. To make this easier and more efficient an additional pointing device feature may be enabled that will automatically activate a target layer as soon as the pointing device is active _(in motion, mouse button pressed etc.)_ and deactivate the target layer after a set time.
Additionally if any key that is defined as a mouse key is pressed then the layer will be held as long as the key is pressed and the timer will be reset on key release. When a non-mouse key is pressed then the layer is deactivated early _(with some exceptions see below)_. Mod, mod tap, and one shot mod keys are ignored _(i.e. don't hold or activate layer but do not deactivate the layer either)_ when sending a modifier keycode _(e.g. hold for mod tap)_ allowing for mod keys to be used with the mouse without activating the target layer when typing.
All of the standard layer keys (tap toggling, toggle, toggle on, one_shot, layer tap, layer mod) that activate the current target layer are uniquely handled to ensure they behave as expected _(see layer key table below)_. The target layer that can be changed at any point during by calling the `set_auto_mouse_layer(<new_target_layer>);` function.
### Behaviour of Layer keys that activate the target layer
| Layer key as in `keymap.c` | Auto Mouse specific behaviour |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `MO(<target_layer>)` | Treated as a mouse key holding the layer while pressed |
| `LT(<target_layer>)` | When tapped will be treated as non mouse key and mouse key when held |
| `LM(<target_layer>)` | Treated as a mouse key |
| `TG(<target_layer>)` | Will set flag preventing target layer deactivation or removal until pressed again |
| `TO(<target_layer>)` | Same as `TG(<target_layer>)` |
| `TT(<target_layer>)` | Treated as a mouse key when `tap.count < TAPPING_TOGGLE` and as `TG` when `tap.count == TAPPING_TOGGLE` |
| `DF(<target_layer>)` | Skips auto mouse key processing similar to mod keys |
| `OSL(<target_layer>)` | Skips, but if current one shot layer is the target layer then it will prevent target layer deactivation or removal |
## How to enable:
```c
// in config.h:
#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
// only required if not setting mouse layer elsewhere
#define AUTO_MOUSE_DEFAULT_LAYER <index of your mouse layer>
// in keymap.c:
void pointing_device_init_user(void) {
set_auto_mouse_layer(<mouse_layer>); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
set_auto_mouse_enable(true); // always required before the auto mouse feature will work
}
```
Because the auto mouse feature can be disabled/enabled during runtime and starts as disabled by default it must be enabled by calling `set_auto_mouse_enable(true);` somewhere in firmware before the feature will work.
_Note: for setting the target layer during initialization either setting `AUTO_MOUSE_DEFAULT_LAYER` in `config.h` or calling `set_auto_mouse_layer(<mouse_layer>)` can be used._
## How to Customize:
There are a few ways to control the auto mouse feature with both `config.h` options and functions for controlling it during runtime.
### `config.h` Options:
| Define | Description | Range | Units | Default |
| ----------------------------------- | --------------------------------------------------------------------- | :------------------: | :---------: | -------------------------: |
| `POINTING_DEVICE_AUTO_MOUSE_ENABLE` | (Required) Enables auto mouse layer feature | | _None_ | _Not defined_ |
| `AUTO_MOUSE_DEFAULT_LAYER` | (Optional) Index of layer to use as default target layer | 0 - `LAYER_MAX` | _`uint8_t`_ | `1` |
| `AUTO_MOUSE_TIME` | (Optional) Time layer remains active after activation | _ideally_ (250-1000) | _ms_ | `650 ms` |
| `AUTO_MOUSE_DELAY` | (Optional) Lockout time after non-mouse key is pressed | _ideally_ (100-1000) | _ms_ | `TAPPING_TERM` or `200 ms` |
| `AUTO_MOUSE_DEBOUNCE` | (Optional) Time delay from last activation to next update | _ideally_ (10 - 100) | _ms_ | `25 ms` |
### Adding mouse keys
While all default mouse keys and layer keys(for current mouse layer) are treated as mouse keys, additional Keyrecords can be added to mouse keys by adding them to the is_mouse_record_* stack.
#### Callbacks for setting up additional key codes as mouse keys:
| Callback | Description |
| -------------------------------------------------------------------- | -------------------------------------------------- |
| `bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record)` | keyboard level callback for adding mouse keys |
| `bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record)` | user/keymap level callback for adding mouse keys |
##### To use the callback function to add mouse keys:
The following code will cause the enter key and all of the arrow keys to be treated as mouse keys (hold target layer while they are pressed and reset active layer timer).
```c
// in <keyboard>.c:
bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) {
switch(keycode) {
case KC_ENT:
return true;
case KC_RIGHT ... KC_UP:
return true;
default:
return false;
}
return is_mouse_record_user(keycode, record);
}
```
## Advanced control
There are several functions that allow for more advanced interaction with the auto mouse feature allowing for greater control.
### Functions to control auto mouse enable and target layer:
| Function | Description | Aliases | Return type |
| :--------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------- | --------------: |
| `set_auto_mouse_enable(bool enable)` | Enable or disable auto mouse (true:enable, false:disable) | | `void`(None) |
| `get_auto_mouse_enable(void)` | Return auto mouse enable state (true:enabled, false:disabled) | `AUTO_MOUSE_ENABLED` | `bool` |
| `set_auto_mouse_layer(uint8_t LAYER)` | Change/set the target layer for auto mouse | | `void`(None) |
| `get_auto_mouse_layer(void)` | Return auto mouse target layer index | `AUTO_MOUSE_TARGET_LAYER` | `uint8_t` |
| `remove_auto_mouse_layer(layer_state_t state, bool force)` | Return `state` with target layer removed if appropriate (ignore criteria if `force`) | | `layer_state_t` |
| `auto_mouse_layer_off(void)` | Disable target layer if appropriate will call (makes call to `layer_state_set`) | | `void`(None) |
| `auto_mouse_toggle(void)` | Toggle on/off target toggle state (disables layer deactivation when true) | | `void`(None) |
| `get_auto_mouse_toggle(void)` | Return value of toggling state variable | | `bool` |
_NOTES:_
- _Due to the nature of how some functions work, the `auto_mouse_trigger_reset`, and `auto_mouse_layer_off` functions should never be called in the `layer_state_set_*` stack as this can cause indefinite loops._
- _It is recommended that `remove_auto_mouse_layer` is used in the `layer_state_set_*` stack of functions and `auto_mouse_layer_off` is used everywhere else_
- _`remove_auto_mouse_layer(state, false)` or `auto_mouse_layer_off()` should be called before any instance of `set_auto_mouse_enabled(false)` or `set_auto_mouse_layer(layer)` to ensure that the target layer will be removed appropriately before disabling auto mouse or changing target to avoid a stuck layer_
### Functions for handling custom key events:
| Function | Description | Return type |
| :--------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------: |
| `auto_mouse_keyevent(bool pressed)` | Auto mouse mouse key event (true: key down, false: key up) | `void`(None) |
| `auto_mouse_trigger_reset(bool pressed)` | Reset auto mouse status on key down and start delay timer (non-mouse key event) | `void`(None) |
| `auto_mouse_toggle(void)` | Toggle on/off target toggle state (disables layer deactivation when true) | `void`(None) |
| `get_auto_mouse_toggle(void)` | Return value of toggling state variable | `bool` |
_NOTE: Generally it would be preferable to use the `is_mouse_record_*` functions to add any additional keys that should act as mouse keys rather than adding `auto_mouse_keyevent(record.event->pressed)` to `process_records_*`_
### Advanced control examples
#### Disable auto mouse on certain layers:
The auto mouse feature can be disabled any time and this can be helpful if you want to disable the auto mouse feature under certain circumstances such as when particular layers are active. One issue however is the handling of the target layer, it needs to be removed appropriately **before** disabling auto mouse _(see notes under control functions above)_. The following function would disable the auto_mouse feature whenever the layers `_LAYER5` through `_LAYER7` are active as the top most layer _(ignoring target layer)_.
```c
// in keymap.c:
layer_state_t layer_state_set_user(layer_state_t state) {
// checks highest layer other than target layer
switch(get_highest_layer(remove_auto_mouse_layer(state, true))) {
case _LAYER5 ... _LAYER7:
// remove_auto_mouse_target must be called to adjust state *before* setting enable
state = remove_auto_mouse_layer(state, false);
set_auto_mouse_enable(false);
break;
default:
set_auto_mouse_enable(true);
break;
}
// recommend that any code that makes adjustment based on auto mouse layer state would go here
return state;
}
```
#### Set different target layer when a particular layer is active:
The below code will change the auto mouse layer target to `_MOUSE_LAYER_2` when `_DEFAULT_LAYER_2` is highest default layer state.
*NOTE: that `auto_mouse_layer_off` is used here instead of `remove_auto_mouse_layer` as `default_layer_state_set_*` stack is separate from the `layer_state_set_*` stack* if something similar was to be done in `layer_state_set_user `state = remove_auto_mouse_layer(state, false)` should be used instead
*ADDITIONAL NOTE: `AUTO_MOUSE_TARGET_LAYER` is checked if already set to avoid deactivating the target layer unless needed*
```c
// in keymap.c
layer_state_t default_layer_state_set_user(layer_state_t state) {
// switch on change in default layer need to check if target layer already set to avoid turning off layer needlessly
switch(get_highest_layer(state)) {
case _DEFAULT_LAYER_2:
if ((AUTO_MOUSE_TARGET_LAYER) == _MOUSE_LAYER_2) break;
auto_mouse_layer_off();
set_auto_mouse_layer(_MOUSE_LAYER_2);
break;
default:
if((AUTO_MOUSE_TARGET_LAYER) == _MOUSE_LAYER_1) break;
auto_mouse_layer_off();
set_auto_mouse_layer(_MOUSE_LAYER_1);
}
return state;
}
```
### Use custom keys to control auto mouse:
Custom key records could also be created that control the auto mouse feature.
The code example below would create a custom key that would toggle the auto mouse feature on and off when pressed while also setting a bool that could be used to disable other code that may turn it on such as the layer code above.
```c
// in config.h:
enum user_custom_keycodes {
AM_Toggle = SAFE_RANGE
};
// in keymap.c:
// set up global bool to adjust other user code
bool auto_mouse_tg_off = !AUTO_MOUSE_ENABLED;
bool process_record_user(uint16_t keycode, keyrecord_t* record) {
switch (keycode) {
// toggle auto mouse enable key
case AM_Toggle:
if(record->event.pressed) { // key down
auto_mouse_layer_off(); // disable target layer if needed
set_auto_mouse_enabled((AUTO_MOUSE_ENABLED) ^ 1);
auto_mouse_tg_off = !get_auto_mouse_enabled();
} // do nothing on key up
return false; // prevent further processing of keycode
}
}
```
## Customize Target Layer Activation
Layer activation can be customized by overwriting the `auto_mouse_activation` function. This function is checked every time `pointing_device_task` is called when inactive and every `AUTO_MOUSE_DEBOUNCE` ms when active, and will evaluate pointing device level conditions that trigger target layer activation. When it returns true, the target layer will be activated barring the usual exceptions _(e.g. delay time has not expired)_.
By default it will return true if any of the `mouse_report` axes `x`,`y`,`h`,`v` are non zero, or if there is any mouse buttons active in `mouse_report`.
_Note: The Cirque pinnacle track pad already implements a custom activation function that will activate on touchdown as well as movement all of the default conditions, currently this only works for the master side of split keyboards._
| Function | Description | Return type |
| :--------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------: |
| `auto_mouse_activation(report_mouse_t mouse_report)` | Overwritable function that controls target layer activation (when true) | `bool` |
## Auto Mouse for Custom Pointing Device Task
When using a custom pointing device (overwriting `pointing_device_task`) the following code should be somewhere in the `pointing_device_task_*` stack:
```c
void pointing_device_task(void) {
//...Custom pointing device task code
// handle automatic mouse layer (needs report_mouse_t as input)
pointing_device_task_auto_mouse(local_mouse_report);
//...More custom pointing device task code
pointing_device_send();
}
```
In general the following two functions must be implemented in appropriate locations for auto mouse to function:
| Function | Description | Suggested location |
| -------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------: |
| `pointing_device_task_auto_mouse(report_mouse_t mouse_report)` | handles target layer activation and is_active status updates | `pointing_device_task` stack |
| `process_auto_mouse(uint16_t keycode, keyrecord_t* record)` | Keycode processing for auto mouse | `process_record` stack |

View file

@ -1,74 +1,144 @@
## Programmable Button # Programmable Button :id=programmable-button
Programmable button is a feature that can be used to send keys that have no Programmable Buttons are keys that have no predefined meaning. This means they can be processed on the host side by custom software without the operating system trying to interpret them.
predefined meaning.
This means they can be processed on the host side by custom software without
colliding without the operating system trying to interpret these keys.
The keycodes are emitted according to the HID usage The keycodes are emitted according to the HID Telephony Device page (`0x0B`), Programmable Button usage (`0x07`). On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#` keycodes (up to `KEY_MACRO30`).
"Telephony Device Page" (0x0B), "Programmable button usage" (0x07).
On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#`
keycodes.
(Up to `KEY_MACRO30`)
### Enabling Programmable Button support ?> Currently there is no known support in Windows or macOS. It may be possible to write a custom HID driver to receive these usages, but this is out of the scope of the QMK documentation.
To enable Programmable Button, add the following line to your keymaps `rules.mk`: ## Usage :id=usage
```c Add the following to your `rules.mk`:
```make
PROGRAMMABLE_BUTTON_ENABLE = yes PROGRAMMABLE_BUTTON_ENABLE = yes
``` ```
### Mapping ## Keycodes :id=keycodes
In your keymap you can use the following keycodes to map key presses to Programmable Buttons: |Key |Aliases|Description |
|---------------------------|-------|----------------------|
|`QK_PROGRAMMABLE_BUTTON_1` |`PB_1` |Programmable button 1 |
|`QK_PROGRAMMABLE_BUTTON_2` |`PB_2` |Programmable button 2 |
|`QK_PROGRAMMABLE_BUTTON_3` |`PB_3` |Programmable button 3 |
|`QK_PROGRAMMABLE_BUTTON_4` |`PB_4` |Programmable button 4 |
|`QK_PROGRAMMABLE_BUTTON_5` |`PB_5` |Programmable button 5 |
|`QK_PROGRAMMABLE_BUTTON_6` |`PB_6` |Programmable button 6 |
|`QK_PROGRAMMABLE_BUTTON_7` |`PB_7` |Programmable button 7 |
|`QK_PROGRAMMABLE_BUTTON_8` |`PB_8` |Programmable button 8 |
|`QK_PROGRAMMABLE_BUTTON_9` |`PB_9` |Programmable button 9 |
|`QK_PROGRAMMABLE_BUTTON_10`|`PB_10`|Programmable button 10|
|`QK_PROGRAMMABLE_BUTTON_11`|`PB_11`|Programmable button 11|
|`QK_PROGRAMMABLE_BUTTON_12`|`PB_12`|Programmable button 12|
|`QK_PROGRAMMABLE_BUTTON_13`|`PB_13`|Programmable button 13|
|`QK_PROGRAMMABLE_BUTTON_14`|`PB_14`|Programmable button 14|
|`QK_PROGRAMMABLE_BUTTON_15`|`PB_15`|Programmable button 15|
|`QK_PROGRAMMABLE_BUTTON_16`|`PB_16`|Programmable button 16|
|`QK_PROGRAMMABLE_BUTTON_17`|`PB_17`|Programmable button 17|
|`QK_PROGRAMMABLE_BUTTON_18`|`PB_18`|Programmable button 18|
|`QK_PROGRAMMABLE_BUTTON_19`|`PB_19`|Programmable button 19|
|`QK_PROGRAMMABLE_BUTTON_20`|`PB_20`|Programmable button 20|
|`QK_PROGRAMMABLE_BUTTON_21`|`PB_21`|Programmable button 21|
|`QK_PROGRAMMABLE_BUTTON_22`|`PB_22`|Programmable button 22|
|`QK_PROGRAMMABLE_BUTTON_23`|`PB_23`|Programmable button 23|
|`QK_PROGRAMMABLE_BUTTON_24`|`PB_24`|Programmable button 24|
|`QK_PROGRAMMABLE_BUTTON_25`|`PB_25`|Programmable button 25|
|`QK_PROGRAMMABLE_BUTTON_26`|`PB_26`|Programmable button 26|
|`QK_PROGRAMMABLE_BUTTON_27`|`PB_27`|Programmable button 27|
|`QK_PROGRAMMABLE_BUTTON_28`|`PB_28`|Programmable button 28|
|`QK_PROGRAMMABLE_BUTTON_29`|`PB_29`|Programmable button 29|
|`QK_PROGRAMMABLE_BUTTON_30`|`PB_30`|Programmable button 30|
|`QK_PROGRAMMABLE_BUTTON_31`|`PB_31`|Programmable button 31|
|`QK_PROGRAMMABLE_BUTTON_32`|`PB_32`|Programmable button 32|
|Key |Description | ## API :id=api
|------------------------|----------------------|
|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 |
|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 |
|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 |
|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 |
|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 |
|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 |
|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 |
|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 |
|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 |
|`PROGRAMMABLE_BUTTON_10`|Programmable button 10|
|`PROGRAMMABLE_BUTTON_11`|Programmable button 11|
|`PROGRAMMABLE_BUTTON_12`|Programmable button 12|
|`PROGRAMMABLE_BUTTON_13`|Programmable button 13|
|`PROGRAMMABLE_BUTTON_14`|Programmable button 14|
|`PROGRAMMABLE_BUTTON_15`|Programmable button 15|
|`PROGRAMMABLE_BUTTON_16`|Programmable button 16|
|`PROGRAMMABLE_BUTTON_17`|Programmable button 17|
|`PROGRAMMABLE_BUTTON_18`|Programmable button 18|
|`PROGRAMMABLE_BUTTON_19`|Programmable button 19|
|`PROGRAMMABLE_BUTTON_20`|Programmable button 20|
|`PROGRAMMABLE_BUTTON_21`|Programmable button 21|
|`PROGRAMMABLE_BUTTON_22`|Programmable button 22|
|`PROGRAMMABLE_BUTTON_23`|Programmable button 23|
|`PROGRAMMABLE_BUTTON_24`|Programmable button 24|
|`PROGRAMMABLE_BUTTON_25`|Programmable button 25|
|`PROGRAMMABLE_BUTTON_26`|Programmable button 26|
|`PROGRAMMABLE_BUTTON_27`|Programmable button 27|
|`PROGRAMMABLE_BUTTON_28`|Programmable button 28|
|`PROGRAMMABLE_BUTTON_29`|Programmable button 29|
|`PROGRAMMABLE_BUTTON_30`|Programmable button 30|
|`PROGRAMMABLE_BUTTON_31`|Programmable button 31|
|`PROGRAMMABLE_BUTTON_32`|Programmable button 32|
|`PB_1` to `PB_32` |Aliases for keymaps |
### API ### `void programmable_button_clear(void)` :id=api-programmable-button-clear
You can also use a dedicated API defined in `programmable_button.h` to interact with this feature: Clear the programmable button report.
``` ---
void programmable_button_clear(void);
void programmable_button_send(void); ### `void programmable_button_add(uint8_t index)` :id=api-programmable-button-add
void programmable_button_on(uint8_t code);
void programmable_button_off(uint8_t code); Set the state of a button.
bool programmable_button_is_on(uint8_t code);
uint32_t programmable_button_get_report(void); #### Arguments :id=api-programmable-button-add-arguments
void programmable_button_set_report(uint32_t report);
``` - `uint8_t index`
The index of the button to press, from 0 to 31.
---
### `void programmable_button_remove(uint8_t index)` :id=api-programmable-button-remove
Reset the state of a button.
#### Arguments :id=api-programmable-button-remove-arguments
- `uint8_t index`
The index of the button to release, from 0 to 31.
---
### `void programmable_button_register(uint8_t index)` :id=api-programmable-button-register
Set the state of a button, and flush the report.
#### Arguments :id=api-programmable-button-register-arguments
- `uint8_t index`
The index of the button to press, from 0 to 31.
---
### `void programmable_button_unregister(uint8_t index)` :id=api-programmable-button-unregister
Reset the state of a button, and flush the report.
#### Arguments :id=api-programmable-button-unregister-arguments
- `uint8_t index`
The index of the button to release, from 0 to 31.
---
### `bool programmable_button_is_on(uint8_t index)` :id=api-programmable-button-is-on
Get the state of a button.
#### Arguments :id=api-programmable-button-is-on-arguments
- `uint8_t index`
The index of the button to check, from 0 to 31.
#### Return Value :id=api-programmable-button-is-on-return
`true` if the button is pressed.
---
### `void programmable_button_flush(void)` :id=api-programmable-button-flush
Send the programmable button report to the host.
---
### `uint32_t programmable_button_get_report(void)` :id=api-programmable-button-get-report
Get the programmable button report.
#### Return Value :id=api-programmable-button-get-report-return
The bitmask of programmable button states.
---
### `void programmable_button_set_report(uint32_t report)` :id=api-programmable-button-set-report
Set the programmable button report.
#### Arguments :id=api-programmable-button-set-report-arguments
- `uint32_t report`
A bitmask of programmable button states.

View file

@ -32,13 +32,14 @@ In rules.mk:
```make ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_BUSYWAIT = yes PS2_ENABLE = yes
PS2_DRIVER = busywait
``` ```
In your keyboard config.h: In your keyboard config.h:
```c ```c
#ifdef PS2_USE_BUSYWAIT #ifdef PS2_DRIVER_BUSYWAIT
# define PS2_CLOCK_PIN D1 # define PS2_CLOCK_PIN D1
# define PS2_DATA_PIN D2 # define PS2_DATA_PIN D2
#endif #endif
@ -52,13 +53,14 @@ In rules.mk:
```make ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes PS2_ENABLE = yes
PS2_DRIVER = interrupt
``` ```
In your keyboard config.h: In your keyboard config.h:
```c ```c
#ifdef PS2_USE_INT #ifdef PS2_DRIVER_INTERRUPT
#define PS2_CLOCK_PIN D2 #define PS2_CLOCK_PIN D2
#define PS2_DATA_PIN D5 #define PS2_DATA_PIN D5
@ -84,7 +86,8 @@ In rules.mk:
``` ```
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes PS2_ENABLE = yes
PS2_DRIVER = interrupt
``` ```
In your keyboard config.h: In your keyboard config.h:
@ -108,13 +111,14 @@ In rules.mk:
```make ```make
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_USART = yes PS2_ENABLE = yes
PS2_DRIVER = usart
``` ```
In your keyboard config.h: In your keyboard config.h:
```c ```c
#ifdef PS2_USE_USART #ifdef PS2_DRIVER_USART
#define PS2_CLOCK_PIN D5 #define PS2_CLOCK_PIN D5
#define PS2_DATA_PIN D2 #define PS2_DATA_PIN D2

View file

@ -23,7 +23,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` de
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | | `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | | | `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
@ -45,17 +45,17 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25 #define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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`.
For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
@ -90,7 +90,7 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de
| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | | | `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
@ -131,17 +131,17 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 58 #define DRIVER_1_LED_TOTAL 58
#define DRIVER_2_LED_TOTAL 10 #define DRIVER_2_LED_TOTAL 10
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support all 8 combinations. Currently only 4 drivers are supported, but it would be trivial to support all 8 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
@ -164,7 +164,7 @@ There is basic support for addressable RGB matrix lighting with the I2C IS31FL37
RGB_MATRIX_ENABLE = yes RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737 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. You can use between 1 and 4 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard.
Configure the hardware via your `config.h`: Configure the hardware via your `config.h`:
@ -177,9 +177,11 @@ Configure the hardware via your `config.h`:
| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows: The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows:
@ -212,16 +214,16 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 30 #define DRIVER_1_LED_TOTAL 30
#define DRIVER_2_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 2 drivers are supported, but it would be trivial to support all 4 combinations. 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`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
@ -233,7 +235,7 @@ const is31_led PROGMEM 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/led/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0`, `1` for 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`, `2`, or `3` for now).
--- ---
### IS31FLCOMMON :id=is31flcommon ### IS31FLCOMMON :id=is31flcommon
@ -263,7 +265,7 @@ Configure the hardware via your `config.h`:
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Optional) Address for the first RGB driver | | | `DRIVER_ADDR_1` | (Optional) Address for the first RGB driver | |
| `DRIVER_ADDR_<N>` | (Required) Address for the additional RGB drivers | | | `DRIVER_ADDR_<N>` | (Required) Address for the additional RGB drivers | |
| `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | | | `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | |
@ -300,17 +302,17 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66 #define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 42 #define DRIVER_2_LED_TOTAL 42
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model. Currently only 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led __flash g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
@ -361,7 +363,7 @@ Configure the hardware via your `config.h`:
// The pin connected to the data pin of the LEDs // The pin connected to the data pin of the LEDs
#define RGB_DI_PIN D7 #define RGB_DI_PIN D7
// The number of LEDs connected // The number of LEDs connected
#define DRIVER_LED_TOTAL 70 #define RGB_MATRIX_LED_COUNT 70
``` ```
?> There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](ws2812_driver.md) for more information. ?> There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](ws2812_driver.md) for more information.
@ -385,7 +387,7 @@ Configure the hardware via your `config.h`:
// The pin connected to the clock pin of the LEDs // The pin connected to the clock pin of the LEDs
#define RGB_CI_PIN D6 #define RGB_CI_PIN D6
// The number of LEDs connected // The number of LEDs connected
#define DRIVER_LED_TOTAL 70 #define RGB_MATRIX_LED_COUNT 70
``` ```
--- ---
@ -408,7 +410,7 @@ You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC
| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | | | `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_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_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `RGB_MATRIX_LED_COUNT` | (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_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_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
| `AW_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 | | `AW_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 |
@ -426,15 +428,15 @@ Here is an example using 2 drivers.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66 #define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 32 #define DRIVER_2_LED_TOTAL 32
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define RGB_MATRIX_LED_COUNT (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`. !> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c ```c
const aw_led PROGMEM g_aw_leds[DRIVER_LED_TOTAL] = { const aw_led PROGMEM g_aw_leds[RGB_MATRIX_LED_COUNT] = {
/* Each AW20216 channel is controlled by a register at some offset between 0x00 /* Each AW20216 channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive. * and 0xD7 inclusive.
* See drivers/awinic/aw20216.h for the mapping between register offsets and * See drivers/awinic/aw20216.h for the mapping between register offsets and
@ -791,17 +793,16 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off #define RGB_MATRIX_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_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 RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define RGB_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 RGB_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 RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set #define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set #define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set #define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. #define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR // If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
@ -824,7 +825,7 @@ Where `28` is an unused index from `eeconfig.h`.
|Function |Description | |Function |Description |
|--------------------------------------------|-------------| |--------------------------------------------|-------------|
|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | |`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) | |`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `RGB_MATRIX_LED_COUNT` (not written to EEPROM) |
### Disable/Enable Effects :id=disable-enable-effects ### Disable/Enable Effects :id=disable-enable-effects
|Function |Description | |Function |Description |
@ -889,16 +890,21 @@ Where `28` is an unused index from `eeconfig.h`.
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that:
```c ```c
void rgb_matrix_indicators_kb(void) { bool rgb_matrix_indicators_kb(void) {
if (!rgb_matrix_indicators_user()) {
return false;
}
rgb_matrix_set_color(index, red, green, blue); rgb_matrix_set_color(index, red, green, blue);
return true;
} }
``` ```
In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`. In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`.
```c ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
return false;
} }
``` ```
@ -906,21 +912,22 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
Caps Lock indicator on alphanumeric flagged keys: Caps Lock indicator on alphanumeric flagged keys:
```c ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) { if (host_keyboard_led_state().caps_lock) {
for (uint8_t i = led_min; i <= led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) { if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) {
rgb_matrix_set_color(i, RGB_RED); rgb_matrix_set_color(i, RGB_RED);
} }
} }
} }
return false;
} }
``` ```
Layer indicator on all keys: Layer indicator on all keys:
```c ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i <= led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
switch(get_highest_layer(layer_state|default_layer_state)) { switch(get_highest_layer(layer_state|default_layer_state)) {
case 2: case 2:
rgb_matrix_set_color(i, RGB_BLUE); rgb_matrix_set_color(i, RGB_BLUE);
@ -932,12 +939,13 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
break; break;
} }
} }
return false;
} }
``` ```
Layer indicator only on keys with configured keycodes: Layer indicator only on keys with configured keycodes:
```c ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (get_highest_layer(layer_state) > 0) { if (get_highest_layer(layer_state) > 0) {
uint8_t layer = get_highest_layer(layer_state); uint8_t layer = get_highest_layer(layer_state);
@ -945,13 +953,14 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t col = 0; col < MATRIX_COLS; ++col) { for (uint8_t col = 0; col < MATRIX_COLS; ++col) {
uint8_t index = g_led_config.matrix_co[row][col]; uint8_t index = g_led_config.matrix_co[row][col];
if (index >= led_min && index <= led_max && index != NO_LED && if (index >= led_min && index < led_max && index != NO_LED &&
keymap_key_to_keycode(layer, (keypos_t){col,row}) > KC_TRNS) { keymap_key_to_keycode(layer, (keypos_t){col,row}) > KC_TRNS) {
rgb_matrix_set_color(index, RGB_GREEN); rgb_matrix_set_color(index, RGB_GREEN);
} }
} }
} }
} }
return false;
} }
``` ```
@ -962,7 +971,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
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). 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 ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
HSV hsv = {0, 255, 255}; HSV hsv = {0, 255, 255};
if (layer_state_is(layer_state, 2)) { if (layer_state_is(layer_state, 2)) {
@ -976,23 +985,25 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
} }
RGB rgb = hsv_to_rgb(hsv); RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i <= led_max; i++) { for (uint8_t i = led_min; i < led_max; i++) {
if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }
} }
return 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: 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 ```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) { if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(5, 255, 255, 255); // assuming caps lock is at led #5 RGB_MATRIX_INDICATOR_SET_COLOR(5, 255, 255, 255); // assuming caps lock is at led #5
} else { } else {
RGB_MATRIX_INDICATOR_SET_COLOR(5, 0, 0, 0); RGB_MATRIX_INDICATOR_SET_COLOR(5, 0, 0, 0);
} }
return false;
} }
``` ```

View file

@ -302,7 +302,7 @@ void keyboard_post_init_user(void) {
// after the flag has been flipped... // after the flag has been flipped...
void post_process_record_user(uint16_t keycode, keyrecord_t *record) { void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case DEBUG: case QK_DEBUG_TOGGLE:
rgblight_blink_layer(debug_enable ? 0 : 1, 500); rgblight_blink_layer(debug_enable ? 0 : 1, 500);
break; break;
@ -319,13 +319,13 @@ You can also use `rgblight_blink_layer_repeat` to specify the amount of times th
```c ```c
void post_process_record_user(uint16_t keycode, keyrecord_t *record) { void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case DEBUG: case QK_DEBUG_TOGGLE:
rgblight_blink_layer_repeat(debug_enable ? 0 : 1, 200, 3); rgblight_blink_layer_repeat(debug_enable ? 0 : 1, 200, 3);
break; break;
} }
} }
``` ```
would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed. would turn the layer 0 (or 1) on and off again three times when `DB_TOGG` is pressed.
Blinking accumulates layers so if multiple layers are set blinking at the same time they will all blink for the duration and repeat times of the last layer to be blinked. Blinking accumulates layers so if multiple layers are set blinking at the same time they will all blink for the duration and repeat times of the last layer to be blinked.
To stop these other layers from blinking use `rgblight_unblink_layer` or `rgblight_unblink_all_but_layer`: To stop these other layers from blinking use `rgblight_unblink_layer` or `rgblight_unblink_all_but_layer`:

View file

@ -26,12 +26,12 @@ SECURE_ENABLE = yes
## Keycodes ## Keycodes
| Key | Description | | Key |Aliases | Description |
|------------------|--------------------------------------------------------------------------------| |---------------------|---------|--------------------------------------------------------------------------------|
| `SECURE_LOCK` | Revert back to a locked state | | `QK_SECURE_LOCK` |`SE_LOCK`| Revert back to a locked state |
| `SECURE_UNLOCK` | Forces unlock without performing a unlock sequence | | `QK_SECURE_UNLOCK` |`SE_UNLK`| Forces unlock without performing a unlock sequence |
| `SECURE_TOGGLE` | Toggle directly between locked and unlock without performing a unlock sequence | | `QK_SECURE_TOGGLE` |`SE_TOGG`| Toggle directly between locked and unlock without performing a unlock sequence |
| `SECURE_REQUEST` | Request that user perform the unlock sequence | | `QK_SECURE_REQUEST` |`SE_REQ` | Request that user perform the unlock sequence |
## Configuration ## Configuration

View file

@ -5,22 +5,22 @@ Steve Losh described the [Space Cadet Shift](https://stevelosh.com/blog/2012/10/
## Usage ## Usage
Firstly, in your keymap, do one of the following: Firstly, in your keymap, do one of the following:
- Replace the Left Shift key with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close). - Replace the Left Shift key with `SC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `SC_RSPC` (Right Shift, Parenthesis Close).
- Replace the Left Control key with `KC_LCPO` (Left Control, Parenthesis Open), and Right Control with `KC_RCPC` (Right Control, Parenthesis Close). - Replace the Left Control key with `SC_LCPO` (Left Control, Parenthesis Open), and Right Control with `SC_RCPC` (Right Control, Parenthesis Close).
- Replace the Left Alt key with `KC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `KC_RAPC` (Right Alt, Parenthesis Close). - Replace the Left Alt key with `SC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `SC_RAPC` (Right Alt, Parenthesis Close).
- Replace any Shift key in your keymap with `KC_SFTENT` (Right Shift, Enter). - Replace any Shift key in your keymap with `SC_SENT` (Right Shift, Enter).
## Keycodes ## Keycodes
|Keycode |Description | |Keycode |Aliases |Description |
|-----------|-------------------------------------------| |----------------------------------------------|---------|----------------------------------------|
|`KC_LSPO` |Left Shift when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN` |`SC_LCPO`|Left Control when held, `(` when tapped |
|`KC_RSPC` |Right Shift when held, `)` when tapped | |`QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE` |`SC_RCPC`|Right Control when held, `)` when tapped|
|`KC_LCPO` |Left Control when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN` |`SC_LSPO`|Left Shift when held, `(` when tapped |
|`KC_RCPC` |Right Control when held, `)` when tapped | |`QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE`|`SC_RSPC`|Right Shift when held, `)` when tapped |
|`KC_LAPO` |Left Alt when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN` |`SC_LAPO`|Left Alt when held, `(` when tapped |
|`KC_RAPC` |Right Alt when held, `)` when tapped | |`QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE` |`SC_RAPC`|Right Alt when held, `)` when tapped |
|`KC_SFTENT`|Right Shift when held, Enter when tapped | |`QK_SPACE_CADET_RIGHT_SHIFT_ENTER` |`SC_SENT`|Right Shift when held, Enter when tapped|
## Caveats ## Caveats
@ -32,7 +32,7 @@ COMMAND_ENABLE = no
## Configuration ## Configuration
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `KC_LSPO` key with `KC_TRNS` as the `Tap Modifer`. By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `SC_LSPO` key with `KC_TRNS` as the `Tap Modifer`.
|Define |Default |Description | |Define |Default |Description |
|----------------|-------------------------------|---------------------------------------------------------------------------------| |----------------|-------------------------------|---------------------------------------------------------------------------------|
@ -48,7 +48,7 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe
## Obsolete Configuration ## Obsolete Configuration
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`. These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `SC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`.
|Define |Default |Description | |Define |Default |Description |
|------------------------------|-------------|------------------------------------------------------------------| |------------------------------|-------------|------------------------------------------------------------------|

View file

@ -153,11 +153,11 @@ Example:
make crkbd:default:avrdude-split-left make crkbd:default:avrdude-split-left
``` ```
?> ARM controllers using `dfu-util` will require an EEPROM reset after setting handedness. This can be done using the `EEP_RST` keycode or [Bootmagic Lite](feature_bootmagic.md). Controllers using emulated EEPROM will always require handedness parameter when flashing the firmware. ?> ARM controllers using `dfu-util` will require an EEPROM reset after setting handedness. This can be done using the `EE_CLR` keycode or [Bootmagic Lite](feature_bootmagic.md). Controllers using emulated EEPROM will always require handedness parameter when flashing the firmware.
?> [QMK Toolbox]() can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand ?> [QMK Toolbox]() can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand
This setting is not changed when re-initializing the EEPROM using the `EEP_RST` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files. This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common). You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common).
@ -422,6 +422,17 @@ This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_
``` ```
This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
```c
#define SPLIT_WATCHDOG_ENABLE
```
This will enable a software watchdog on any side delegated as slave and will reboot the keyboard if no successful communication occurs within `SPLIT_WATCHDOG_TIMEOUT`. This can be particularly helpful when `SPLIT_USB_DETECT` delegates both sides as slave in some circumstances.
```c
#define SPLIT_WATCHDOG_TIMEOUT 3000
```
This set the maximum slave timeout when waiting for communication from master when using `SPLIT_WATCHDOG_ENABLE`
## Hardware Considerations and Mods ## Hardware Considerations and Mods
Master/slave delegation is made either by detecting voltage on VBUS connection or waiting for USB communication (`SPLIT_USB_DETECT`). Pro Micro boards can use VBUS detection out of the box and be used with or without `SPLIT_USB_DETECT`. Master/slave delegation is made either by detecting voltage on VBUS connection or waiting for USB communication (`SPLIT_USB_DETECT`). Pro Micro boards can use VBUS detection out of the box and be used with or without `SPLIT_USB_DETECT`.

View file

@ -1,10 +0,0 @@
# Thermal Printer
<!-- FIXME: Describe thermal printers support here. -->
## Thermal Printer Keycodes
|Key |Description |
|-----------|----------------------------------------|
|`PRINT_ON` |Start printing everything the user types|
|`PRINT_OFF`|Stop printing everything the user types |

View file

@ -112,30 +112,28 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
The following input modes are available: The following input modes are available:
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points). * **`UNICODE_MODE_MACOS`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points).
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with a different keycode. By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with a different keycode.
!> Using the _Unicode Hex Input_ input source may disable some Option-based shortcuts, such as Option+Left and Option+Right. !> Using the _Unicode Hex Input_ input source may disable some Option-based shortcuts, such as Option+Left and Option+Right.
!> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in future versions of QMK. All new keymaps should use `UC_MAC`. * **`UNICODE_MODE_LINUX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E. By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
Users who wish support in non-GTK apps without IBus may need to resort to a more indirect method, such as creating a custom keyboard layout ([more on this method](#custom-linux-layout)). Users who wish support in non-GTK apps without IBus may need to resort to a more indirect method, such as creating a custom keyboard layout ([more on this method](#custom-linux-layout)).
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`. * **`UNICODE_MODE_WINDOWS`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards. To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead. This mode is not recommended because of reliability and compatibility issues; use the `UNICODE_MODE_WINCOMPOSE` mode instead.
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues). * **`UNICODE_MODE_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points). * **`UNICODE_MODE_WINCOMPOSE`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points).
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. This mode works reliably under all version of Windows supported by the app. To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. This mode works reliably under all version of Windows supported by the app.
By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with a different keycode. By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with a different keycode.
@ -146,15 +144,15 @@ The following input modes are available:
To set your desired input mode, add the following define to your `config.h`: To set your desired input mode, add the following define to your `config.h`:
```c ```c
#define UNICODE_SELECTED_MODES UC_LNX #define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX
``` ```
This example sets the board's default input mode to `UC_LNX`. You can replace this with `UC_MAC`, `UC_WINC`, or any of the other modes listed [above](#input-modes). The board will automatically use the selected mode on startup, unless you manually switch to another mode (see [below](#keycodes)). This example sets the board's default input mode to `UNICODE_MODE_LINUX`. You can replace this with `UNICODE_MODE_MACOS`, `UNICODE_MODE_WINCOMPOSE`, or any of the other modes listed [above](#input-modes). The board will automatically use the selected mode on startup, unless you manually switch to another mode (see [below](#keycodes)).
You can also select multiple input modes, which allows you to easily cycle through them using the `UC_MOD`/`UC_RMOD` keycodes. You can also select multiple input modes, which allows you to easily cycle through them using the `UC_NEXT`/`UC_PREV` keycodes.
```c ```c
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC #define UNICODE_SELECTED_MODES UNICODE_MODE_MACOS, UNICODE_MODE_LINUX, UNICODE_MODE_WINCOMPOSE
``` ```
Note that the values are separated by commas. The board will remember the last used input mode and will continue using it on next power-up. You can disable this and force it to always start with the first mode in the list by adding `#define UNICODE_CYCLE_PERSIST false` to your `config.h`. Note that the values are separated by commas. The board will remember the last used input mode and will continue using it on next power-up. You can disable this and force it to always start with the first mode in the list by adding `#define UNICODE_CYCLE_PERSIST false` to your `config.h`.
@ -164,17 +162,17 @@ Note that the values are separated by commas. The board will remember the last u
You can switch the input mode at any time by using the following keycodes. Adding these to your keymap allows you to quickly switch to a specific input mode, including modes not listed in `UNICODE_SELECTED_MODES`. You can switch the input mode at any time by using the following keycodes. Adding these to your keymap allows you to quickly switch to a specific input mode, including modes not listed in `UNICODE_SELECTED_MODES`.
|Keycode |Alias |Input Mode |Description | |Keycode |Alias |Input Mode |Description |
|----------------------|---------|------------|-----------------------------------------------------------------------------| |----------------------------|---------|-------------------------|-----------------------------------------------------------------------------|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|Cycle through selected modes, reverse direction when Shift is held | |`QK_UNICODE_MODE_NEXT` |`UC_NEXT`|Next in list |Cycle through selected modes, reverse direction when Shift is held |
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|Cycle through selected modes in reverse, forward direction when Shift is held| |`QK_UNICODE_MODE_PREVIOUS` |`UC_PREV`|Prev in list |Cycle through selected modes in reverse, forward direction when Shift is held|
|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input | |`QK_UNICODE_MODE_MACOS` |`UC_MAC` |`UNICODE_MODE_MACOS` |Switch to macOS input |
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input | |`QK_UNICODE_MODE_LINUX` |`UC_LINX`|`UNICODE_MODE_LINUX` |Switch to Linux input |
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input | |`QK_UNICODE_MODE_WINDOWS` |`UC_WIN` |`UNICODE_MODE_WINDOWS` |Switch to Windows input |
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input _(not implemented)_ | |`QK_UNICODE_MODE_BSD` |`UC_BSD` |`UNICODE_MODE_BSD` |Switch to BSD input _(not implemented)_ |
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose | |`QK_UNICODE_MODE_WINCOMPOSE`|`UC_WINC`|`UNICODE_MODE_WINCOMPOSE`|Switch to Windows input using WinCompose |
|`UNICODE_MODE_EMACS` |`UC_M_EM`|`UC_EMACS` |Switch to emacs (`C-x-8 RET`) | |`QK_UNICODE_MODE_EMACS` |`UC_EMAC`|`UNICODE_MODE_EMACS` |Switch to emacs (`C-x-8 RET`) |
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UNICODE_MODE_LINUX`).
?> Using `UNICODE_SELECTED_MODES` is preferable to calling `set_unicode_input_mode()` in `matrix_init_user()` or similar functions, since it's better integrated into the Unicode system and has the added benefit of avoiding unnecessary writes to EEPROM. ?> Using `UNICODE_SELECTED_MODES` is preferable to calling `set_unicode_input_mode()` in `matrix_init_user()` or similar functions, since it's better integrated into the Unicode system and has the added benefit of avoiding unnecessary writes to EEPROM.
@ -206,6 +204,17 @@ The functions for starting and finishing Unicode input on your platform can be o
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c). You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).
### Input Mode Callbacks
There are callbacks functions available that are called whenever the unicode input mode changes. The new input mode is passed to the function.
|Callback |Description |
|---------------------------------------------------|-----------------------------------------------------|
| `unicode_input_mode_set_kb(uint8_t input_mode)` | Callback for unicode input mode set, for keyboard. |
| `unicode_input_mode_set_user(uint8_t input_mode)` | Callback for unicode input mode set, for users. |
This feature can be used, for instance, to implement LED indicators for the current unicode input mode.
### Input Key Configuration ### Input Key Configuration
You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt). You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt).

View file

@ -12,7 +12,7 @@ EXTRAKEY_ENABLE = yes
VELOCIKEY_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 `VK_TOGG` keycode, which toggles the feature on and off.
The following light effects will all be controlled by Velocikey when it is enabled: The following light effects will all be controlled by Velocikey when it is enabled:
- RGB Breathing - RGB Breathing

View file

@ -36,13 +36,14 @@ rules.mk で:
```makefile ```makefile
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_BUSYWAIT = yes PS2_ENABLE = yes
PS2_DRIVER = busywait
``` ```
キーボードの config.h で: キーボードの config.h で:
```c ```c
#ifdef PS2_USE_BUSYWAIT #ifdef PS2_DRIVER_BUSYWAIT
# define PS2_CLOCK_PIN D1 # define PS2_CLOCK_PIN D1
# define PS2_DATA_PIN D2 # define PS2_DATA_PIN D2
#endif #endif
@ -56,13 +57,14 @@ rules.mk で:
```makefile ```makefile
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes PS2_ENABLE = yes
PS2_DRIVER = interrupt
``` ```
キーボードの config.h で: キーボードの config.h で:
```c ```c
#ifdef PS2_USE_INT #ifdef PS2_DRIVER_INTERRUPT
#define PS2_CLOCK_PIN D2 #define PS2_CLOCK_PIN D2
#define PS2_DATA_PIN D5 #define PS2_DATA_PIN D5
@ -88,14 +90,14 @@ rules.mk で:
```makefile ```makefile
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_USART = yes PS2_ENABLE = yes
PS2_DRIVER = usart
``` ```
キーボードの config.h で: キーボードの config.h で:
```c ```c
#ifdef PS2_USE_USART #ifdef PS2_DRIVER_USART
#ifdef PS2_USE_USART
#define PS2_CLOCK_PIN D5 #define PS2_CLOCK_PIN D5
#define PS2_DATA_PIN D2 #define PS2_DATA_PIN D2

View file

@ -207,6 +207,8 @@ See also: [Basic Keycodes](keycodes_basic.md)
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | |`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ |
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | |`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | |`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ |
|`KC_CONTROL_PANEL` |`KC_CPNL` |Open Control Panel |✔ | | |
|`KC_ASSISTANT` |`KC_ASST` |Launch Context-Aware Assistant |✔ | | |
<sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/> <sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/>
<sup>2. Treated as F13-F15.</sup><br/> <sup>2. Treated as F13-F15.</sup><br/>
@ -232,62 +234,89 @@ See also: [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
See also: [Audio](feature_audio.md) See also: [Audio](feature_audio.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|----------------|---------|----------------------------------| |-------------------------|---------|-------------------------------------------|
|`AU_ON` | |Turns on Audio Feature | |`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|`AU_OFF` | |Turns off Audio Feature | |`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|`AU_TOG` | |Toggles Audio state | |`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode | |`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks | |`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks | |`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default | |`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|`MU_ON` | |Turns on Music Mode | |`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|`MU_OFF` | |Turns off Music Mode | |`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|`MU_TOG` | |Toggles Music Mode | |`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
|`MU_MOD` | |Cycles through the music modes | |`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |
## Auto Shift :id=auto-shift
See also: [Auto Shift](feature_auto_shift.md)
|Key |Aliases |Description |
|----------------------|---------|--------------------------------------------|
|`QK_AUTO_SHIFT_DOWN` |`AS_DOWN`|Lower the Auto Shift timeout variable (down)|
|`QK_AUTO_SHIFT_UP` |`AS_UP` |Raise the Auto Shift timeout variable (up) |
|`QK_AUTO_SHIFT_REPORT`|`AS_RPT` |Report your current Auto Shift timeout value|
|`QK_AUTO_SHIFT_ON` |`AS_ON` |Turns on the Auto Shift Function |
|`QK_AUTO_SHIFT_OFF` |`AS_OFF` |Turns off the Auto Shift Function |
|`QK_AUTO_SHIFT_TOGGLE`|`AS_TOGG`|Toggles the state of the Auto Shift feature |
## Autocorrect :id=autocorrect
See also: [Autocorrect](feature_autocorrect.md)
|Key |Aliases |Description |
|-----------------------|---------|----------------------------------------------|
|`QK_AUTOCORRECT_ON` |`AC_ON` |Turns on the Autocorrect feature. |
|`QK_AUTOCORRECT_OFF` |`AC_OFF` |Turns off the Autocorrect feature. |
|`QK_AUTOCORRECT_TOGGLE`|`AC_TOGG`|Toggles the status of the Autocorrect feature.|
## Backlighting :id=backlighting ## Backlighting :id=backlighting
See also: [Backlighting](feature_backlight.md) See also: [Backlighting](feature_backlight.md)
|Key |Description | | Key | Aliases | Description |
|---------|------------------------------------------| |---------------------------------|-----------|-------------------------------------|
|`BL_TOGG`|Turn the backlight on or off | | `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Turn the backlight on or off |
|`BL_STEP`|Cycle through backlight levels | | `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through backlight levels |
|`BL_ON` |Set the backlight to max brightness | | `QK_BACKLIGHT_ON` | `BL_ON` | Set the backlight to max brightness |
|`BL_OFF` |Turn the backlight off | | `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn the backlight off |
|`BL_INC` |Increase the backlight level | | `QK_BACKLIGHT_UP` | `BL_UP` | Increase the backlight level |
|`BL_DEC` |Decrease the backlight level | | `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
|`BL_BRTG`|Toggle backlight breathing | | `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
## Bluetooth :id=bluetooth ## Bluetooth :id=bluetooth
See also: [Bluetooth](feature_bluetooth.md) See also: [Bluetooth](feature_bluetooth.md)
|Key |Description | |Key |Aliases |Description |
|----------|----------------------------------------------| |---------------------|---------|----------------------------------------------|
|`OUT_AUTO`|Automatically switch between USB and Bluetooth| |`QK_OUTPUT_AUTO` |`OU_AUTO`|Automatically switch between USB and Bluetooth|
|`OUT_USB` |USB only | |`QK_OUTPUT_USB` |`OU_USB` |USB only |
|`OUT_BT` |Bluetooth only | |`QK_OUTPUT_BLUETOOTH`|`OU_BT` |Bluetooth only |
## Caps Word :id=caps-word ## Caps Word :id=caps-word
See also: [Caps Word](feature_caps_word.md) See also: [Caps Word](feature_caps_word.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------|---------|------------------------------| |---------------------|---------|------------------------------|
|`CAPS_WORD`|`CAPSWRD`|Toggles Caps Word | |`QK_CAPS_WORD_TOGGLE`|`CW_TOGG`|Toggles Caps Word |
## Dynamic Macros :id=dynamic-macros ## Dynamic Macros :id=dynamic-macros
See also: [Dynamic Macros](feature_dynamic_macros.md) See also: [Dynamic Macros](feature_dynamic_macros.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------------|---------|--------------------------------------------------| |---------------------------------|---------|--------------------------------------------------|
|`DYN_REC_START1` |`DM_REC1`|Start recording Macro 1 | |`QK_DYNAMIC_MACRO_RECORD_START_1`|`DM_REC1`|Start recording Macro 1 |
|`DYN_REC_START2` |`DM_REC2`|Start recording Macro 2 | |`QK_DYNAMIC_MACRO_RECORD_START_2`|`DM_REC2`|Start recording Macro 2 |
|`DYN_MACRO_PLAY1`|`DM_PLY1`|Replay Macro 1 | |`QK_DYNAMIC_MACRO_PLAY_1` |`DM_PLY1`|Replay Macro 1 |
|`DYN_MACRO_PLAY2`|`DM_PLY2`|Replay Macro 2 | |`QK_DYNAMIC_MACRO_PLAY_2` |`DM_PLY2`|Replay Macro 2 |
|`DYN_REC_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.| |`QK_DYNAMIC_MACRO_RECORD_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.|
## Grave Escape :id=grave-escape ## Grave Escape :id=grave-escape
@ -297,13 +326,52 @@ See also: [Grave Escape](feature_grave_esc.md)
|-----------------|---------|------------------------------------------------------------------| |-----------------|---------|------------------------------------------------------------------|
|`QK_GRAVE_ESCAPE`|`QK_GESC`|Escape when pressed, <code>&#96;</code> when Shift or GUI are held| |`QK_GRAVE_ESCAPE`|`QK_GESC`|Escape when pressed, <code>&#96;</code> when Shift or GUI are held|
## Joystick :id=joystick
See also: [Joystick](feature_joystick.md)
|Key |Aliases|Description|
|-----------------------|-------|-----------|
|`QK_JOYSTICK_BUTTON_0` |`JS_0` |Button 0 |
|`QK_JOYSTICK_BUTTON_1` |`JS_1` |Button 1 |
|`QK_JOYSTICK_BUTTON_2` |`JS_2` |Button 2 |
|`QK_JOYSTICK_BUTTON_3` |`JS_3` |Button 3 |
|`QK_JOYSTICK_BUTTON_4` |`JS_4` |Button 4 |
|`QK_JOYSTICK_BUTTON_5` |`JS_5` |Button 5 |
|`QK_JOYSTICK_BUTTON_6` |`JS_6` |Button 6 |
|`QK_JOYSTICK_BUTTON_7` |`JS_7` |Button 7 |
|`QK_JOYSTICK_BUTTON_8` |`JS_8` |Button 8 |
|`QK_JOYSTICK_BUTTON_9` |`JS_9` |Button 9 |
|`QK_JOYSTICK_BUTTON_10`|`JS_10`|Button 10 |
|`QK_JOYSTICK_BUTTON_11`|`JS_11`|Button 11 |
|`QK_JOYSTICK_BUTTON_12`|`JS_12`|Button 12 |
|`QK_JOYSTICK_BUTTON_13`|`JS_13`|Button 13 |
|`QK_JOYSTICK_BUTTON_14`|`JS_14`|Button 14 |
|`QK_JOYSTICK_BUTTON_15`|`JS_15`|Button 15 |
|`QK_JOYSTICK_BUTTON_16`|`JS_16`|Button 16 |
|`QK_JOYSTICK_BUTTON_17`|`JS_17`|Button 17 |
|`QK_JOYSTICK_BUTTON_18`|`JS_18`|Button 18 |
|`QK_JOYSTICK_BUTTON_19`|`JS_19`|Button 19 |
|`QK_JOYSTICK_BUTTON_20`|`JS_20`|Button 20 |
|`QK_JOYSTICK_BUTTON_21`|`JS_21`|Button 21 |
|`QK_JOYSTICK_BUTTON_22`|`JS_22`|Button 22 |
|`QK_JOYSTICK_BUTTON_23`|`JS_23`|Button 23 |
|`QK_JOYSTICK_BUTTON_24`|`JS_24`|Button 24 |
|`QK_JOYSTICK_BUTTON_25`|`JS_25`|Button 25 |
|`QK_JOYSTICK_BUTTON_26`|`JS_26`|Button 26 |
|`QK_JOYSTICK_BUTTON_27`|`JS_27`|Button 27 |
|`QK_JOYSTICK_BUTTON_28`|`JS_28`|Button 28 |
|`QK_JOYSTICK_BUTTON_29`|`JS_29`|Button 29 |
|`QK_JOYSTICK_BUTTON_30`|`JS_30`|Button 30 |
|`QK_JOYSTICK_BUTTON_31`|`JS_31`|Button 31 |
## Key Lock :id=key-lock ## Key Lock :id=key-lock
See also: [Key Lock](feature_key_lock.md) See also: [Key Lock](feature_key_lock.md)
|Key |Description | |Key |Description |
|---------|--------------------------------------------------------------| |---------|--------------------------------------------------------------|
|`KC_LOCK`|Hold down the next key pressed, until the key is pressed again| |`QK_LOCK`|Hold down the next key pressed, until the key is pressed again|
## Layer Switching :id=layer-switching ## Layer Switching :id=layer-switching
@ -326,7 +394,7 @@ See also: [Leader Key](feature_leader_key.md)
|Key |Description | |Key |Description |
|---------|------------------------| |---------|------------------------|
|`KC_LEAD`|Begins a leader sequence| |`QK_LEAD`|Begins a leader sequence|
## Magic Keycodes :id=magic-keycodes ## Magic Keycodes :id=magic-keycodes
@ -363,6 +431,7 @@ See also: [Magic Keycodes](keycodes_magic.md)
|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap <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_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace |
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace | |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace |
|`MAGIC_TOGGLE_BACKSLASH_BACKSPACE`|`BS_TOGG`|Toggle `\` and Backspace swap state |
|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover | |`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover |
|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover | |`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover |
|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover | |`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover |
@ -374,151 +443,151 @@ See also: [Magic Keycodes](keycodes_magic.md)
See also: [MIDI](feature_midi.md) See also: [MIDI](feature_midi.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|------------|---------|---------------------------------| |-------------------------------|------------------|---------------------------------|
|`MI_ON` | |Turn MIDI on | |`QK_MIDI_ON` |`MI_ON` |Turn MIDI on |
|`MI_OFF` | |Turn MIDI off | |`QK_MIDI_OFF` |`MI_OFF` |Turn MIDI off |
|`MI_TOG` | |Toggle MIDI enabled | |`QK_MIDI_TOGGLE` |`MI_TOGG` |Toggle MIDI enabled |
|`MI_C` | |C octave 0 | |`QK_MIDI_NOTE_C_0` |`MI_C` |C octave 0 |
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 | |`QK_MIDI_NOTE_C_SHARP_0` |`MI_Cs`, `MI_Db` |C♯/D♭ octave 0 |
|`MI_D` | |D octave 0 | |`QK_MIDI_NOTE_D_0` |`MI_D` |D octave 0 |
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 | |`QK_MIDI_NOTE_D_SHARP_0` |`MI_Ds`, `MI_Eb` |D♯/E♭ octave 0 |
|`MI_E` | |E octave 0 | |`QK_MIDI_NOTE_E_0` |`MI_E` |E octave 0 |
|`MI_F` | |F octave 0 | |`QK_MIDI_NOTE_F_0` |`MI_F` |F octave 0 |
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 | |`QK_MIDI_NOTE_F_SHARP_0` |`MI_Fs`, `MI_Gb` |F♯/G♭ octave 0 |
|`MI_G` | |G octave 0 | |`QK_MIDI_NOTE_G_0` |`MI_G` |G octave 0 |
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 | |`QK_MIDI_NOTE_G_SHARP_0` |`MI_Gs`, `MI_Ab` |G♯/A♭ octave 0 |
|`MI_A` | |A octave 0 | |`QK_MIDI_NOTE_A_0` |`MI_A` |A octave 0 |
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 | |`QK_MIDI_NOTE_A_SHARP_0` |`MI_As`, `MI_Bb` |A♯/B♭ octave 0 |
|`MI_B` | |B octave 0 | |`QK_MIDI_NOTE_B_0` |`MI_B` |B octave 0 |
|`MI_C_1` | |C octave 1 | |`QK_MIDI_NOTE_C_1` |`MI_C1` |C octave 1 |
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 | |`QK_MIDI_NOTE_C_SHARP_1` |`MI_Cs1`, `MI_Db1`|C♯/D♭ octave 1 |
|`MI_D_1` | |D octave 1 | |`QK_MIDI_NOTE_D_1` |`MI_D1` |D octave 1 |
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 | |`QK_MIDI_NOTE_D_SHARP_1` |`MI_Ds1`, `MI_Eb1`|D♯/E♭ octave 1 |
|`MI_E_1` | |E octave 1 | |`QK_MIDI_NOTE_E_1` |`MI_E1` |E octave 1 |
|`MI_F_1` | |F octave 1 | |`QK_MIDI_NOTE_F_1` |`MI_F1` |F octave 1 |
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 | |`QK_MIDI_NOTE_F_SHARP_1` |`MI_Fs1`, `MI_Gb1`|F♯/G♭ octave 1 |
|`MI_G_1` | |G octave 1 | |`QK_MIDI_NOTE_G_1` |`MI_G1` |G octave 1 |
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 | |`QK_MIDI_NOTE_G_SHARP_1` |`MI_Gs1`, `MI_Ab1`|G♯/A♭ octave 1 |
|`MI_A_1` | |A octave 1 | |`QK_MIDI_NOTE_A_1` |`MI_A1` |A octave 1 |
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 | |`QK_MIDI_NOTE_A_SHARP_1` |`MI_As1`, `MI_Bb1`|A♯/B♭ octave 1 |
|`MI_B_1` | |B octave 1 | |`QK_MIDI_NOTE_B_1` |`MI_B1` |B octave 1 |
|`MI_C_2` | |C octave 2 | |`QK_MIDI_NOTE_C_2` |`MI_C2` |C octave 2 |
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 | |`QK_MIDI_NOTE_C_SHARP_2` |`MI_Cs2`, `MI_Db2`|C♯/D♭ octave 2 |
|`MI_D_2` | |D octave 2 | |`QK_MIDI_NOTE_D_2` |`MI_D2` |D octave 2 |
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 | |`QK_MIDI_NOTE_D_SHARP_2` |`MI_Ds2`, `MI_Eb2`|D♯/E♭ octave 2 |
|`MI_E_2` | |E octave 2 | |`QK_MIDI_NOTE_E_2` |`MI_E2` |E octave 2 |
|`MI_F_2` | |F octave 2 | |`QK_MIDI_NOTE_F_2` |`MI_F2` |F octave 2 |
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 | |`QK_MIDI_NOTE_F_SHARP_2` |`MI_Fs2`, `MI_Gb2`|F♯/G♭ octave 2 |
|`MI_G_2` | |G octave 2 | |`QK_MIDI_NOTE_G_2` |`MI_G2` |G octave 2 |
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 | |`QK_MIDI_NOTE_G_SHARP_2` |`MI_Gs2`, `MI_Ab2`|G♯/A♭ octave 2 |
|`MI_A_2` | |A octave 2 | |`QK_MIDI_NOTE_A_2` |`MI_A2` |A octave 2 |
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 | |`QK_MIDI_NOTE_A_SHARP_2` |`MI_As2`, `MI_Bb2`|A♯/B♭ octave 2 |
|`MI_B_2` | |B octave 2 | |`QK_MIDI_NOTE_B_2` |`MI_B2` |B octave 2 |
|`MI_C_3` | |C octave 3 | |`QK_MIDI_NOTE_C_3` |`MI_C3` |C octave 3 |
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 | |`QK_MIDI_NOTE_C_SHARP_3` |`MI_Cs3`, `MI_Db3`|C♯/D♭ octave 3 |
|`MI_D_3` | |D octave 3 | |`QK_MIDI_NOTE_D_3` |`MI_D3` |D octave 3 |
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 | |`QK_MIDI_NOTE_D_SHARP_3` |`MI_Ds3`, `MI_Eb3`|D♯/E♭ octave 3 |
|`MI_E_3` | |E octave 3 | |`QK_MIDI_NOTE_E_3` |`MI_E3` |E octave 3 |
|`MI_F_3` | |F octave 3 | |`QK_MIDI_NOTE_F_3` |`MI_F3` |F octave 3 |
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 | |`QK_MIDI_NOTE_F_SHARP_3` |`MI_Fs3`, `MI_Gb3`|F♯/G♭ octave 3 |
|`MI_G_3` | |G octave 3 | |`QK_MIDI_NOTE_G_3` |`MI_G3` |G octave 3 |
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 | |`QK_MIDI_NOTE_G_SHARP_3` |`MI_Gs3`, `MI_Ab3`|G♯/A♭ octave 3 |
|`MI_A_3` | |A octave 3 | |`QK_MIDI_NOTE_A_3` |`MI_A3` |A octave 3 |
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 | |`QK_MIDI_NOTE_A_SHARP_3` |`MI_As3`, `MI_Bb3`|A♯/B♭ octave 3 |
|`MI_B_3` | |B octave 3 | |`QK_MIDI_NOTE_B_3` |`MI_B3` |B octave 3 |
|`MI_C_4` | |C octave 4 | |`QK_MIDI_NOTE_C_4` |`MI_C4` |C octave 4 |
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 | |`QK_MIDI_NOTE_C_SHARP_4` |`MI_Cs4`, `MI_Db4`|C♯/D♭ octave 4 |
|`MI_D_4` | |D octave 4 | |`QK_MIDI_NOTE_D_4` |`MI_D4` |D octave 4 |
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 | |`QK_MIDI_NOTE_D_SHARP_4` |`MI_Ds4`, `MI_Eb4`|D♯/E♭ octave 4 |
|`MI_E_4` | |E octave 4 | |`QK_MIDI_NOTE_E_4` |`MI_E4` |E octave 4 |
|`MI_F_4` | |F octave 4 | |`QK_MIDI_NOTE_F_4` |`MI_F4` |F octave 4 |
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 | |`QK_MIDI_NOTE_F_SHARP_4` |`MI_Fs4`, `MI_Gb4`|F♯/G♭ octave 4 |
|`MI_G_4` | |G octave 4 | |`QK_MIDI_NOTE_G_4` |`MI_G4` |G octave 4 |
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 | |`QK_MIDI_NOTE_G_SHARP_4` |`MI_Gs4`, `MI_Ab4`|G♯/A♭ octave 4 |
|`MI_A_4` | |A octave 4 | |`QK_MIDI_NOTE_A_4` |`MI_A4` |A octave 4 |
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 | |`QK_MIDI_NOTE_A_SHARP_4` |`MI_As4`, `MI_Bb4`|A♯/B♭ octave 4 |
|`MI_B_4` | |B octave 4 | |`QK_MIDI_NOTE_B_4` |`MI_B4` |B octave 4 |
|`MI_C_5` | |C octave 5 | |`QK_MIDI_NOTE_C_5` |`MI_C5` |C octave 5 |
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 | |`QK_MIDI_NOTE_C_SHARP_5` |`MI_Cs5`, `MI_Db5`|C♯/D♭ octave 5 |
|`MI_D_5` | |D octave 5 | |`QK_MIDI_NOTE_D_5` |`MI_D5` |D octave 5 |
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 | |`QK_MIDI_NOTE_D_SHARP_5` |`MI_Ds5`, `MI_Eb5`|D♯/E♭ octave 5 |
|`MI_E_5` | |E octave 5 | |`QK_MIDI_NOTE_E_5` |`MI_E5` |E octave 5 |
|`MI_F_5` | |F octave 5 | |`QK_MIDI_NOTE_F_5` |`MI_F5` |F octave 5 |
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 | |`QK_MIDI_NOTE_F_SHARP_5` |`MI_Fs5`, `MI_Gb5`|F♯/G♭ octave 5 |
|`MI_G_5` | |G octave 5 | |`QK_MIDI_NOTE_G_5` |`MI_G5` |G octave 5 |
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 | |`QK_MIDI_NOTE_G_SHARP_5` |`MI_Gs5`, `MI_Ab5`|G♯/A♭ octave 5 |
|`MI_A_5` | |A octave 5 | |`QK_MIDI_NOTE_A_5` |`MI_A5` |A octave 5 |
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 | |`QK_MIDI_NOTE_A_SHARP_5` |`MI_As5`, `MI_Bb5`|A♯/B♭ octave 5 |
|`MI_B_5` | |B octave 5 | |`QK_MIDI_NOTE_B_5` |`MI_B5` |B octave 5 |
|`MI_OCT_N2` | |Set octave to -2 | |`QK_MIDI_OCTAVE_N2` |`MI_OCN2` |Set octave to -2 |
|`MI_OCT_N1` | |Set octave to -1 | |`QK_MIDI_OCTAVE_N1` |`MI_OCN1` |Set octave to -1 |
|`MI_OCT_0` | |Set octave to 0 | |`QK_MIDI_OCTAVE_0` |`MI_OC0` |Set octave to 0 |
|`MI_OCT_1` | |Set octave to 1 | |`QK_MIDI_OCTAVE_1` |`MI_OC1` |Set octave to 1 |
|`MI_OCT_2` | |Set octave to 2 | |`QK_MIDI_OCTAVE_2` |`MI_OC2` |Set octave to 2 |
|`MI_OCT_3` | |Set octave to 3 | |`QK_MIDI_OCTAVE_3` |`MI_OC3` |Set octave to 3 |
|`MI_OCT_4` | |Set octave to 4 | |`QK_MIDI_OCTAVE_4` |`MI_OC4` |Set octave to 4 |
|`MI_OCT_5` | |Set octave to 5 | |`QK_MIDI_OCTAVE_5` |`MI_OC5` |Set octave to 5 |
|`MI_OCT_6` | |Set octave to 6 | |`QK_MIDI_OCTAVE_6` |`MI_OC6` |Set octave to 6 |
|`MI_OCT_7` | |Set octave to 7 | |`QK_MIDI_OCTAVE_7` |`MI_OC7` |Set octave to 7 |
|`MI_OCTD` | |Move down an octave | |`QK_MIDI_OCTAVE_DOWN` |`MI_OCTD` |Move down an octave |
|`MI_OCTU` | |Move up an octave | |`QK_MIDI_OCTAVE_UP` |`MI_OCTU` |Move up an octave |
|`MI_TRNS_N6`| |Set transposition to -6 semitones| |`QK_MIDI_TRANSPOSE_N6` |`MI_TRN6` |Set transposition to -6 semitones|
|`MI_TRNS_N5`| |Set transposition to -5 semitones| |`QK_MIDI_TRANSPOSE_N5` |`MI_TRN5` |Set transposition to -5 semitones|
|`MI_TRNS_N4`| |Set transposition to -4 semitones| |`QK_MIDI_TRANSPOSE_N4` |`MI_TRN4` |Set transposition to -4 semitones|
|`MI_TRNS_N3`| |Set transposition to -3 semitones| |`QK_MIDI_TRANSPOSE_N3` |`MI_TRN3` |Set transposition to -3 semitones|
|`MI_TRNS_N2`| |Set transposition to -2 semitones| |`QK_MIDI_TRANSPOSE_N2` |`MI_TRN2` |Set transposition to -2 semitones|
|`MI_TRNS_N1`| |Set transposition to -1 semitone | |`QK_MIDI_TRANSPOSE_N1` |`MI_TRN1` |Set transposition to -1 semitone |
|`MI_TRNS_0` | |No transposition | |`QK_MIDI_TRANSPOSE_0` |`MI_TR0` |No transposition |
|`MI_TRNS_1` | |Set transposition to +1 semitone | |`QK_MIDI_TRANSPOSE_1` |`MI_TR1` |Set transposition to +1 semitone |
|`MI_TRNS_2` | |Set transposition to +2 semitones| |`QK_MIDI_TRANSPOSE_2` |`MI_TR2` |Set transposition to +2 semitones|
|`MI_TRNS_3` | |Set transposition to +3 semitones| |`QK_MIDI_TRANSPOSE_3` |`MI_TR3` |Set transposition to +3 semitones|
|`MI_TRNS_4` | |Set transposition to +4 semitones| |`QK_MIDI_TRANSPOSE_4` |`MI_TR4` |Set transposition to +4 semitones|
|`MI_TRNS_5` | |Set transposition to +5 semitones| |`QK_MIDI_TRANSPOSE_5` |`MI_TR5` |Set transposition to +5 semitones|
|`MI_TRNS_6` | |Set transposition to +6 semitones| |`QK_MIDI_TRANSPOSE_6` |`MI_TR6` |Set transposition to +6 semitones|
|`MI_TRNSD` | |Decrease transposition | |`QK_MIDI_TRANSPOSE_DOWN` |`MI_TRSD` |Decrease transposition |
|`MI_TRNSU` | |Increase transposition | |`QK_MIDI_TRANSPOSE_UP` |`MI_TRSU` |Increase transposition |
|`MI_VEL_0` | |Set velocity to 0 | |`QK_MIDI_VELOCITY_0` |`MI_VL0` |Set velocity to 0 |
|`MI_VEL_1` | |Set velocity to 12 | |`QK_MIDI_VELOCITY_1` |`MI_VL1` |Set velocity to 12 |
|`MI_VEL_2` | |Set velocity to 25 | |`QK_MIDI_VELOCITY_2` |`MI_VL2` |Set velocity to 25 |
|`MI_VEL_3` | |Set velocity to 38 | |`QK_MIDI_VELOCITY_3` |`MI_VL3` |Set velocity to 38 |
|`MI_VEL_4` | |Set velocity to 51 | |`QK_MIDI_VELOCITY_4` |`MI_VL4` |Set velocity to 51 |
|`MI_VEL_5` | |Set velocity to 64 | |`QK_MIDI_VELOCITY_5` |`MI_VL5` |Set velocity to 64 |
|`MI_VEL_6` | |Set velocity to 76 | |`QK_MIDI_VELOCITY_6` |`MI_VL6` |Set velocity to 76 |
|`MI_VEL_7` | |Set velocity to 89 | |`QK_MIDI_VELOCITY_7` |`MI_VL7` |Set velocity to 89 |
|`MI_VEL_8` | |Set velocity to 102 | |`QK_MIDI_VELOCITY_8` |`MI_VL8` |Set velocity to 102 |
|`MI_VEL_9` | |Set velocity to 114 | |`QK_MIDI_VELOCITY_9` |`MI_VL9` |Set velocity to 114 |
|`MI_VEL_10` | |Set velocity to 127 | |`QK_MIDI_VELOCITY_10` |`MI_VL10` |Set velocity to 127 |
|`MI_VELD` | |Decrease velocity | |`QK_MIDI_VELOCITY_DOWN` |`MI_VELD` |Decrease velocity |
|`MI_VELU` | |Increase velocity | |`QK_MIDI_VELOCITY_UP` |`MI_VELU` |Increase velocity |
|`MI_CH1` | |Set channel to 1 | |`QK_MIDI_CHANNEL_1` |`MI_CH1` |Set channel to 1 |
|`MI_CH2` | |Set channel to 2 | |`QK_MIDI_CHANNEL_2` |`MI_CH2` |Set channel to 2 |
|`MI_CH3` | |Set channel to 3 | |`QK_MIDI_CHANNEL_3` |`MI_CH3` |Set channel to 3 |
|`MI_CH4` | |Set channel to 4 | |`QK_MIDI_CHANNEL_4` |`MI_CH4` |Set channel to 4 |
|`MI_CH5` | |Set channel to 5 | |`QK_MIDI_CHANNEL_5` |`MI_CH5` |Set channel to 5 |
|`MI_CH6` | |Set channel to 6 | |`QK_MIDI_CHANNEL_6` |`MI_CH6` |Set channel to 6 |
|`MI_CH7` | |Set channel to 7 | |`QK_MIDI_CHANNEL_7` |`MI_CH7` |Set channel to 7 |
|`MI_CH8` | |Set channel to 8 | |`QK_MIDI_CHANNEL_8` |`MI_CH8` |Set channel to 8 |
|`MI_CH9` | |Set channel to 9 | |`QK_MIDI_CHANNEL_9` |`MI_CH9` |Set channel to 9 |
|`MI_CH10` | |Set channel to 10 | |`QK_MIDI_CHANNEL_10` |`MI_CH10` |Set channel to 10 |
|`MI_CH11` | |Set channel to 11 | |`QK_MIDI_CHANNEL_11` |`MI_CH11` |Set channel to 11 |
|`MI_CH12` | |Set channel to 12 | |`QK_MIDI_CHANNEL_12` |`MI_CH12` |Set channel to 12 |
|`MI_CH13` | |Set channel to 13 | |`QK_MIDI_CHANNEL_13` |`MI_CH13` |Set channel to 13 |
|`MI_CH14` | |Set channel to 14 | |`QK_MIDI_CHANNEL_14` |`MI_CH14` |Set channel to 14 |
|`MI_CH15` | |Set channel to 15 | |`QK_MIDI_CHANNEL_15` |`MI_CH15` |Set channel to 15 |
|`MI_CH16` | |Set channel to 16 | |`QK_MIDI_CHANNEL_16` |`MI_CH16` |Set channel to 16 |
|`MI_CHD` | |Decrease channel | |`QK_MIDI_CHANNEL_DOWN` |`MI_CHND` |Decrease channel |
|`MI_CHU` | |Increase channel | |`QK_MIDI_CHANNEL_UP` |`MI_CHNU` |Increase channel |
|`MI_ALLOFF` | |Stop all notes | |`QK_MIDI_ALL_NOTES_OFF` |`MI_AOFF` |Stop all notes |
|`MI_SUS` | |Sustain | |`QK_MIDI_SUSTAIN` |`MI_SUST` |Sustain |
|`MI_PORT` | |Portmento | |`QK_MIDI_PORTAMENTO` |`MI_PORT` |Portmento |
|`MI_SOST` | |Sostenuto | |`QK_MIDI_SOSTENUTO` |`MI_SOST` |Sostenuto |
|`MI_SOFT` | |Soft Pedal | |`QK_MIDI_SOFT` |`MI_SOFT` |Soft Pedal |
|`MI_LEG` | |Legato | |`QK_MIDI_LEGATO` |`MI_LEG` |Legato |
|`MI_MOD` | |Modulation | |`QK_MIDI_MODULATION` |`MI_MOD` |Modulation |
|`MI_MODSD` | |Decrease modulation speed | |`QK_MIDI_MODULATION_SPEED_DOWN`|`MI_MODD` |Decrease modulation speed |
|`MI_MODSU` | |Increase modulation speed | |`QK_MIDI_MODULATION_SPEED_UP` |`MI_MODU` |Increase modulation speed |
|`MI_BENDD` | |Bend pitch down | |`QK_MIDI_PITCH_BEND_DOWN` |`MI_BNDD` |Bend pitch down |
|`MI_BENDU` | |Bend pitch up | |`QK_MIDI_PITCH_BEND_UP` |`MI_BNDU` |Bend pitch up |
## Mouse Keys :id=mouse-keys ## Mouse Keys :id=mouse-keys
@ -604,11 +673,11 @@ See also: [Mod-Tap](mod_tap.md)
See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
| Key | Description | | Key | Aliases | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------|-------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | |`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
## RGB Lighting :id=rgb-lighting ## RGB Lighting :id=rgb-lighting
@ -653,15 +722,6 @@ See also: [RGB Matrix Lighting](feature_rgb_matrix.md)
|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held| |`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held| |`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
## Thermal Printer :id=thermal-printer
See also: [Thermal Printer](feature_thermal_printer.md)
|Key |Description |
|-----------|----------------------------------------|
|`PRINT_ON` |Start printing everything the user types|
|`PRINT_OFF`|Stop printing everything the user types |
## US ANSI Shifted Symbols :id=us-ansi-shifted-symbols ## US ANSI Shifted Symbols :id=us-ansi-shifted-symbols
See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md) See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md)
@ -694,67 +754,66 @@ See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md)
See also: [One Shot Keys](one_shot_keys.md) See also: [One Shot Keys](one_shot_keys.md)
|Key |Description | |Key |Aliases |Description |
|------------|----------------------------------| |--------------------|---------|----------------------------------|
|`OSM(mod)` |Hold `mod` for one keypress | |`OSM(mod)` | |Hold `mod` for one keypress |
|`OSL(layer)`|Switch to `layer` for one keypress| |`OSL(layer)` | |Switch to `layer` for one keypress|
|`OS_ON` |Turns One Shot keys on | |`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
|`OS_OFF` |Turns One Shot keys off | |`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
|`OS_TOGG` |Toggles One Shot keys status | |`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
## Programmable Button Support :id=programmable-button ## Programmable Button Support :id=programmable-button
See also: [Programmable Button](feature_programmable_button.md) See also: [Programmable Button](feature_programmable_button.md)
|Key |Description | |Key |Aliases|Description |
|------------------------|----------------------| |---------------------------|-------|----------------------|
|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | |`QK_PROGRAMMABLE_BUTTON_1` |`PB_1` |Programmable button 1 |
|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | |`QK_PROGRAMMABLE_BUTTON_2` |`PB_2` |Programmable button 2 |
|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | |`QK_PROGRAMMABLE_BUTTON_3` |`PB_3` |Programmable button 3 |
|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | |`QK_PROGRAMMABLE_BUTTON_4` |`PB_4` |Programmable button 4 |
|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | |`QK_PROGRAMMABLE_BUTTON_5` |`PB_5` |Programmable button 5 |
|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | |`QK_PROGRAMMABLE_BUTTON_6` |`PB_6` |Programmable button 6 |
|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | |`QK_PROGRAMMABLE_BUTTON_7` |`PB_7` |Programmable button 7 |
|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | |`QK_PROGRAMMABLE_BUTTON_8` |`PB_8` |Programmable button 8 |
|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | |`QK_PROGRAMMABLE_BUTTON_9` |`PB_9` |Programmable button 9 |
|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| |`QK_PROGRAMMABLE_BUTTON_10`|`PB_10`|Programmable button 10|
|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| |`QK_PROGRAMMABLE_BUTTON_11`|`PB_11`|Programmable button 11|
|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| |`QK_PROGRAMMABLE_BUTTON_12`|`PB_12`|Programmable button 12|
|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| |`QK_PROGRAMMABLE_BUTTON_13`|`PB_13`|Programmable button 13|
|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| |`QK_PROGRAMMABLE_BUTTON_14`|`PB_14`|Programmable button 14|
|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| |`QK_PROGRAMMABLE_BUTTON_15`|`PB_15`|Programmable button 15|
|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| |`QK_PROGRAMMABLE_BUTTON_16`|`PB_16`|Programmable button 16|
|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| |`QK_PROGRAMMABLE_BUTTON_17`|`PB_17`|Programmable button 17|
|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| |`QK_PROGRAMMABLE_BUTTON_18`|`PB_18`|Programmable button 18|
|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| |`QK_PROGRAMMABLE_BUTTON_19`|`PB_19`|Programmable button 19|
|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| |`QK_PROGRAMMABLE_BUTTON_20`|`PB_20`|Programmable button 20|
|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| |`QK_PROGRAMMABLE_BUTTON_21`|`PB_21`|Programmable button 21|
|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| |`QK_PROGRAMMABLE_BUTTON_22`|`PB_22`|Programmable button 22|
|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| |`QK_PROGRAMMABLE_BUTTON_23`|`PB_23`|Programmable button 23|
|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| |`QK_PROGRAMMABLE_BUTTON_24`|`PB_24`|Programmable button 24|
|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| |`QK_PROGRAMMABLE_BUTTON_25`|`PB_25`|Programmable button 25|
|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| |`QK_PROGRAMMABLE_BUTTON_26`|`PB_26`|Programmable button 26|
|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| |`QK_PROGRAMMABLE_BUTTON_27`|`PB_27`|Programmable button 27|
|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| |`QK_PROGRAMMABLE_BUTTON_28`|`PB_28`|Programmable button 28|
|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| |`QK_PROGRAMMABLE_BUTTON_29`|`PB_29`|Programmable button 29|
|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| |`QK_PROGRAMMABLE_BUTTON_30`|`PB_30`|Programmable button 30|
|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| |`QK_PROGRAMMABLE_BUTTON_31`|`PB_31`|Programmable button 31|
|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| |`QK_PROGRAMMABLE_BUTTON_32`|`PB_32`|Programmable button 32|
|`PB_1` to `PB_32` |Aliases for keymaps |
## Space Cadet :id=space-cadet ## Space Cadet :id=space-cadet
See also: [Space Cadet](feature_space_cadet.md) See also: [Space Cadet](feature_space_cadet.md)
|Key |Description | |Key |Aliases |Description |
|-----------|----------------------------------------| |----------------------------------------------|---------|----------------------------------------|
|`KC_LCPO` |Left Control when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN` |`SC_LCPO`|Left Control when held, `(` when tapped |
|`KC_RCPC` |Right Control when held, `)` when tapped| |`QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE` |`SC_RCPC`|Right Control when held, `)` when tapped|
|`KC_LSPO` |Left Shift when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN` |`SC_LSPO`|Left Shift when held, `(` when tapped |
|`KC_RSPC` |Right Shift when held, `)` when tapped | |`QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE`|`SC_RSPC`|Right Shift when held, `)` when tapped |
|`KC_LAPO` |Left Alt when held, `(` when tapped | |`QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN` |`SC_LAPO`|Left Alt when held, `(` when tapped |
|`KC_RAPC` |Right Alt when held, `)` when tapped | |`QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE` |`SC_RAPC`|Right Alt when held, `)` when tapped |
|`KC_SFTENT`|Right Shift when held, Enter when tapped| |`QK_SPACE_CADET_RIGHT_SHIFT_ENTER` |`SC_SENT`|Right Shift when held, Enter when tapped|
## Swap Hands :id=swap-hands ## Swap Hands :id=swap-hands
@ -776,14 +835,15 @@ See also: [Swap Hands](feature_swap_hands.md)
See also: [Unicode Support](feature_unicode.md) See also: [Unicode Support](feature_unicode.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|----------------------|---------|----------------------------------------------------------------| |----------------------------|---------|----------------------------------------------------------------|
|`UC(c)` | |Send Unicode code point `c`, up to `0x7FFF` | |`UC(c)` | |Send Unicode code point `c`, up to `0x7FFF` |
|`X(i)` | |Send Unicode code point at index `i` in `unicode_map` | |`X(i)` | |Send Unicode code point at index `i` in `unicode_map` |
|`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on| |`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Cycle through selected input modes | |`QK_UNICODE_MODE_NEXT` |`UC_NEXT`|Cycle through selected input modes |
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Cycle through selected input modes in reverse | |`QK_UNICODE_MODE_PREVIOUS` |`UC_PREV`|Cycle through selected input modes in reverse |
|`UNICODE_MODE_MAC` |`UC_M_MA`|Switch to macOS input | |`QK_UNICODE_MODE_MACOS` |`UC_MAC` |Switch to macOS input |
|`UNICODE_MODE_LNX` |`UC_M_LN`|Switch to Linux input | |`QK_UNICODE_MODE_LINUX` |`UC_LINX`|Switch to Linux input |
|`UNICODE_MODE_WIN` |`UC_M_WI`|Switch to Windows input | |`QK_UNICODE_MODE_WINDOWS` |`UC_WIN` |Switch to Windows input |
|`UNICODE_MODE_BSD` |`UC_M_BS`|Switch to BSD input (not implemented) | |`QK_UNICODE_MODE_BSD` |`UC_BSD` |Switch to BSD input (not implemented) |
|`UNICODE_MODE_WINC` |`UC_M_WC`|Switch to Windows input using WinCompose | |`QK_UNICODE_MODE_WINCOMPOSE`|`UC_WINC`|Switch to Windows input using WinCompose |
|`QK_UNICODE_MODE_EMACS` |`UC_EMAC`|Switch to emacs (`C-x-8 RET`) |

View file

@ -221,6 +221,8 @@ These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` key
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track | |`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track |
|`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up | |`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down | |`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |
|`KC_CONTROL_PANEL` |`KC_CPNL`|Open Control Panel |
|`KC_ASSISTANT` |`KC_ASST`|Launch Assistant |
## Number Pad ## Number Pad

View file

@ -147,8 +147,8 @@ Here is an example of the Clueboard's base layer:
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_INT5, KC_SPC,KC_SPC, KC_INT4, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
Some interesting things to note about this: Some interesting things to note about this:

View file

@ -5,7 +5,8 @@ The following table shows the current driver status for peripherals on RP2040 MC
| System | Support | | System | Support |
| ---------------------------------------------------------------- | ---------------------------------------------- | | ---------------------------------------------------------------- | ---------------------------------------------- |
| [ADC driver](adc_driver.md) | Support planned (no ETA) | | [ADC driver](adc_driver.md) | Support planned (no ETA) |
| [Audio](audio_driver.md) | Support planned (no ETA) | | [Audio](audio_driver.md#pwm-hardware) | :heavy_check_mark: |
| [Backlight](feature_backlight.md) | :heavy_check_mark: |
| [I2C driver](i2c_driver.md) | :heavy_check_mark: | | [I2C driver](i2c_driver.md) | :heavy_check_mark: |
| [SPI driver](spi_driver.md) | :heavy_check_mark: | | [SPI driver](spi_driver.md) | :heavy_check_mark: |
| [WS2812 driver](ws2812_driver.md) | :heavy_check_mark: using `PIO` driver | | [WS2812 driver](ws2812_driver.md) | :heavy_check_mark: using `PIO` driver |

View file

@ -112,6 +112,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap - submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board - submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
- Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards) - Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards)
- Do not include KLE json files in the PR. These have no use within QMK.
- Do not include source files from another keyboard or vendors keyboard folder. Including core files is fine. - Do not include source files from another keyboard or vendors keyboard folder. Including core files is fine.
- For instance, only `wilba_tech` boards shall include `keyboards/wilba_tech/wt_main.c` and `keyboards/wilba_tech/wt_rgb_backlight.c`. But including `drivers/sensors/pmw3360.c` is absolutely fine for any and all boards. - For instance, only `wilba_tech` boards shall include `keyboards/wilba_tech/wt_main.c` and `keyboards/wilba_tech/wt_rgb_backlight.c`. But including `drivers/sensors/pmw3360.c` is absolutely fine for any and all boards.
- Code that needs to be used by multiple boards is a candidate for core code changes, and should be separated out. - Code that needs to be used by multiple boards is a candidate for core code changes, and should be separated out.

View file

@ -8,7 +8,7 @@ To enable overall Quantum Painter to be built into your firmware, add the follow
```make ```make
QUANTUM_PAINTER_ENABLE = yes QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = ...... QUANTUM_PAINTER_DRIVERS += ......
``` ```
You will also likely need to select an appropriate driver in `rules.mk`, which is listed below. You will also likely need to select an appropriate driver in `rules.mk`, which is listed below.
@ -17,17 +17,18 @@ You will also likely need to select an appropriate driver in `rules.mk`, which i
The QMK CLI can be used to convert from normal images such as PNG files or animated GIFs, as well as fonts from TTF files. The QMK CLI can be used to convert from normal images such as PNG files or animated GIFs, as well as fonts from TTF files.
Hardware supported: Supported devices:
| Display Panel | Panel Type | Size | Comms Transport | Driver | | Display Panel | Panel Type | Size | Comms Transport | Driver |
|---------------|--------------------|------------------|-----------------|-----------------------------------------| |----------------|--------------------|------------------|-----------------|---------------------------------------------|
| GC9A01 | RGB LCD (circular) | 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = gc9a01_spi` | | GC9A01 | RGB LCD (circular) | 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += gc9a01_spi` |
| ILI9163 | RGB LCD | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = ili9163_spi` | | ILI9163 | RGB LCD | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9163_spi` |
| ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = ili9341_spi` | | ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9341_spi` |
| ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = ili9488_spi` | | ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9488_spi` |
| SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = ssd1351_spi` | | SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ssd1351_spi` |
| ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = st7789_spi` | | ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7735_spi` |
| ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS = st7735_spi` | | ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7789_spi` |
| RGB565 Surface | Virtual | User-defined | None | `QUANTUM_PAINTER_DRIVERS += rgb565_surface` |
## Quantum Painter Configuration :id=quantum-painter-config ## Quantum Painter Configuration :id=quantum-painter-config
@ -45,17 +46,20 @@ Drivers have their own set of configurable options, and are described in their r
## Quantum Painter CLI Commands :id=quantum-painter-cli ## Quantum Painter CLI Commands :id=quantum-painter-cli
### `qmk painter-convert-graphics` <!-- tabs:start -->
### ** `qmk painter-convert-graphics` **
This command converts images to a format usable by QMK, i.e. the QGF File Format. This command converts images to a format usable by QMK, i.e. the QGF File Format.
**Usage**: **Usage**:
``` ```
usage: qmk painter-convert-graphics [-h] [-d] [-r] -f FORMAT [-o OUTPUT] -i INPUT [-v] usage: qmk painter-convert-graphics [-h] [-w] [-d] [-r] -f FORMAT [-o OUTPUT] -i INPUT [-v]
optional arguments: options:
-h, --help show this help message and exit -h, --help show this help message and exit
-w, --raw Writes out the QGF file as raw data instead of c/h combo.
-d, --no-deltas Disables the use of delta frames when encoding animations. -d, --no-deltas Disables the use of delta frames when encoding animations.
-r, --no-rle Disables the use of RLE when encoding images. -r, --no-rle Disables the use of RLE when encoding images.
-f FORMAT, --format FORMAT -f FORMAT, --format FORMAT
@ -93,7 +97,7 @@ Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/my_image.qgf.h...
Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/my_image.qgf.c... Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/my_image.qgf.c...
``` ```
### `qmk painter-make-font-image` ### ** `qmk painter-make-font-image` **
This command converts a TTF font to an intermediate format for editing, before converting to the QFF File Format. This command converts a TTF font to an intermediate format for editing, before converting to the QFF File Format.
@ -126,7 +130,7 @@ The `UNICODE_GLYPHS` argument allows for specifying extra unicode glyphs to gene
$ qmk painter-make-font-image --font NotoSans-ExtraCondensedBold.ttf --size 11 -o noto11.png --unicode-glyphs "ĄȽɂɻɣɈʣ" $ qmk painter-make-font-image --font NotoSans-ExtraCondensedBold.ttf --size 11 -o noto11.png --unicode-glyphs "ĄȽɂɻɣɈʣ"
``` ```
### `qmk painter-convert-font-image` ### ** `qmk painter-convert-font-image` **
This command converts an intermediate font image to the QFF File Format. This command converts an intermediate font image to the QFF File Format.
@ -143,10 +147,11 @@ This command expects an image that conforms to the following format:
**Usage**: **Usage**:
``` ```
usage: qmk painter-convert-font-image [-h] [-r] -f FORMAT [-u UNICODE_GLYPHS] [-n] [-o OUTPUT] [-i INPUT] usage: qmk painter-convert-font-image [-h] [-w] [-r] -f FORMAT [-u UNICODE_GLYPHS] [-n] [-o OUTPUT] [-i INPUT]
optional arguments: options:
-h, --help show this help message and exit -h, --help show this help message and exit
-w, --raw Writes out the QFF file as raw data instead of c/h combo.
-r, --no-rle Disable the use of RLE to minimise converted image size. -r, --no-rle Disable the use of RLE to minimise converted image size.
-f FORMAT, --format FORMAT -f FORMAT, --format FORMAT
Output format, valid types: pal256, pal16, pal4, pal2, mono256, mono16, mono4, mono2 Output format, valid types: pal256, pal16, pal4, pal2, mono256, mono16, mono4, mono2
@ -170,6 +175,255 @@ Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/noto11.qff.h...
Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/noto11.qff.c... Writing /home/qmk/qmk_firmware/keyboards/my_keeb/generated/noto11.qff.c...
``` ```
<!-- tabs:end -->
## Quantum Painter Display Drivers :id=quantum-painter-drivers
<!-- tabs:start -->
### ** Common: Standard TFT (SPI + D/C + RST) **
Most TFT display panels use a 5-pin interface -- SPI SCK, SPI MOSI, SPI CS, D/C, and RST pins.
For these displays, QMK's `spi_master` must already be correctly configured for the platform you're building for.
The pin assignments for SPI CS, D/C, and RST are specified during device construction.
<!-- tabs:start -->
#### ** GC9A01 **
Enabling support for the GC9A01 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += gc9a01_spi
```
Creating a GC9A01 device in firmware can then be done with the following API:
```c
painter_device_t qp_gc9a01_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_gc9a01_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define GC9A01_NUM_DEVICES 3
```
#### ** ILI9163 **
Enabling support for the ILI9163 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += ili9163_spi
```
Creating a ILI9163 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9163_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9163_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9163_NUM_DEVICES 3
```
#### ** ILI9341 **
Enabling support for the ILI9341 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += ili9341_spi
```
Creating a ILI9341 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9341_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9341_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9341_NUM_DEVICES 3
```
#### ** ILI9488 **
Enabling support for the ILI9488 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += ili9488_spi
```
Creating a ILI9488 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9488_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9488_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9488_NUM_DEVICES 3
```
#### ** SSD1351 **
Enabling support for the SSD1351 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += ssd1351_spi
```
Creating a SSD1351 device in firmware can then be done with the following API:
```c
painter_device_t qp_ssd1351_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ssd1351_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define SSD1351_NUM_DEVICES 3
```
#### ** ST7735 **
Enabling support for the ST7735 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += st7735_spi
```
Creating a ST7735 device in firmware can then be done with the following API:
```c
painter_device_t qp_st7735_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_st7735_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ST7735_NUM_DEVICES 3
```
!> Some ST7735 devices are known to have different drawing offsets -- despite being a 132x162 pixel display controller internally, some display panels are only 80x160, or smaller. These may require an offset to be applied; see `qp_set_viewport_offsets` above for information on how to override the offsets if they aren't correctly rendered.
#### ** ST7789 **
Enabling support for the ST7789 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += st7789_spi
```
Creating a ST7789 device in firmware can then be done with the following API:
```c
painter_device_t qp_st7789_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_st7789_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ST7789_NUM_DEVICES 3
```
!> Some ST7789 devices are known to have different drawing offsets -- despite being a 240x320 pixel display controller internally, some display panels are only 240x240, or smaller. These may require an offset to be applied; see `qp_set_viewport_offsets` above for information on how to override the offsets if they aren't correctly rendered.
<!-- tabs:end -->
### ** Common: Surfaces **
Quantum Painter has surface drivers which are able to target a buffer in RAM. In general, surfaces keep track of the "dirty" region -- the area that has been drawn to since the last flush -- so that when transferring to the display they can transfer the minimal amount of data to achieve the end result.
!> These generally require significant amounts of RAM, so at large sizes and/or higher bit depths, they may not be usable on all MCUs.
<!-- tabs:start -->
#### ** RGB565 Surface **
Enabling support for RGB565 surfaces in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += rgb565_surface
```
Creating a RGB565 surface in firmware can then be done with the following API:
```c
painter_device_t qp_rgb565_make_surface(uint16_t panel_width, uint16_t panel_height, void *buffer);
```
The `buffer` is a user-supplied area of memory, and is assumed to be of the size `sizeof(uint16_t) * panel_width * panel_height`.
The device handle returned from the `qp_rgb565_make_surface` function can be used to perform all other drawing operations.
Example:
```c
static painter_device_t my_surface;
static uint16_t my_framebuffer[320 * 240]; // Allocate a buffer for a 320x240 RGB565 display
void keyboard_post_init_kb(void) {
my_surface = qp_rgb565_make_surface(320, 240, my_framebuffer);
qp_init(my_surface, QP_ROTATION_0);
}
```
The maximum number of RGB565 surfaces can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 surfaces:
#define RGB565_SURFACE_NUM_DEVICES 3
```
To transfer the contents of the RGB565 surface to another display, the following API can be invoked:
```c
bool qp_rgb565_surface_draw(painter_device_t surface, painter_device_t display, uint16_t x, uint16_t y);
```
The `surface` is the surface to copy out from. The `display` is the target display to draw into. `x` and `y` are the target location to draw the surface pixel data. Under normal circumstances, the location should be consistent, as the dirty region is calculated with respect to the `x` and `y` coordinates -- changing those will result in partial, overlapping draws.
?> Calling `qp_flush()` on the surface resets its dirty region. Copying the surface contents to the display also automatically resets the dirty region.
<!-- tabs:end -->
<!-- tabs:end -->
## Quantum Painter Drawing API :id=quantum-painter-api ## Quantum Painter Drawing API :id=quantum-painter-api
All APIs require a `painter_device_t` object as their first parameter -- this object comes from the specific device initialisation, and instructions on creating it can be found in each driver's respective section. All APIs require a `painter_device_t` object as their first parameter -- this object comes from the specific device initialisation, and instructions on creating it can be found in each driver's respective section.
@ -179,7 +433,9 @@ To use any of the APIs, you need to include `qp.h`:
#include <qp.h> #include <qp.h>
``` ```
### General Notes :id=quantum-painter-api-general <!-- tabs:start -->
### ** General Notes **
The coordinate system used in Quantum Painter generally accepts `left`, `top`, `right`, and `bottom` instead of x/y/width/height, and each coordinate is inclusive of where pixels should be drawn. This is required as some datatypes used by display panels have a maximum value of `255` -- for any value or geometry extent that matches `256`, this would be represented as a `0`, instead. The coordinate system used in Quantum Painter generally accepts `left`, `top`, `right`, and `bottom` instead of x/y/width/height, and each coordinate is inclusive of where pixels should be drawn. This is required as some datatypes used by display panels have a maximum value of `255` -- for any value or geometry extent that matches `256`, this would be represented as a `0`, instead.
@ -193,9 +449,11 @@ All color data matches the standard QMK HSV triplet definitions:
?> Colors used in Quantum Painter are not subject to the RGB lighting CIE curve, if it is enabled. ?> Colors used in Quantum Painter are not subject to the RGB lighting CIE curve, if it is enabled.
### Device Control :id=quantum-painter-api-device-control ### ** Device Control **
#### Display Initialisation :id=quantum-painter-api-init <!-- tabs:start -->
#### ** Display Initialisation **
```c ```c
bool qp_init(painter_device_t device, painter_rotation_t rotation); bool qp_init(painter_device_t device, painter_rotation_t rotation);
@ -211,7 +469,7 @@ void keyboard_post_init_kb(void) {
} }
``` ```
#### Display Power :id=quantum-painter-api-power #### ** Display Power **
```c ```c
bool qp_power(painter_device_t device, bool power_on); bool qp_power(painter_device_t device, bool power_on);
@ -242,7 +500,7 @@ void suspend_wakeup_init_user(void) {
} }
``` ```
#### Display Clear :id=quantum-painter-api-clear #### ** Display Clear **
```c ```c
bool qp_clear(painter_device_t device); bool qp_clear(painter_device_t device);
@ -250,7 +508,7 @@ bool qp_clear(painter_device_t device);
The `qp_clear` function clears the display's screen. The `qp_clear` function clears the display's screen.
#### Display Flush :id=quantum-painter-api-flush #### ** Display Flush **
```c ```c
bool qp_flush(painter_device_t device); bool qp_flush(painter_device_t device);
@ -272,9 +530,13 @@ void housekeeping_task_user(void) {
} }
``` ```
### Drawing Primitives :id=quantum-painter-api-primitives <!-- tabs:end -->
#### Set Pixel :id=quantum-painter-api-setpixel ### ** Drawing Primitives **
<!-- tabs:start -->
#### ** Set Pixel **
```c ```c
bool qp_setpixel(painter_device_t device, uint16_t x, uint16_t y, uint8_t hue, uint8_t sat, uint8_t val); bool qp_setpixel(painter_device_t device, uint16_t x, uint16_t y, uint8_t hue, uint8_t sat, uint8_t val);
@ -298,7 +560,7 @@ void housekeeping_task_user(void) {
} }
``` ```
#### Draw Line :id=quantum-painter-api-line #### ** Draw Line **
```c ```c
bool qp_line(painter_device_t device, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t hue, uint8_t sat, uint8_t val); bool qp_line(painter_device_t device, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t hue, uint8_t sat, uint8_t val);
@ -320,7 +582,7 @@ void housekeeping_task_user(void) {
} }
``` ```
#### Draw Rect :id=quantum-painter-api-rect #### ** Draw Rect **
```c ```c
bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint8_t hue, uint8_t sat, uint8_t val, bool filled); bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
@ -342,7 +604,7 @@ void housekeeping_task_user(void) {
} }
``` ```
#### Draw Circle :id=quantum-painter-api-circle #### ** Draw Circle **
```c ```c
bool qp_circle(painter_device_t device, uint16_t x, uint16_t y, uint16_t radius, uint8_t hue, uint8_t sat, uint8_t val, bool filled); bool qp_circle(painter_device_t device, uint16_t x, uint16_t y, uint16_t radius, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
@ -364,7 +626,7 @@ void housekeeping_task_user(void) {
} }
``` ```
#### Draw Ellipse :id=quantum-painter-api-ellipse #### ** Draw Ellipse **
```c ```c
bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, uint16_t sizey, uint8_t hue, uint8_t sat, uint8_t val, bool filled); bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, uint16_t sizey, uint8_t hue, uint8_t sat, uint8_t val, bool filled);
@ -386,9 +648,24 @@ void housekeeping_task_user(void) {
} }
``` ```
### Image Functions :id=quantum-painter-api-images <!-- tabs:end -->
#### Load Image :id=quantum-painter-api-load-image ### ** Image Functions **
Making an image available for use requires compiling it into your firmware. To do so, assuming you've created `my_image.qgf.c` and `my_image.qgf.h` as per the CLI examples above, you'd add the following to your `rules.mk`:
```make
SRC += my_image.qgf.c
```
...and in your `keymap.c`, you'd add to the top of the file:
```c
#include "my_image.qgf.h"
```
<!-- tabs:start -->
#### ** Load Image **
```c ```c
painter_image_handle_t qp_load_image_mem(const void *buffer); painter_image_handle_t qp_load_image_mem(const void *buffer);
@ -410,7 +687,7 @@ Image information is available through accessing the handle:
| Height | `image->height` | | Height | `image->height` |
| Frame Count | `image->frame_count` | | Frame Count | `image->frame_count` |
#### Unload Image :id=quantum-painter-api-close-image #### ** Unload Image **
```c ```c
bool qp_close_image(painter_image_handle_t image); bool qp_close_image(painter_image_handle_t image);
@ -418,7 +695,7 @@ bool qp_close_image(painter_image_handle_t image);
The `qp_close_image` function releases resources related to the loading of the supplied image. The `qp_close_image` function releases resources related to the loading of the supplied image.
#### Draw image :id=quantum-painter-api-draw-image #### ** Draw image **
```c ```c
bool qp_drawimage(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image); bool qp_drawimage(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image);
@ -438,7 +715,7 @@ void keyboard_post_init_kb(void) {
} }
``` ```
#### Animate Image :id=quantum-painter-api-animate-image #### ** Animate Image **
```c ```c
deferred_token qp_animate(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image); deferred_token qp_animate(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image);
@ -463,7 +740,7 @@ void keyboard_post_init_kb(void) {
} }
``` ```
#### Stop Animation :id=quantum-painter-api-stop-animation #### ** Stop Animation **
```c ```c
void qp_stop_animation(deferred_token anim_token); void qp_stop_animation(deferred_token anim_token);
@ -478,9 +755,24 @@ void housekeeping_task_user(void) {
} }
``` ```
### Font Functions :id=quantum-painter-api-fonts <!-- tabs:end -->
#### Load Font :id=quantum-painter-api-load-font ### ** Font Functions **
Making a font available for use requires compiling it into your firmware. To do so, assuming you've created `my_font.qff.c` and `my_font.qff.h` as per the CLI examples above, you'd add the following to your `rules.mk`:
```make
SRC += noto11.qff.c
```
...and in your `keymap.c`, you'd add to the top of the file:
```c
#include "noto11.qff.h"
```
<!-- tabs: start -->
#### ** Load Font **
```c ```c
painter_font_handle_t qp_load_font_mem(const void *buffer); painter_font_handle_t qp_load_font_mem(const void *buffer);
@ -500,7 +792,7 @@ Font information is available through accessing the handle:
|-------------|----------------------| |-------------|----------------------|
| Line Height | `image->line_height` | | Line Height | `image->line_height` |
#### Unload Font :id=quantum-painter-api-close-font #### ** Unload Font **
```c ```c
bool qp_close_font(painter_font_handle_t font); bool qp_close_font(painter_font_handle_t font);
@ -508,7 +800,7 @@ bool qp_close_font(painter_font_handle_t font);
The `qp_close_font` function releases resources related to the loading of the supplied font. The `qp_close_font` function releases resources related to the loading of the supplied font.
#### Measure Text :id=quantum-painter-api-textwidth #### ** Measure Text **
```c ```c
int16_t qp_textwidth(painter_font_handle_t font, const char *str); int16_t qp_textwidth(painter_font_handle_t font, const char *str);
@ -516,7 +808,7 @@ int16_t qp_textwidth(painter_font_handle_t font, const char *str);
The `qp_textwidth` function allows measurement of how many pixels wide the supplied string would result in, for the given font. The `qp_textwidth` function allows measurement of how many pixels wide the supplied string would result in, for the given font.
#### Draw Text :id=quantum-painter-api-drawtext #### ** Draw Text **
```c ```c
int16_t qp_drawtext(painter_device_t device, uint16_t x, uint16_t y, painter_font_handle_t font, const char *str); int16_t qp_drawtext(painter_device_t device, uint16_t x, uint16_t y, painter_font_handle_t font, const char *str);
@ -529,7 +821,7 @@ The `qp_drawtext` and `qp_drawtext_recolor` functions draw the supplied string t
// Draw a text message on the bottom-right of the 240x320 display on initialisation // Draw a text message on the bottom-right of the 240x320 display on initialisation
static painter_font_handle_t my_font; static painter_font_handle_t my_font;
void keyboard_post_init_kb(void) { void keyboard_post_init_kb(void) {
my_font = qp_load_font_mem(font_opensans); my_font = qp_load_font_mem(font_noto11);
if (my_font != NULL) { if (my_font != NULL) {
static const char *text = "Hello from QMK!"; static const char *text = "Hello from QMK!";
int16_t width = qp_textwidth(my_font, text); int16_t width = qp_textwidth(my_font, text);
@ -538,9 +830,13 @@ void keyboard_post_init_kb(void) {
} }
``` ```
### Advanced Functions :id=quantum-painter-api-advanced <!-- tabs:end -->
#### Get Geometry :id=quantum-painter-api-get-geometry ### ** Advanced Functions **
<!-- tabs:start -->
#### ** Get Geometry **
```c ```c
void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y); void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y);
@ -548,7 +844,7 @@ void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height,
The `qp_get_geometry` function allows external code to retrieve the current width, height, rotation, and drawing offsets. The `qp_get_geometry` function allows external code to retrieve the current width, height, rotation, and drawing offsets.
#### Set Viewport Offsets :id=quantum-painter-api-set-viewport #### ** Set Viewport Offsets **
```c ```c
void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_t offset_y); void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_t offset_y);
@ -556,7 +852,7 @@ void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_
The `qp_set_viewport_offsets` function can be used to offset all subsequent drawing operations. For example, if a display controller is internally 240x320, but the display panel is 240x240 and has a Y offset of 80 pixels, you could invoke `qp_set_viewport_offsets(display, 0, 80);` and the drawing positioning would be corrected. The `qp_set_viewport_offsets` function can be used to offset all subsequent drawing operations. For example, if a display controller is internally 240x320, but the display panel is 240x240 and has a Y offset of 80 pixels, you could invoke `qp_set_viewport_offsets(display, 0, 80);` and the drawing positioning would be corrected.
#### Set Viewport :id=quantum-painter-api-viewport #### ** Set Viewport **
```c ```c
bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom); bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom);
@ -564,7 +860,7 @@ bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t
The `qp_viewport` function controls where raw pixel data is written to. The `qp_viewport` function controls where raw pixel data is written to.
#### Stream Pixel Data :id=quantum-painter-api-pixdata #### ** Stream Pixel Data **
```c ```c
bool qp_pixdata(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count); bool qp_pixdata(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count);
@ -574,184 +870,6 @@ The `qp_pixdata` function allows raw pixel data to be streamed to the display. I
!> Under normal circumstances, users will not need to manually call either `qp_viewport` or `qp_pixdata`. These allow for writing of raw pixel information, in the display panel's native format, to the area defined by the viewport. !> Under normal circumstances, users will not need to manually call either `qp_viewport` or `qp_pixdata`. These allow for writing of raw pixel information, in the display panel's native format, to the area defined by the viewport.
## Quantum Painter Display Drivers :id=quantum-painter-drivers <!-- tabs:end -->
### Common: Standard TFT (SPI + D/C + RST) <!-- tabs:end -->
Most TFT display panels use a 5-pin interface -- SPI SCK, SPI MOSI, SPI CS, D/C, and RST pins.
For these displays, QMK's `spi_master` must already be correctly configured for the platform you're building for.
The pin assignments for SPI CS, D/C, and RST are specified during device construction.
### GC9A01 :id=qp-driver-gc9a01
Enabling support for the GC9A01 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = gc9a01_spi
```
Creating a GC9A01 device in firmware can then be done with the following API:
```c
painter_device_t qp_gc9a01_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_gc9a01_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define GC9A01_NUM_DEVICES 3
```
### ILI9163 :id=qp-driver-ili9163
Enabling support for the ILI9163 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = ili9163_spi
```
Creating a ILI9163 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9163_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9163_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9163_NUM_DEVICES 3
```
### ILI9341 :id=qp-driver-ili9341
Enabling support for the ILI9341 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = ili9341_spi
```
Creating a ILI9341 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9341_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9341_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9341_NUM_DEVICES 3
```
### ILI9488 :id=qp-driver-ili9488
Enabling support for the ILI9488 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = ili9488_spi
```
Creating a ILI9488 device in firmware can then be done with the following API:
```c
painter_device_t qp_ili9488_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ili9488_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ILI9488_NUM_DEVICES 3
```
### SSD1351 :id=qp-driver-ssd1351
Enabling support for the SSD1351 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = ssd1351_spi
```
Creating a SSD1351 device in firmware can then be done with the following API:
```c
painter_device_t qp_ssd1351_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_ssd1351_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define SSD1351_NUM_DEVICES 3
```
### ST7789 :id=qp-driver-st7789
Enabling support for the ST7789 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = st7789_spi
```
Creating a ST7789 device in firmware can then be done with the following API:
```c
painter_device_t qp_st7789_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_st7789_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ST7789_NUM_DEVICES 3
```
!> Some ST7789 devices are known to have different drawing offsets -- despite being a 240x320 pixel display controller internally, some display panels are only 240x240, or smaller. These may require an offset to be applied; see `qp_set_viewport_offsets` above for information on how to override the offsets if they aren't correctly rendered.
### ST7735 :id=qp-driver-st7735
Enabling support for the ST7735 in Quantum Painter is done by adding the following to `rules.mk`:
```make
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS = st7735_spi
```
Creating a ST7735 device in firmware can then be done with the following API:
```c
painter_device_t qp_st7735_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
```
The device handle returned from the `qp_st7735_make_spi_device` function can be used to perform all other drawing operations.
The maximum number of displays can be configured by changing the following in your `config.h` (default is 1):
```c
// 3 displays:
#define ST7735_NUM_DEVICES 3
```
!> Some ST7735 devices are known to have different drawing offsets -- despite being a 132x162 pixel display controller internally, some display panels are only 80x160, or smaller. These may require an offset to be applied; see `qp_set_viewport_offsets` above for information on how to override the offsets if they aren't correctly rendered.

View file

@ -97,7 +97,7 @@ To reset to the bootloader use `QK_BOOTLOADER` or `QK_BOOT` keycode or `reset_ke
## Wiping the EEPROM (Persistent Storage) ## Wiping the EEPROM (Persistent Storage)
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EEP_RST` keycode](quantum_keycodes.md) or [Bootmagic Lite](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so. If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EE_CLR` keycode](quantum_keycodes.md) or [Bootmagic Lite](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so.
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default. To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.

View file

@ -132,8 +132,15 @@ Enable by setting
* The length of one backlight “breath” in seconds * The length of one backlight “breath” in seconds
* `levels` * `levels`
* The number of brightness levels (maximum 31, excluding off) * The number of brightness levels (maximum 31, excluding off)
* `max_brightness`
* The maximum duty cycle of the backlight LED(s) (0-255)
* `pin` * `pin`
* The pin that controls the backlight LED(s) * The pin that controls the backlight LED(s)
* `pins`
* Array of pins that controls the backlight LED(s) (See [Multiple Backlight Pins](feature_backlight.md#multiple-backlight-pins))
* `on_state`
* The state of the indicator pins when the LED is "on" - `1` for high, `0` for low
* Default: `1`
Example: Example:

View file

@ -192,6 +192,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
* [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) * [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040)
* [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) * [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288)
* [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) * [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622)
* [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040)
There are other, non-Pro Micro compatible boards out there. The most popular being: There are other, non-Pro Micro compatible boards out there. The most popular being:
* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD) * [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD)

View file

@ -42,11 +42,11 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly. `DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly.
| Key | Description | | Key | Aliases | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------|-------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | |`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board. Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board.

View file

@ -159,7 +159,6 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_unicodemap.c#L42) * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_unicodemap.c#L42)
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_ucis.c#L70) * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_ucis.c#L70)
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_leader.c#L48) * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_leader.c#L48)
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_printer.c#L77)
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_auto_shift.c#L353) * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_auto_shift.c#L353)
* [`bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_dynamic_tapping_term.c#L35) * [`bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_dynamic_tapping_term.c#L35)
* [`bool process_space_cadet(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_space_cadet.c#L123) * [`bool process_space_cadet(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_space_cadet.c#L123)

View file

@ -175,7 +175,7 @@ Configure the hardware via your config.h:
#define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral #define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral
``` ```
The WS2812 PIO programm uses 1 state machine, 4 instructions and does not use any interrupt handlers. The WS2812 PIO programm uses 1 state machine, 6 instructions and one DMA interrupt handler callback. Due to the implementation the time resolution for this drivers is 50ns, any value not specified in this interval will be rounded to the next matching interval.
### Push Pull and Open Drain Configuration ### Push Pull and Open Drain Configuration
The default configuration is a push pull on the defined pin. The default configuration is a push pull on the defined pin.

View file

@ -127,26 +127,26 @@ enum layer_names {
```c ```c
enum custom_keycodes { enum custom_keycodes {
MACRO_1 = SAFE_RANGE, CUSTOM_1 = SAFE_RANGE,
MACRO_2, CUSTOM_2,
MACRO_3 CUSTOM_3
}; };
... ...
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case MACRO_1: case CUSTOM_1:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #1."); SEND_STRING("This is custom keycode #1.");
} }
return false; return false;
case MACRO_2: case CUSTOM_2:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #2."); SEND_STRING("This is custom keycode #2.");
} }
return false; return false;
case MACRO_3: case CUSTOM_3:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #3."); SEND_STRING("This is custom keycode #3.");
} }
return false; return false;
} }
@ -158,9 +158,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
```c ```c
enum keyboard_keycodes { enum keyboard_keycodes {
MACRO_1 = SAFE_RANGE, CUSTOM_1 = SAFE_RANGE,
MACRO_2, CUSTOM_2,
MACRO_3, CUSTOM_3,
NEW_SAFE_RANGE // 重要! NEW_SAFE_RANGE // 重要!
}; };
``` ```
@ -170,19 +170,19 @@ enum keyboard_keycodes {
```c ```c
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case MACRO_1: case CUSTOM_1:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #1."); SEND_STRING("This is custom keycode #1.");
} }
return false; return false;
case MACRO_2: case CUSTOM_2:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #2."); SEND_STRING("This is custom keycode #2.");
} }
return false; return false;
case MACRO_3: case CUSTOM_3:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("This is macro #3."); SEND_STRING("This is custom keycode #3.");
} }
return false; return false;
} }

View file

@ -5,7 +5,7 @@
#include <alloca.h> #include <alloca.h>
#include "debug.h" #include "debug.h"
#include "timer.h" #include "timer.h"
#include "action_util.h" #include "gpio.h"
#include "ringbuffer.hpp" #include "ringbuffer.hpp"
#include <string.h> #include <string.h>
#include "spi_master.h" #include "spi_master.h"
@ -79,9 +79,7 @@ struct sdep_msg {
enum queue_type { enum queue_type {
QTKeyReport, // 1-byte modifier + 6-byte key report QTKeyReport, // 1-byte modifier + 6-byte key report
QTConsumer, // 16-bit key code QTConsumer, // 16-bit key code
#ifdef MOUSE_ENABLE
QTMouseMove, // 4-byte mouse report QTMouseMove, // 4-byte mouse report
#endif
}; };
struct queue_item { struct queue_item {
@ -290,7 +288,7 @@ static void resp_buf_wait(const char *cmd) {
} }
} }
static bool ble_init(void) { void bluefruit_le_init(void) {
state.initialized = false; state.initialized = false;
state.configured = false; state.configured = false;
state.is_connected = false; state.is_connected = false;
@ -309,7 +307,6 @@ static bool ble_init(void) {
wait_ms(1000); // Give it a second to initialize wait_ms(1000); // Give it a second to initialize
state.initialized = true; state.initialized = true;
return state.initialized;
} }
static inline uint8_t min(uint8_t a, uint8_t b) { static inline uint8_t min(uint8_t a, uint8_t b) {
@ -433,7 +430,7 @@ bool bluefruit_le_is_connected(void) {
bool bluefruit_le_enable_keyboard(void) { bool bluefruit_le_enable_keyboard(void) {
char resbuf[128]; char resbuf[128];
if (!state.initialized && !ble_init()) { if (!state.initialized) {
return false; return false;
} }
@ -442,7 +439,7 @@ bool bluefruit_le_enable_keyboard(void) {
// Disable command echo // Disable command echo
static const char kEcho[] PROGMEM = "ATE=0"; static const char kEcho[] PROGMEM = "ATE=0";
// Make the advertised name match the keyboard // Make the advertised name match the keyboard
static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT); static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" PRODUCT;
// Turn on keyboard support // Turn on keyboard support
static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1"; static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1";
@ -581,10 +578,12 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->key.modifier, item->key.keys[0], item->key.keys[1], item->key.keys[2], item->key.keys[3], item->key.keys[4], item->key.keys[5]); snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->key.modifier, item->key.keys[0], item->key.keys[1], item->key.keys[2], item->key.keys[3], item->key.keys[4], item->key.keys[5]);
return at_command(cmdbuf, NULL, 0, true, timeout); return at_command(cmdbuf, NULL, 0, true, timeout);
#ifdef EXTRAKEY_ENABLE
case QTConsumer: case QTConsumer:
strcpy_P(fmtbuf, PSTR("AT+BLEHIDCONTROLKEY=0x%04x")); strcpy_P(fmtbuf, PSTR("AT+BLEHIDCONTROLKEY=0x%04x"));
snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->consumer); snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->consumer);
return at_command(cmdbuf, NULL, 0, true, timeout); return at_command(cmdbuf, NULL, 0, true, timeout);
#endif
#ifdef MOUSE_ENABLE #ifdef MOUSE_ENABLE
case QTMouseMove: case QTMouseMove:
@ -613,41 +612,24 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
} }
} }
void bluefruit_le_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uint8_t nkeys) { void bluefruit_le_send_keyboard(report_keyboard_t *report) {
struct queue_item item; struct queue_item item;
bool didWait = false;
item.queue_type = QTKeyReport; item.queue_type = QTKeyReport;
item.key.modifier = hid_modifier_mask; item.key.modifier = report->mods;
item.added = timer_read(); item.key.keys[0] = report->keys[0];
item.key.keys[1] = report->keys[1];
item.key.keys[2] = report->keys[2];
item.key.keys[3] = report->keys[3];
item.key.keys[4] = report->keys[4];
item.key.keys[5] = report->keys[5];
while (nkeys >= 0) { while (!send_buf.enqueue(item)) {
item.key.keys[0] = keys[0];
item.key.keys[1] = nkeys >= 1 ? keys[1] : 0;
item.key.keys[2] = nkeys >= 2 ? keys[2] : 0;
item.key.keys[3] = nkeys >= 3 ? keys[3] : 0;
item.key.keys[4] = nkeys >= 4 ? keys[4] : 0;
item.key.keys[5] = nkeys >= 5 ? keys[5] : 0;
if (!send_buf.enqueue(item)) {
if (!didWait) {
dprint("wait for buf space\n");
didWait = true;
}
send_buf_send_one(); send_buf_send_one();
continue;
}
if (nkeys <= 6) {
return;
}
nkeys -= 6;
keys += 6;
} }
} }
void bluefruit_le_send_consumer_key(uint16_t usage) { void bluefruit_le_send_consumer(uint16_t usage) {
struct queue_item item; struct queue_item item;
item.queue_type = QTConsumer; item.queue_type = QTConsumer;
@ -658,22 +640,20 @@ void bluefruit_le_send_consumer_key(uint16_t usage) {
} }
} }
#ifdef MOUSE_ENABLE void bluefruit_le_send_mouse(report_mouse_t *report) {
void bluefruit_le_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons) {
struct queue_item item; struct queue_item item;
item.queue_type = QTMouseMove; item.queue_type = QTMouseMove;
item.mousemove.x = x; item.mousemove.x = report->x;
item.mousemove.y = y; item.mousemove.y = report->y;
item.mousemove.scroll = scroll; item.mousemove.scroll = report->v;
item.mousemove.pan = pan; item.mousemove.pan = report->h;
item.mousemove.buttons = buttons; item.mousemove.buttons = report->buttons;
while (!send_buf.enqueue(item)) { while (!send_buf.enqueue(item)) {
send_buf_send_one(); send_buf_send_one();
} }
} }
#endif
uint32_t bluefruit_le_read_battery_voltage(void) { uint32_t bluefruit_le_read_battery_voltage(void) {
return state.vbat; return state.vbat;

View file

@ -7,9 +7,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include "report.h"
#include "config_common.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -26,6 +24,8 @@ extern bool bluefruit_le_query_is_connected(void);
* calling ble_task() periodically. */ * calling ble_task() periodically. */
extern bool bluefruit_le_is_connected(void); extern bool bluefruit_le_is_connected(void);
extern void bluefruit_le_init(void);
/* Call this periodically to process BLE-originated things */ /* Call this periodically to process BLE-originated things */
extern void bluefruit_le_task(void); extern void bluefruit_le_task(void);
@ -34,18 +34,16 @@ extern void bluefruit_le_task(void);
* this set of keys. * this set of keys.
* Also sends a key release indicator, so that the keys do not remain * Also sends a key release indicator, so that the keys do not remain
* held down. */ * held down. */
extern void bluefruit_le_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uint8_t nkeys); extern void bluefruit_le_send_keyboard(report_keyboard_t *report);
/* Send a consumer usage. /* Send a consumer usage.
* (milliseconds) */ * (milliseconds) */
extern void bluefruit_le_send_consumer_key(uint16_t usage); extern void bluefruit_le_send_consumer(uint16_t usage);
#ifdef MOUSE_ENABLE
/* Send a mouse/wheel movement report. /* Send a mouse/wheel movement report.
* The parameters are signed and indicate positive or negative direction * The parameters are signed and indicate positive or negative direction
* change. */ * change. */
extern void bluefruit_le_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); extern void bluefruit_le_send_mouse(report_mouse_t *report);
#endif
/* Compute battery voltage by reading an analog pin. /* Compute battery voltage by reading an analog pin.
* Returns the integer number of millivolts */ * Returns the integer number of millivolts */

View file

@ -0,0 +1,62 @@
/*
* Copyright 2022
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bluetooth.h"
#if defined(BLUETOOTH_BLUEFRUIT_LE)
# include "bluefruit_le.h"
#elif defined(BLUETOOTH_RN42)
# include "rn42.h"
#endif
void bluetooth_init(void) {
#if defined(BLUETOOTH_BLUEFRUIT_LE)
bluefruit_le_init();
#elif defined(BLUETOOTH_RN42)
rn42_init();
#endif
}
void bluetooth_task(void) {
#if defined(BLUETOOTH_BLUEFRUIT_LE)
bluefruit_le_task();
#endif
}
void bluetooth_send_keyboard(report_keyboard_t *report) {
#if defined(BLUETOOTH_BLUEFRUIT_LE)
bluefruit_le_send_keyboard(report);
#elif defined(BLUETOOTH_RN42)
rn42_send_keyboard(report);
#endif
}
void bluetooth_send_mouse(report_mouse_t *report) {
#if defined(BLUETOOTH_BLUEFRUIT_LE)
bluefruit_le_send_mouse(report);
#elif defined(BLUETOOTH_RN42)
rn42_send_mouse(report);
#endif
}
void bluetooth_send_consumer(uint16_t usage) {
#if defined(BLUETOOTH_BLUEFRUIT_LE)
bluefruit_le_send_consumer(usage);
#elif defined(BLUETOOTH_RN42)
rn42_send_consumer(usage);
#endif
}

View file

@ -1,4 +1,5 @@
/* Copyright 2017 Christopher Browne /*
* Copyright 2022
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,28 +17,36 @@
#pragma once #pragma once
#ifndef NO_DEBUG #include <stdint.h>
#define NO_DEBUG #include "report.h"
#endif
#ifndef NO_PRINT
#define NO_PRINT
#endif
#include "../../config.h" /**
* \brief Initialize the Bluetooth system.
*/
void bluetooth_init(void);
#define LEADER_TIMEOUT 300 /**
* \brief Perform housekeeping tasks.
*/
void bluetooth_task(void);
#ifndef KEYBOARD_planck_light /**
#define BACKLIGHT_BREATHING * \brief Send a keyboard report.
#endif *
* \param report The keyboard report to send.
*/
void bluetooth_send_keyboard(report_keyboard_t *report);
/* cbbrowne user configuration */ /**
* \brief Send a mouse report.
*
* \param report The mouse report to send.
*/
void bluetooth_send_mouse(report_mouse_t *report);
#define randadd 53 /**
#define randmul 181 * \brief Send a consumer usage.
#define randmod 167 *
* \param usage The consumer usage to send.
/* Filler to make layering a bit clearer * */
* borrowed from basic keymap */ void bluetooth_send_consumer(uint16_t usage);
#define _____ KC_NO

View file

@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "rn42.h"
#include "report.h" #include "report.h"
#include "uart.h" #include "uart.h"
@ -69,33 +71,35 @@ void rn42_send_keyboard(report_keyboard_t *report) {
uart_write(0xFD); uart_write(0xFD);
uart_write(0x09); uart_write(0x09);
uart_write(0x01); uart_write(0x01);
uart_write(report->mods); uart_write(report->mods);
uart_write(0x00); uart_write(0x00);
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { uart_write(report->keys[0]);
uart_write(report->keys[i]); uart_write(report->keys[1]);
} uart_write(report->keys[2]);
uart_write(report->keys[3]);
uart_write(report->keys[4]);
uart_write(report->keys[5]);
} }
void rn42_send_mouse(report_mouse_t *report) { void rn42_send_mouse(report_mouse_t *report) {
uart_write(0xFD); uart_write(0xFD);
uart_write(0x00); uart_write(0x05);
uart_write(0x03); uart_write(0x02);
uart_write(report->buttons); uart_write(report->buttons);
uart_write(report->x); uart_write(report->x);
uart_write(report->y); uart_write(report->y);
uart_write(report->v); // should try sending the wheel v here uart_write(report->v);
uart_write(report->h); // should try sending the wheel h here
uart_write(0x00);
} }
void rn42_send_consumer(uint16_t data) { void rn42_send_consumer(uint16_t usage) {
static uint16_t last_data = 0; uint16_t bitmap = rn42_consumer_usage_to_bitmap(usage);
if (data == last_data) return;
last_data = data;
uint16_t bitmap = rn42_consumer_usage_to_bitmap(data);
uart_write(0xFD); uart_write(0xFD);
uart_write(0x03); uart_write(0x03);
uart_write(0x03); uart_write(0x03);
uart_write(bitmap & 0xFF); uart_write(bitmap & 0xFF);
uart_write((bitmap >> 8) & 0xFF); uart_write(bitmap >> 8);
} }

View file

@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdint.h>
#include "report.h" #include "report.h"
void rn42_init(void); void rn42_init(void);
@ -22,4 +24,4 @@ void rn42_send_keyboard(report_keyboard_t *report);
void rn42_send_mouse(report_mouse_t *report); void rn42_send_mouse(report_mouse_t *report);
void rn42_send_consumer(uint16_t data); void rn42_send_consumer(uint16_t usage);

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