Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
223a2ae
refactor(core): Move to input API for our matrix drivers.
petejohanson Apr 9, 2026
ba3b34e
refactor(core): Move to snprintk for string manipulation
petejohanson Apr 9, 2026
df673c4
feat: Add GPIO demux driver for use with boards like Nibble
petejohanson Apr 14, 2026
16a6df5
refactor(core): Move the sideband behavior to matrix inputs
petejohanson Jun 10, 2026
32a3954
chore(boards): Add `full_name` to all board.yml files
petejohanson Jun 10, 2026
0e0e105
fix(ble): Properly include name in BT SD data
petejohanson Jun 10, 2026
d8da668
fix(ble): Include a callback function when GATT notifying
petejohanson Jun 10, 2026
85fef4a
fix(core): Adjust our HID headers to avoid redefines from Zephyr
petejohanson Jun 11, 2026
3f9654a
FIXME: Move to Zephyr 4.4.1 branch.
petejohanson Jun 11, 2026
485b425
fix(boards): Move BDN9 to matrix input driver
petejohanson Jun 11, 2026
ad0bb9e
fix(shields): Adjust the ZMK Uno shield for matrix inputs
petejohanson Jun 11, 2026
f5e351f
refactor(shields): Move Clueboard California to matrix input driver
petejohanson Jun 11, 2026
6485256
refactor(shields): Move Corne to matrix input driver
petejohanson Jun 11, 2026
a89e933
refactor(shields): Move Lily58 to matrix input driver
petejohanson Jun 11, 2026
17ba7c7
refactor(shields): Move Kyria to matrix input driver
petejohanson Jun 11, 2026
203fd3e
refactor(shields): Move A-Dux to matrix input driver
petejohanson Jun 11, 2026
16a0ad5
refactor(shields): Move BFO9000 to matrix input driver
petejohanson Jun 11, 2026
105bd37
refactor(shields): Refactor all in-tree shields to matrix inputs
petejohanson Jun 11, 2026
51f2bbe
FIXME: Move to 4.4-branch Docker images.
petejohanson Jun 12, 2026
9e17453
refactor(boards): Move Planck/Preonic to matrix input driver
petejohanson Jun 12, 2026
3dfbb4e
chore(ci): Bump jobs' cache version to avoid long builds.
petejohanson Jun 12, 2026
7d2448a
fix(boards): Migrate Ferris to the new matrix input drivers
petejohanson Jun 12, 2026
cf0e85c
refactor(boards): Adjust Tofu65 for matrix inputs, Zephyr changes
petejohanson Jun 12, 2026
fea7399
refactor(boards): Move Advantage 360 Pro to matrix input driver
petejohanson Jun 12, 2026
1ba2946
refactor(boards): Move Corneish Zen to matrix input driver
petejohanson Jun 12, 2026
9590cf7
refactor(boards): Move Glove80 to matrix input driver
petejohanson Jun 12, 2026
30a0cdc
refactor(boards): Move S40NC to matrix input driver
petejohanson Jun 12, 2026
5f5ee0e
refactor(boards): Move nice!60 to matrix input driver
petejohanson Jun 12, 2026
d47d76f
refactor(boards): Adjust PW boards to matrix input driver
petejohanson Jun 12, 2026
1c410b3
refactor(boards): Adjust native boards to matrix input driver
petejohanson Jun 12, 2026
e54fbd5
fix(core): Explicitly add application snippets by setting SNIPPET_ROOT
petejohanson Jun 12, 2026
59c739d
fix(boards): Remove removed/unneeded BT_CTLR override for boards
petejohanson Jun 12, 2026
1a028c7
fix(ble): Fix up BLE tests based on Zephyr changes.
petejohanson Jun 12, 2026
c502f1e
refactor(shields): Adjust settings reset shield for matrix input driver
petejohanson Jun 12, 2026
f0c8c71
fix(boards): Use correct input matrix polling Kconfig symbol
petejohanson Jun 13, 2026
97e98a7
fix(boards): Disable CDC ACM defaults from upstream xiao_ble board
petejohanson Jun 13, 2026
6e79eee
fix(core): Remove kscan reference from a shared layout
petejohanson Jun 13, 2026
00b9619
fix(boards): Use the corrected path to the RP2040 bootloader DTS
petejohanson Jun 13, 2026
9aa5391
fix(boards): Adjust USB CDC ACM buffer size for BDN9
petejohanson Jun 13, 2026
9dd6ca9
fix(boards): Fix MoErgo Glove80 build with ZMK/Zephyr USB changes
petejohanson Jun 13, 2026
5565f21
fix(ble): Adjust main stack size with split centrals.
petejohanson Jun 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions .github/workflows/ble-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,26 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:4.4-branch
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache west modules
uses: actions/cache@v5
env:
cache-name: cache-zephyr-modules
cache-version: v2
with:
path: |
modules/
tools/
zephyr/
bootloader/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
key: ${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-version }}-build-
${{ runner.os }}-${{ env.cache-version }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-user-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
container:
image: zmkfirmware/zmk-build-arm:stable
image: zmkfirmware/zmk-build-arm:4.4-branch
needs: matrix
name: Build
strategy:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:4.4-branch
needs: compile-matrix
strategy:
matrix:
Expand All @@ -37,17 +37,18 @@ jobs:
uses: actions/cache@v5
env:
cache-name: cache-zephyr-modules
cache-version: v2
with:
path: |
modules/
tools/
zephyr/
bootloader/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
key: ${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-version }}-build-
${{ runner.os }}-${{ env.cache-version }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,26 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:4.4-branch
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache west modules
uses: actions/cache@v5
env:
cache-name: cache-zephyr-modules
cache-version: v2
with:
path: |
modules/
tools/
zephyr/
bootloader/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
key: ${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-${{ env.cache-version }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-version }}-build-
${{ runner.os }}-${{ env.cache-version }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
Expand Down
3 changes: 2 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set(CONFIG_APPLICATION_DEFINED_SYSCALL true)

set(ZEPHYR_BOARD_ALIASES "boards/aliases.cmake")
set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module")
set(SNIPPET_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")

# Find Zephyr. This also loads Zephyr's build system.
find_package(Zephyr REQUIRED HINTS ../zephyr)
Expand All @@ -27,7 +28,7 @@ add_subdirectory(src/boot)
target_sources(app PRIVATE src/stdlib.c)
target_sources(app PRIVATE src/activity.c)
target_sources(app PRIVATE src/behavior.c)
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
target_sources_ifdef(CONFIG_ZMK_INPUT_SIDEBAND_BEHAVIORS app PRIVATE src/input_sideband_behaviors.c)
target_sources(app PRIVATE src/matrix_transform.c)
target_sources(app PRIVATE src/physical_layouts.c)
target_sources(app PRIVATE src/sensors.c)
Expand Down
42 changes: 26 additions & 16 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -516,33 +516,43 @@ config ZMK_PHYSICAL_LAYOUT_KEY_ROTATION
bool "Support rotation of keys in physical layouts"
default y

menuconfig ZMK_KSCAN
bool "ZMK KScan Integration"
config ZMK_MATRIX_INPUT
bool "ZMK Matrix Input Integration"
default y
select KSCAN
select INPUT
# PM_DEVICE is used to resume/suspend the selected input device.
select PM_DEVICE

if ZMK_KSCAN
if ZMK_MATRIX_INPUT

config ZMK_KSCAN_EVENT_QUEUE_SIZE
int "Size of the event queue for KSCAN events to buffer events"
config ZMK_MATRIX_INPUT_EVENT_QUEUE_SIZE
int "Size of the event queue for matrix input events to buffer events"
default 4

endif # ZMK_KSCAN
endif # ZMK_MATRIX_INPUT

if INPUT

choice INPUT_MODE
default INPUT_MODE_SYNCHRONOUS
endchoice

endif

config ZMK_KSCAN_SIDEBAND_BEHAVIORS
config ZMK_INPUT_SIDEBAND_BEHAVIORS
bool
default y
depends on DT_HAS_ZMK_KSCAN_SIDEBAND_BEHAVIORS_ENABLED
select KSCAN
depends on DT_HAS_ZMK_INPUT_SIDEBAND_BEHAVIORS_ENABLED
select INPUT

if ZMK_KSCAN_SIDEBAND_BEHAVIORS
if ZMK_INPUT_SIDEBAND_BEHAVIORS

config ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY
int "Keyboard scan sideband behaviors driver init priority"
config ZMK_INPUT_SIDEBAND_BEHAVIORS_INIT_PRIORITY
int "Input sideband behaviors driver init priority"
# The default kscan init priority is 90, so be sure we are initialized later.
default 95

endif # ZMK_KSCAN_SIDEBAND_BEHAVIORS
endif # ZMK_INPUT_SIDEBAND_BEHAVIORS

menu "Logging"

Expand Down Expand Up @@ -676,8 +686,8 @@ config KERNEL_BIN_NAME
config REBOOT
default y

config USB_DEVICE_STACK
default y if HAS_HW_NRF_USBD
#config USB_DEVICE_STACK
# default y if HAS_HW_NRF_USBD

config FPU
default CPU_HAS_FPU
Expand Down
2 changes: 1 addition & 1 deletion app/boards/adafruit/kb2040/adafruit_kb2040_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/

#include <../boards/adafruit/kb2040/adafruit_kb2040.dts>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
#include <vendor/raspberrypi/rp2040-boot-mode-retention.dtsi>

&pro_micro_serial { status = "disabled"; };
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/

#include <../boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.dts>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
#include <vendor/raspberrypi/rp2040-boot-mode-retention.dtsi>

&xiao_serial { status = "disabled"; };
2 changes: 1 addition & 1 deletion app/boards/boardsource/blok/boardsource_blok_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <../boards/boardsource/blok/boardsource_blok.dts>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
#include <vendor/raspberrypi/rp2040-boot-mode-retention.dtsi>

&pro_micro_serial { status = "disabled"; };

Expand Down
1 change: 1 addition & 0 deletions app/boards/kbdfans/tofu65/board.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
board:
name: tofu65
full_name: Tofu 65
vendor: kbdfans
socs:
- name: rp2040
Expand Down
8 changes: 4 additions & 4 deletions app/boards/kbdfans/tofu65/tofu65_rp2040_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/dts-v1/;

#include <raspberrypi/rpi_pico/rp2040.dtsi>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
#include <vendor/raspberrypi/rp2040-boot-mode-retention.dtsi>

#include <dt-bindings/zmk/matrix_transform.h>

Expand All @@ -19,7 +19,7 @@
zephyr,flash = &flash0;
zephyr,flash-controller = &ssi;
zephyr,code-partition = &code_partition;
zmk,kscan = &kscan0;
zmk,matrix-input = &matrix;
zmk,physical-layout = &layout_65_ansi;
};

Expand Down Expand Up @@ -48,8 +48,8 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
matrix: matrix {
compatible = "zmk,input-gpio-matrix";

diode-direction = "col2row";
row-gpios
Expand Down
7 changes: 7 additions & 0 deletions app/boards/keebio/bdn9/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@ config BOARD
config ZMK_KEYBOARD_NAME
default "BDN9 Rev2"

if USB_CDC_ACM

config USB_CDC_ACM_RINGBUF_SIZE
default 256

endif # USB_CDC_ACM

endif # BOARD_BDN9
6 changes: 3 additions & 3 deletions app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
zephyr,flash = &flash0;
zmk,underglow = &led_strip;
zmk,physical-layout = &physical_layout0;
zmk,kscan = &kscan0;
zmk,matrix-input = &matrix;
};

matrix_transform0: matrix_transform_0 {
Expand All @@ -40,8 +40,8 @@
>;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";
matrix: matrix {
compatible = "zmk,input-gpio-direct";

input-gpios
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
Expand Down
2 changes: 1 addition & 1 deletion app/boards/keebio/bdn9/bdn9_stm32f072xb_zmk_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CONFIG_GPIO=y
CONFIG_PINCTRL=y

# Poll to avoid interrupt overlap issues
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
CONFIG_ZMK_INPUT_DIRECT_POLLING=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
CONFIG_ISR_STACK_SIZE=1024
Expand Down
1 change: 1 addition & 0 deletions app/boards/keebio/bdn9/board.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
board:
name: bdn9
full_name: BDN9
vendor: keebio
socs:
- name: stm32f072xb
Expand Down
3 changes: 0 additions & 3 deletions app/boards/kinesis/adv360pro/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ config SPI
bool
default y

config BT_CTLR
default BT

if USB

config USB_NRFX
Expand Down
2 changes: 1 addition & 1 deletion app/boards/kinesis/adv360pro/adv360pro.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
zmk,backlight = &backlight;
zmk,battery = &vbatt;
zmk,physical-layout = &physical_layout0;
zmk,kscan = &kscan0;
zmk,matrix-input = &matrix;
zmk,underglow = &led_strip;
};

Expand Down
2 changes: 1 addition & 1 deletion app/boards/kinesis/adv360pro/adv360pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ supported:
- usb_device
- nvs
- can
- kscan
- input
- ble
- pwm
4 changes: 2 additions & 2 deletions app/boards/kinesis/adv360pro/adv360pro_left_nrf52840_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "adv360pro.dtsi"

/{
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
matrix: matrix {
compatible = "zmk,input-gpio-matrix";
wakeup-source;

diode-direction = "col2row";
Expand Down
4 changes: 2 additions & 2 deletions app/boards/kinesis/adv360pro/adv360pro_right_nrf52840_zmk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "adv360pro.dtsi"

/{
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
matrix: matrix {
compatible = "zmk,input-gpio-matrix";
wakeup-source;

diode-direction = "col2row";
Expand Down
2 changes: 2 additions & 0 deletions app/boards/kinesis/adv360pro/board.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
boards:
- name: adv360pro_left
full_name: Advantage 360 Pro (Left)
vendor: kinesis
socs:
- name: nrf52840
variants:
- name: zmk
- name: adv360pro_right
full_name: Advantage 360 Pro (Right)
vendor: kinesis
socs:
- name: nrf52840
Expand Down
3 changes: 0 additions & 3 deletions app/boards/lowprokb/corneish_zen/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ config BOARD
config ZMK_SPLIT
default y

config BT_CTLR
default BT

if USB

config USB_NRFX
Expand Down
2 changes: 2 additions & 0 deletions app/boards/lowprokb/corneish_zen/board.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
boards:
- name: corneish_zen_left
full_name: Corneish Zen (Left)
vendor: lowprokb
socs:
- name: nrf52840
Expand All @@ -13,6 +14,7 @@ boards:
- name: 2.0.0
- name: 1.0.0
- name: corneish_zen_right
full_name: Corneish Zen (Right)
vendor: lowprokb
socs:
- name: nrf52840
Expand Down
2 changes: 1 addition & 1 deletion app/boards/lowprokb/corneish_zen/corneish_zen.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,matrix-input = &matrix;
zmk,display = &epd;
zmk,physical-layout = &foostan_corne_6col_layout;
};
Expand Down
Loading
Loading