mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
Compare commits
17 Commits
dependabot
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4fb39d4a6 | ||
|
|
9278505975 | ||
|
|
ff9d326939 | ||
|
|
df2e979d7e | ||
|
|
8feeb52eaf | ||
|
|
714bbe30b0 | ||
|
|
a23aa009d7 | ||
|
|
2a9ac3ba7f | ||
|
|
27afcb11ef | ||
|
|
61f9ae4de2 | ||
|
|
f6c629e895 | ||
|
|
536375e45e | ||
|
|
e108e319c0 | ||
|
|
9490391e1e | ||
|
|
ed0fa157b1 | ||
|
|
39a14154a9 | ||
|
|
5cfc67a334 |
4
.github/workflows/ble-test.yml
vendored
4
.github/workflows/ble-test.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:4.1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
|
||||
43
.github/workflows/build-user-config.yml
vendored
43
.github/workflows/build-user-config.yml
vendored
@@ -30,17 +30,28 @@ jobs:
|
||||
name: Fetch Build Keyboards
|
||||
outputs:
|
||||
build_matrix: ${{ env.build_matrix }}
|
||||
has_valid_build_matrix: ${{ steps.fetch.outputs.has_valid_build_matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Fetch Build Matrix
|
||||
id: fetch
|
||||
run: |
|
||||
echo "build_matrix=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')" >> $GITHUB_ENV
|
||||
yq -oj "${{ inputs.build_matrix_path }}"
|
||||
matrix_content=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')
|
||||
|
||||
if [ -z "$matrix_content" ] || [ "$matrix_content" = "null" ]; then
|
||||
echo "::notice file=${{inputs.build_matrix_path}},title=Empty build matrix file::To add a keyboard to the build, see https://zmk.dev/docs/user-setup#add-a-keyboard."
|
||||
echo "has_valid_build_matrix=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "build_matrix=$matrix_content" >> $GITHUB_ENV
|
||||
echo "has_valid_build_matrix=true" >> $GITHUB_OUTPUT
|
||||
echo "$matrix_content"
|
||||
fi
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
|
||||
container:
|
||||
image: zmkfirmware/zmk-build-arm:stable
|
||||
needs: matrix
|
||||
@@ -56,7 +67,7 @@ jobs:
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash && apt install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Create build directory
|
||||
run: |
|
||||
@@ -147,6 +158,29 @@ jobs:
|
||||
echo "See also the [list of released versions](https://github.com/zmkfirmware/zmk/releases)." >> $GITHUB_STEP_SUMMARY
|
||||
echo "If you wish to stay on main, check the most recent pending release PR for breaking changes. [Our blog](https://zmk.dev/blog) may have upgrade information if breaking changes are significant." >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Check if building a board without explicit ZMK compat
|
||||
if: always()
|
||||
working-directory: "${{ env.base_dir }}/${{ inputs.config_path }}"
|
||||
run: |
|
||||
if ! (grep "CONFIG_ZMK_BOARD_COMPAT=y" "${{ env.build_dir }}/zephyr/.config" > /dev/null)
|
||||
then
|
||||
original_board=$(echo "${{ matrix.board }}" | sed -e 's$/.*$$')
|
||||
west_board=$(west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}")
|
||||
if [ -z "$west_board" ]; then
|
||||
echo "Not found the board listed with west boards. Skipping further checking."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}" --format "{qualifiers}" | grep "zmk" > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "::warning file=build/zephyr/.config,title=Missing ZMK Compat::The selected board does not report explicit ZMK compat. Please verify you've selected the correct board and ZMK variant if one exists"
|
||||
else
|
||||
echo "::error file=build/zephyr/.config,title=Missing ZMK Compat::The selected board is not set up for ZMK and there is a ZMK variant available. See https://zmk.dev/blog/2025/12/09/zephyr-4-1#zmk-board-variant."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: ${{ env.display_name }} Kconfig file
|
||||
run: |
|
||||
if [ -f "${{ env.build_dir }}/zephyr/.config" ]
|
||||
@@ -190,6 +224,7 @@ jobs:
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
|
||||
needs: build
|
||||
name: Merge Output Artifacts
|
||||
steps:
|
||||
|
||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Cache west modules
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
core-include: ${{ steps.core-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Use Node.js
|
||||
@@ -218,7 +218,7 @@ jobs:
|
||||
boards-include: ${{ steps.boards-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
@@ -346,7 +346,7 @@ jobs:
|
||||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Use Node.js
|
||||
@@ -428,7 +428,7 @@ jobs:
|
||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: tj-actions/changed-files@9200e69727eb73eb060652b19946b8a2fdfb654b # pin to v45.0.8 due to https://github.com/tj-actions/changed-files/issues/2463 https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised
|
||||
|
||||
4
.github/workflows/doc-checks.yml
vendored
4
.github/workflows/doc-checks.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:4.1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install dependencies
|
||||
run: pip install --break-system-packages -r app/scripts/requirements.txt
|
||||
- name: West init
|
||||
|
||||
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
2
.github/workflows/release-please.yml
vendored
2
.github/workflows/release-please.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
ZMK_RELEASE_PLEASE_TOKEN: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}
|
||||
VERSION: v${{ needs.handle-commit.outputs.major }}.${{ needs.handle-commit.outputs.minor }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Create major.minor branch
|
||||
if: ${{ needs.handle-commit.outputs.patch == '0' }}
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:4.1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
|
||||
11
app/Kconfig
11
app/Kconfig
@@ -5,6 +5,17 @@ mainmenu "ZMK Firmware"
|
||||
|
||||
menu "ZMK"
|
||||
|
||||
config ZMK_BOARD_COMPAT
|
||||
bool
|
||||
help
|
||||
Hidden symbol used to hint that a board has been specifically
|
||||
set up with various ZMK requirements in mind, e.g. settings
|
||||
storage, bootloader integration, etc.
|
||||
|
||||
Failure to set this will warn users they may want to verify they
|
||||
used a ZMK variant of an upstream board, or are using a board
|
||||
properly migrated to a newer ZMK version.
|
||||
|
||||
menu "Basic Keyboard Setup"
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
|
||||
9
app/boards/adafruit/kb2040/Kconfig.adafruit_kb2040
Normal file
9
app/boards/adafruit/kb2040/Kconfig.adafruit_kb2040
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ADAFRUIT_KB2040
|
||||
select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
|
||||
imply RETAINED_MEM if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
|
||||
imply RETENTION if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ADAFRUIT_QT_PY_RP2040
|
||||
select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
|
||||
imply RETAINED_MEM if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
|
||||
imply RETENTION if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
|
||||
|
||||
9
app/boards/boardsource/blok/Kconfig.boardsource_blok
Normal file
9
app/boards/boardsource/blok/Kconfig.boardsource_blok
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2026 Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_BOARDSOURCE_BLOK
|
||||
select ZMK_BOARD_COMPAT if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK
|
||||
imply RETAINED_MEM if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK
|
||||
imply RETENTION if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_BOARDSOURCE_BLOK_RP2040_ZMK
|
||||
|
||||
@@ -7,6 +7,7 @@ config BOARD_NRFMICRO
|
||||
select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_ZMK
|
||||
select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK
|
||||
select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833_ZMK
|
||||
select ZMK_BOARD_COMPAT if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK
|
||||
imply RETAINED_MEM if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK
|
||||
imply RETENTION if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_NRFMICRO_NRF52840_ZMK || BOARD_NRFMICRO_NRF52840_FLIPPED_ZMK || BOARD_NRFMICRO_NRF52833_ZMK
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_BLUEMICRO840
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_BLUEMICRO840_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_BLUEMICRO840_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_BLUEMICRO840_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_BLUEMICRO840_NRF52840_ZMK
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_TOFU65
|
||||
select SOC_RP2040
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
|
||||
config BOARD_BDN9
|
||||
select SOC_STM32F072XB
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_PUCHI_BLE
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_ADV360PRO_LEFT
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_ADV360PRO_RIGHT
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_CORNEISH_ZEN_LEFT
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_CORNEISH_ZEN_RIGHT
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_NRF52840_M2
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_NRF52840_M2_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_NRF52840_M2_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_NRF52840_M2_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_NRF52840_M2_NRF52840_ZMK
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_PILLBUG
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_PILLBUG_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_PILLBUG_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_PILLBUG_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_PILLBUG_NRF52840_ZMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
board:
|
||||
name: pillbug
|
||||
extend: pillbug
|
||||
variants:
|
||||
- name: zmk
|
||||
qualifier: nrf52840
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_GLOVE80_LH
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_GLOVE80_RH
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_NICE60
|
||||
select SOC_NRF52840_QIAA
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
select ZMK_BOARD_COMPAT if BOARD_NICE60_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_NICE60_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_NICE60_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_NICE60_NRF52840_ZMK
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_NICE_NANO
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_NICE_NANO_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_NICE_NANO_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_NICE_NANO_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_NICE_NANO_NRF52840_ZMK
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
config BOARD_NRF52840DK
|
||||
select SOC_NRF52840_QIAA if BOARD_NRF52840DK_NRF52840_ZMK
|
||||
select ZMK_BOARD_COMPAT if BOARD_NRF52840DK_NRF52840_ZMK
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_PLANCK
|
||||
bool "Planck Keyboard"
|
||||
select SOC_STM32F303XC
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
|
||||
config BOARD_PREONIC
|
||||
select SOC_STM32F303XC
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_FERRIS
|
||||
select SOC_STM32F072XB
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_BT60
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_BT60_HS
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_BT65
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
config BOARD_BT75
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
||||
6
app/boards/qmk/proton_c/Kconfig.proton_c
Normal file
6
app/boards/qmk/proton_c/Kconfig.proton_c
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_PROTON_C
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
10
app/boards/raspberrypi/rpi_pico/Kconfig.rpi_pico
Normal file
10
app/boards/raspberrypi/rpi_pico/Kconfig.rpi_pico
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_RPI_PICO
|
||||
select SOC_RP2040
|
||||
select ZMK_BOARD_COMPAT if BOARD_RPI_PICO_RP2040_ZMK
|
||||
imply RETAINED_MEM if BOARD_RPI_PICO_RP2040_ZMK
|
||||
imply RETENTION if BOARD_RPI_PICO_RP2040_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_RPI_PICO_RP2040_ZMK
|
||||
|
||||
9
app/boards/seeed/seeeduino_xiao/Kconfig.seeeduino_xiao
Normal file
9
app/boards/seeed/seeeduino_xiao/Kconfig.seeeduino_xiao
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2026 Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_SEEEDUINO_XIAO
|
||||
select ZMK_BOARD_COMPAT if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK
|
||||
imply RETAINED_MEM if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK
|
||||
imply RETENTION if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_SEEEDUINO_XIAO_SAMD21G18A_ZMK
|
||||
|
||||
10
app/boards/seeed/xiao_ble/Kconfig.xiao_ble
Normal file
10
app/boards/seeed/xiao_ble/Kconfig.xiao_ble
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2026 Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_XIAO_BLE
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_XIAO_BLE_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_XIAO_BLE_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_XIAO_BLE_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_XIAO_BLE_NRF52840_ZMK
|
||||
|
||||
@@ -26,6 +26,7 @@ endchoice
|
||||
|
||||
config LV_Z_MEM_POOL_SIZE
|
||||
default 8192 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
default 5120 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
||||
|
||||
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
imply NICE_VIEW_WIDGET_STATUS
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
// | | | | | | | | | | | |
|
||||
bindings = <
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
|
||||
&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans
|
||||
&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &trans &trans
|
||||
&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC
|
||||
&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_SPARKFUN_PRO_MICRO_RP2040
|
||||
select ZMK_BOARD_COMPAT if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK
|
||||
imply RETAINED_MEM if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK
|
||||
imply RETENTION if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_SPARKFUN_PRO_MICRO_RP2040_RP2040_ZMK
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_BLACKPILL_F401CC
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_BLACKPILL_F401CE
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_BLACKPILL_F411CE
|
||||
select ZMK_BOARD_COMPAT
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
config BOARD_MIKOTO
|
||||
select SOC_NRF52840_QIAA
|
||||
select ZMK_BOARD_COMPAT if BOARD_MIKOTO_NRF52840_ZMK
|
||||
imply RETAINED_MEM if BOARD_MIKOTO_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_MIKOTO_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_MIKOTO_NRF52840_ZMK
|
||||
|
||||
@@ -61,7 +61,7 @@ config ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS
|
||||
|
||||
config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS
|
||||
int "Ticks to wait between each output when scanning"
|
||||
default 1 if SOC_RP2040
|
||||
default 1 if SOC_RP2040 || SOC_SERIES_RP2350
|
||||
default 0
|
||||
help
|
||||
When iterating over each output to drive it active, read inputs, then set
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ec11_data {
|
||||
const struct sensor_trigger *trigger;
|
||||
|
||||
#if defined(CONFIG_EC11_TRIGGER_OWN_THREAD)
|
||||
K_THREAD_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE);
|
||||
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_EC11_THREAD_STACK_SIZE);
|
||||
struct k_sem gpio_sem;
|
||||
struct k_thread thread;
|
||||
#elif defined(CONFIG_EC11_TRIGGER_GLOBAL_THREAD)
|
||||
|
||||
@@ -22,8 +22,8 @@ config ZMK_SPLIT_ROLE_CENTRAL
|
||||
select BT_SCAN_WITH_IDENTITY
|
||||
|
||||
# Bump this value needed for concurrent GATT discovery of splits
|
||||
config BT_L2CAP_TX_BUF_COUNT
|
||||
default 5 if ZMK_SPLIT_ROLE_CENTRAL
|
||||
config BT_ATT_TX_COUNT
|
||||
default 10 if ZMK_SPLIT_ROLE_CENTRAL
|
||||
|
||||
if ZMK_SPLIT_ROLE_CENTRAL
|
||||
|
||||
|
||||
@@ -59,11 +59,20 @@ config ZMK_STUDIO_TRANSPORT_UART
|
||||
select RING_BUFFER
|
||||
default y if $(dt_chosen_enabled,$(DT_CHOSEN_ZMK_STUDIO_RPC_UART))
|
||||
|
||||
if ZMK_STUDIO_TRANSPORT_UART
|
||||
|
||||
config ZMK_STUDIO_TRANSPORT_UART_RX_STACK_SIZE
|
||||
int "RX Stack Size"
|
||||
depends on !UART_INTERRUPT_DRIVEN
|
||||
default 512
|
||||
|
||||
config ZMK_STUDIO_TRANSPORT_UART_RX_PRIORITY
|
||||
int "RX Thread Priority"
|
||||
depends on !UART_INTERRUPT_DRIVEN
|
||||
default 9
|
||||
|
||||
endif
|
||||
|
||||
config ZMK_STUDIO_TRANSPORT_BLE
|
||||
bool "BLE (GATT)"
|
||||
select RING_BUFFER
|
||||
@@ -71,9 +80,12 @@ config ZMK_STUDIO_TRANSPORT_BLE
|
||||
depends on ZMK_BLE
|
||||
default y
|
||||
|
||||
|
||||
config BT_CONN_TX_MAX
|
||||
default 64 if ZMK_STUDIO_TRANSPORT_BLE
|
||||
|
||||
if ZMK_STUDIO_TRANSPORT_BLE
|
||||
|
||||
config ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY
|
||||
int "BLE Transport preferred latency"
|
||||
default 10
|
||||
@@ -81,6 +93,8 @@ config ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY
|
||||
When the studio UI is connected, a lower latency can be requested in order
|
||||
to make the interactions between keyboard and studio faster.
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
config ZMK_STUDIO_RPC_THREAD_STACK_SIZE
|
||||
|
||||
@@ -65,7 +65,7 @@ static void uart_rx_main(void) {
|
||||
}
|
||||
|
||||
K_THREAD_DEFINE(uart_transport_read_thread, CONFIG_ZMK_STUDIO_TRANSPORT_UART_RX_STACK_SIZE,
|
||||
uart_rx_main, NULL, NULL, NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0);
|
||||
uart_rx_main, NULL, NULL, NULL, CONFIG_ZMK_STUDIO_TRANSPORT_UART_RX_PRIORITY, 0, 0);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -80,36 +80,36 @@ As a result, all board definitions found in the ZMK tree now must be used with a
|
||||
As part of this change, ZMK is now using board/shield revisions, rather than duplicate board/shield definitions. This means that instead of having e.g. `nice_nano`, and `nice_nano_v2`, we only have `nice_nano`, which by default points to the `2.0.0` revision. To point to the original Nice!Nano V1, you would need to use `nice_nano@1.0.0` where you would have previously used `nice_nano`. Of course, you could also put `nice_nano@2.0.0` if you wished to make that explicit, instead of merely replacing `nice_nano_v2` with `nice_nano`. Some boards, such as the `nrfmicro`, also have additional _board qualifiers_ such as the choice between multiple SoCs. Board qualifiers must always be specified, and do not have defaults. See [Zephyr's overview](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#board-terminology) for more information on board qualifiers. The below table provides an overview of some of the differences in in-tree boards we have in ZMK, and how they are selected in the new build system. The shorthand shows the minimum needed to build with a specific board, taking into account defaults.
|
||||
|
||||
- nice!nano (`nice_nano`)
|
||||
- `nice_nano` -> `nice_nano@1.0.0` (short: `nice_nano@1`)
|
||||
- `nice_nano_v2` -> `nice_nano@2.0.0` (short: `nice_nano`)
|
||||
- `nice_nano` -> `nice_nano@1.0.0//zmk` (short: `nice_nano@1//zmk`)
|
||||
- `nice_nano_v2` -> `nice_nano@2.0.0//zmk` (short: `nice_nano//zmk`)
|
||||
- nRFMicro (`nrfmicro/nrf52840`)
|
||||
- `nrfmicro_11` -> `nrfmicro@1.1.0/nrf52840` (short: `nrfmicro@1.1/nrf52840`)
|
||||
- `nrfmicro_11_flipped` -> `nrfmicro@1.1.0/nrf52840/flipped` (short: `nrfmicro@1.1/nrf52840/flipped`)
|
||||
- `nrfmicro_13` -> `nrfmicro@1.3.0/nrf52840` (short: `nrfmicro/nrf52840`)
|
||||
- `nrfmicro_13_52833` -> `nrfmicro@1.3.0/nrf52833` (short: `nrfmicro/nrf52833`)
|
||||
- `nrfmicro_11` -> `nrfmicro@1.1.0/nrf52840/zmk` (short: `nrfmicro@1.1/nrf52840/zmk`)
|
||||
- `nrfmicro_11_flipped` -> `nrfmicro@1.1.0/nrf52840/flipped_zmk` (short: `nrfmicro@1.1/nrf52840/flipped_zmk`)
|
||||
- `nrfmicro_13` -> `nrfmicro@1.3.0/nrf52840/zmk` (short: `nrfmicro/nrf52840/zmk`)
|
||||
- `nrfmicro_13_52833` -> `nrfmicro@1.3.0/nrf52833/zmk` (short: `nrfmicro/nrf52833/zmk`)
|
||||
- Mikoto (`mikoto`)
|
||||
- `mikoto` -> `mikoto@5.20.0` (short: `mikoto`)
|
||||
- `mikoto@6.1` -> `mikoto@6.1.0` (short: `mikoto@6`)
|
||||
- `mikoto@7.2` -> `mikoto@7.2.0` (short: `mikoto@7`)
|
||||
- `mikoto` -> `mikoto@5.20.0//zmk` (short: `mikoto//zmk`)
|
||||
- `mikoto@6.1` -> `mikoto@6.1.0//zmk` (short: `mikoto@6//zmk`)
|
||||
- `mikoto@7.2` -> `mikoto@7.2.0//zmk` (short: `mikoto@7//zmk`)
|
||||
- XIAO RP2040 (`xiao_rp2040`)
|
||||
- `seeeduino_xiao_rp2040` -> `xiao_rp2040`
|
||||
- `seeeduino_xiao_rp2040` -> `xiao_rp2040//zmk`
|
||||
- XIAO nRF52840/BLE (`xiao_ble`)
|
||||
- `seeeduino_xiao_ble` -> `xiao_ble`
|
||||
- `seeeduino_xiao_ble` -> `xiao_ble//zmk`
|
||||
- BT60 (`bt60`)
|
||||
- `bt60_v1` -> `bt60@1.0.0`
|
||||
- `bt60_v2` -> `bt60@2.0.0`
|
||||
- `bt60_hs` -> `bt60_hs`
|
||||
- `bt60_v1` -> `bt60@1.0.0//zmk`
|
||||
- `bt60_v2` -> `bt60@2.0.0//zmk`
|
||||
- `bt60_hs` -> `bt60_hs//zmk`
|
||||
- Planck (`planck`)
|
||||
- `planck_rev6` -> `planck`
|
||||
- `planck_rev6` -> `planck//zmk`
|
||||
- BDN9 (`bdn9`)
|
||||
- `bdn9_rev2` -> `bdn9`
|
||||
- `bdn9_rev2` -> `bdn9//zmk`
|
||||
- Ferris Rev2 (`ferris`)
|
||||
- `ferris_rev02` -> `ferris@2.0.0` (short: `ferris`)
|
||||
- `ferris_rev02` -> `ferris@2.0.0//zmk` (short: `ferris//zmk`)
|
||||
- Corne-ish Zen (`corneish_zen`)
|
||||
- `corneish_zen_v2_left` -> `corneish_zen_left@2.0.0` (short: `corneish_zen_left`)
|
||||
- `corneish_zen_v2_right` -> `corneish_zen_right@2.0.0` (short: `corneish_zen_right`)
|
||||
- `corneish_zen_v1_left` -> `corneish_zen_left@1.0.0` (short: `corneish_zen_left@1`)
|
||||
- `corneish_zen_v1_right` -> `corneish_zen_right@1.0.0` (short: `corneish_zen_right@1`)
|
||||
- `corneish_zen_v2_left` -> `corneish_zen_left@2.0.0//zmk` (short: `corneish_zen_left//zmk`)
|
||||
- `corneish_zen_v2_right` -> `corneish_zen_right@2.0.0//zmk` (short: `corneish_zen_right//zmk`)
|
||||
- `corneish_zen_v1_left` -> `corneish_zen_left@1.0.0//zmk` (short: `corneish_zen_left@1//zmk`)
|
||||
- `corneish_zen_v1_right` -> `corneish_zen_right@1.0.0//zmk` (short: `corneish_zen_right@1//zmk`)
|
||||
|
||||
The boards above are those which have changed in ZMK's tree, with the addition of the very popular XIAO series. For other boards in Zephyr's tree, please refer to the Zephyr documentation or source files directly.
|
||||
|
||||
|
||||
@@ -13,11 +13,12 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/
|
||||
|
||||
### General
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| --------------------------- | ------ | -------------------------------------------- | ------- |
|
||||
| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | |
|
||||
| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n |
|
||||
| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 |
|
||||
| Config | Type | Description | Default |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `CONFIG_ZMK_BOARD_COMPAT` | bool | A special config for boards to enable. This helps check if users have accidentally used an upstream Zephyr board without ZMK additions applied | n |
|
||||
| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | |
|
||||
| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n |
|
||||
| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 |
|
||||
|
||||
:::info
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ There are three commonly found possibilities:
|
||||
Copy the file into your dongle's folder. Then import the file, assign the matrix transform to it, and select it in the `chosen` node:
|
||||
|
||||
```dts
|
||||
#import "my_keyboard-layouts.dtsi"
|
||||
#include "my_keyboard-layouts.dtsi"
|
||||
|
||||
&physical_layout0 {
|
||||
transform = <&default_transform>;
|
||||
|
||||
@@ -202,7 +202,7 @@ values={[
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#define DT_DRV_COMPAT zmk_<name_of_behavior>
|
||||
#define DT_DRV_COMPAT zmk_behavior_<name_of_behavior>
|
||||
|
||||
// Dependencies
|
||||
#include <zephyr/device.h>
|
||||
@@ -247,7 +247,7 @@ static int on_<name_of_behavior>_binding_released(struct zmk_behavior_binding *b
|
||||
// API struct
|
||||
static const struct behavior_driver_api <name_of_behavior>_driver_api = {
|
||||
.binding_pressed = on_<name_of_behavior>_binding_pressed,
|
||||
.binding_released = on_<name_of_behavior>_binding_pressed,
|
||||
.binding_released = on_<name_of_behavior>_binding_released,
|
||||
};
|
||||
|
||||
BEHAVIOR_DT_INST_DEFINE(0, // Instance Number (0)
|
||||
@@ -273,7 +273,7 @@ BEHAVIOR_DT_INST_DEFINE(0, // Ins
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#define DT_DRV_COMPAT zmk_<name_of_behavior>
|
||||
#define DT_DRV_COMPAT zmk_behavior_<name_of_behavior>
|
||||
|
||||
// Dependencies
|
||||
#include <zephyr/device.h>
|
||||
@@ -318,29 +318,30 @@ static int on_<name_of_behavior>_binding_released(struct zmk_behavior_binding *b
|
||||
// API struct
|
||||
static const struct behavior_driver_api <name_of_behavior>_driver_api = {
|
||||
.binding_pressed = on_<name_of_behavior>_binding_pressed,
|
||||
.binding_released = on_<name_of_behavior>_binding_pressed,
|
||||
.binding_released = on_<name_of_behavior>_binding_released,
|
||||
};
|
||||
|
||||
#define <NAME_OF_BEHAVIOR>_INST(n) \
|
||||
static struct behavior_<name_of_behavior>_data_##n { \
|
||||
.data_param1 = foo1; \
|
||||
.data_param2 = foo2; \
|
||||
.data_param3 = foo3; \
|
||||
}; \
|
||||
\
|
||||
static struct behavior_<name_of_behavior>_config_##n { \
|
||||
.config_param1 = bar1; \
|
||||
.config_param2 = bar2; \
|
||||
.config_param3 = bar3; \
|
||||
}; \
|
||||
\
|
||||
BEHAVIOR_DT_INST_DEFINE(n, \ // Instance Number (Automatically populated by macro)
|
||||
<name_of_behavior>_init, \ // Initialization Function
|
||||
NULL, \ // Power Management Device Pointer
|
||||
&<name_of_behavior>_data_##n, \ // Behavior Data Pointer
|
||||
&<name_of_behavior>_config_##n, \ // Behavior Configuration Pointer
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT \ // Initialization Level, Device Priority
|
||||
&<name_of_behavior>_driver_api); // API struct
|
||||
#define <NAME_OF_BEHAVIOR>_INST(n) \
|
||||
static struct behavior_<name_of_behavior>_data_##n { \
|
||||
.data_param1 = foo1, \
|
||||
.data_param2 = foo2, \
|
||||
.data_param3 = foo3, \
|
||||
}; \
|
||||
\
|
||||
static struct behavior_<name_of_behavior>_config_##n { \
|
||||
.config_param1 = bar1, \
|
||||
.config_param2 = bar2, \
|
||||
.config_param3 = bar3, \
|
||||
}; \
|
||||
\
|
||||
BEHAVIOR_DT_INST_DEFINE(n, /* Instance Number (Automatically populated by macro) */ \
|
||||
<name_of_behavior>_init, /* Initialization Function */ \
|
||||
NULL, /* Power Management Device Pointer */ \
|
||||
&<name_of_behavior>_data_##n, /* Behavior Data Pointer */ \
|
||||
&<name_of_behavior>_config_##n, /* Behavior Configuration Pointer */ \
|
||||
POST_KERNEL, /* Initialization Level */ \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT /* Device Priority */ \
|
||||
&<name_of_behavior>_driver_api); /* API struct */ \
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(<NAME_OF_BEHAVIOR>_INST)
|
||||
|
||||
|
||||
@@ -208,8 +208,8 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr
|
||||
as: auto_shift {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
#binding-cells = <2>;
|
||||
tapping_term_ms = <135>;
|
||||
quick_tap_ms = <0>;
|
||||
tapping-term-ms = <135>;
|
||||
quick-tap-ms = <0>;
|
||||
flavor = "tap-preferred";
|
||||
bindings = <&kp>, <&kp>;
|
||||
};
|
||||
@@ -299,7 +299,7 @@ One workaround is to create a [macro](macros.md) that invokes those behaviors an
|
||||
By default, when another key is pressed while a hold-tap is held, it will trigger the "hold" behavior even if `tapping-term-ms` has not been exceeded yet.
|
||||
We refer to the interaction of pressing one key while another is held as the "interrupt", and the way the hold-tap resolves is referred to as its "interrupt flavor".
|
||||
|
||||
This default interrupt flavor is called "hold-preferred". While this flavor may work well for a ctrl/escape key, but it might not be well suited for home-row mods or layer-taps. For this reason, ZMK defines multiple interrupt flavors which hold-tap behaviors can be configured with, listed below:
|
||||
This default interrupt flavor is called "hold-preferred". While this flavor may work well for a ctrl/escape key, it might not be well suited for home-row mods or layer-taps. For this reason, ZMK defines multiple interrupt flavors which hold-tap behaviors can be configured with, listed below:
|
||||
|
||||
- The "hold-preferred" flavor triggers the hold behavior when the `tapping-term-ms` has expired or another key is pressed.
|
||||
- The "balanced" flavor will trigger the hold behavior when the `tapping-term-ms` has expired or another key is pressed _and_ released while the hold-tap is held.
|
||||
@@ -312,7 +312,7 @@ When the hold-tap key is released and the hold behavior has not been triggered,
|
||||
|
||||
#### Comparison to QMK
|
||||
|
||||
The `hold-preferred` flavor works similar to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK.
|
||||
The `hold-preferred` flavor works similarly to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK.
|
||||
The `balanced` flavor is similar to the `PERMISSIVE_HOLD` setting, and the `tap-preferred` flavor is the QMK default.
|
||||
|
||||
```dts
|
||||
@@ -333,6 +333,10 @@ By default this behavior is disabled.
|
||||
};
|
||||
```
|
||||
|
||||
#### Comparison to QMK
|
||||
|
||||
QMK has a parameter called `QUICK_TAP_TERM`, but its semantics are slightly different. In QMK, it is the time interval between releasing the first key and pressing the second key whereas in ZMK, it is the time interval between pressing the first and second keys. Therefore you might want to use a larger value for `quick-tap-ms` compared to the value used in QMK.
|
||||
|
||||
### `require-prior-idle-ms`
|
||||
|
||||
If a hold-tap is pressed within `require-prior-idle-ms` of another non-modifier _key_ (not behavior), then the hold-tap will always resolve in a tap.
|
||||
|
||||
@@ -7897,7 +7897,7 @@ export default [
|
||||
documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=153",
|
||||
os: {
|
||||
windows: null,
|
||||
linux: null,
|
||||
linux: false,
|
||||
android: null,
|
||||
macos: true,
|
||||
ios: true,
|
||||
|
||||
Reference in New Issue
Block a user