diff --git a/README.md b/README.md index 9cebed6..1198b80 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,11 @@ Run `zmk keyboard list` to print a list of supported keyboard hardware. If ZMK doesn't support your keyboard yet, you can run `zmk keyboard new` to create a new keyboard from a template. -This won't walk you through all of the details of adding support for a new keyboard, but it will generate most of the boilerplate for you. See the [New Keyboard Shield](https://zmk.dev/docs/development/new-shield) guide for how to finish writing the keyboard files. +This won't walk you through all of the details of adding support for a new keyboard, but it will generate most of the boilerplate for you. See the [New Keyboard Shield](https://zmk.dev/docs/development/hardware-integration/new-shield) guide for how to finish writing the keyboard files. ## Module Management -[Zephyr modules](https://docs.zephyrproject.org/3.6.0/develop/modules.html) can add support for new keyboards, behaviors, and other features to ZMK. Use the `zmk module` command to install modules into your repo: +[Zephyr modules](https://docs.zephyrproject.org/3.5.0/develop/modules.html) can add support for new keyboards, behaviors, and other features to ZMK. Use the `zmk module` command to install modules into your repo: ```sh zmk module add # Add a module diff --git a/zmk/commands/keyboard/new.py b/zmk/commands/keyboard/new.py index 6319c86..8be1f33 100644 --- a/zmk/commands/keyboard/new.py +++ b/zmk/commands/keyboard/new.py @@ -197,7 +197,9 @@ def keyboard_new( rich.print( "Open this folder and edit the files to finish setting up the new keyboard." ) - rich.print("See https://zmk.dev/docs/development/new-shield for help.") + rich.print( + "See https://zmk.dev/docs/development/hardware-integration/new-shield for help." + ) def _prompt_keyboard_type(): diff --git a/zmk/templates/board/nrf52840/Kconfig b/zmk/templates/board/nrf52840/Kconfig index 7b96a24..4f6e23a 100644 --- a/zmk/templates/board/nrf52840/Kconfig +++ b/zmk/templates/board/nrf52840/Kconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. if ${self.guard() | trim} diff --git a/zmk/templates/board/nrf52840/Kconfig.defconfig b/zmk/templates/board/nrf52840/Kconfig.defconfig index 2d79594..8402252 100644 --- a/zmk/templates/board/nrf52840/Kconfig.defconfig +++ b/zmk/templates/board/nrf52840/Kconfig.defconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. <%block name="before" /> diff --git a/zmk/templates/board/nrf52840/board.yaml b/zmk/templates/board/nrf52840/board.yaml index 9c28799..bd59358 100644 --- a/zmk/templates/board/nrf52840/board.yaml +++ b/zmk/templates/board/nrf52840/board.yaml @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/develop/test/twister.html#board-configuration +# See https://docs.zephyrproject.org/3.5.0/develop/test/twister.html#board-configuration # for more information. identifier: ${id} diff --git a/zmk/templates/board/nrf52840/board_defconfig b/zmk/templates/board/nrf52840/board_defconfig index 5b6b8c0..339362c 100644 --- a/zmk/templates/board/nrf52840/board_defconfig +++ b/zmk/templates/board/nrf52840/board_defconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. CONFIG_SOC_SERIES_NRF52X=y @@ -12,7 +12,7 @@ CONFIG_ARM_MPU=y # Enable GPIO CONFIG_GPIO=y -# Use pinctrl +# Enable pinctrl CONFIG_PINCTRL=y # Place application at &code_partition address @@ -29,6 +29,9 @@ CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y +# Uncomment this if not using an external 32 kHz crystal +# CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + # Enable ZMK BLE and USB output CONFIG_ZMK_BLE=y CONFIG_ZMK_USB=y diff --git a/zmk/templates/board/nrf52840/common_outer.dtsi b/zmk/templates/board/nrf52840/common_outer.dtsi index 1fd3920..77c28d8 100644 --- a/zmk/templates/board/nrf52840/common_outer.dtsi +++ b/zmk/templates/board/nrf52840/common_outer.dtsi @@ -14,46 +14,50 @@ status = "okay"; }; -&usbd { - status = "okay"; +&uart0 { + compatible = "nordic,nrf-uarte"; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - }; +zephyr_udc0: &usbd { + status = "okay"; }; &flash0 { // Adjust this flash map as is necessary for your board. For more information, see - // https://docs.zephyrproject.org/latest/reference/storage/flash_map/flash_map.html + // https://docs.zephyrproject.org/3.5.0/services/storage/flash_map/flash_map.html#relationship-with-devicetree partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; code_partition: partition@1000 { - reg = <0x00001000 0x000d3000>; + reg = ; }; // If using a bootloader with SoftDevice included, replace the code_partition // node above with the following. If using SoftDevice v7, change 26000 to 27000. // sd_partition: partition@0 { - // reg = <0x00000000 0x00026000>; + // reg = <0x0 ; // }; // code_partition: partition@26000 { - // reg = <0x00026000 0x000c6000>; + // reg = ; // }; // The flash starting at 0x000d4000 and ending at // 0x000f3fff is reserved for use by the application. - // Storage partition will be used by FCB/LittleFS/NVS if enabled. + // Storage partition will be used by NVS if enabled. storage_partition: partition@d4000 { - reg = <0x000d4000 0x00020000>; + reg = ; }; boot_partition: partition@f4000 { - reg = <0x000f4000 0x0000c000>; + reg = ; }; }; }; diff --git a/zmk/templates/board/nrf52840/pinctrl.dtsi b/zmk/templates/board/nrf52840/pinctrl.dtsi index a79175a..8dff71f 100644 --- a/zmk/templates/board/nrf52840/pinctrl.dtsi +++ b/zmk/templates/board/nrf52840/pinctrl.dtsi @@ -1,6 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html -// and https://docs.zephyrproject.org/3.6.0/hardware/pinctrl/index.html for +// See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html +// and https://docs.zephyrproject.org/3.5.0/hardware/pinctrl/index.html for // more instructions. #include diff --git a/zmk/templates/board/nrf52840/split/${id}-layouts.dtsi b/zmk/templates/board/nrf52840/split/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/board/nrf52840/split/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" /> diff --git a/zmk/templates/board/nrf52840/split/${id}.dtsi b/zmk/templates/board/nrf52840/split/${id}.dtsi index a45da2b..5baaa8b 100644 --- a/zmk/templates/board/nrf52840/split/${id}.dtsi +++ b/zmk/templates/board/nrf52840/split/${id}.dtsi @@ -10,8 +10,7 @@ zephyr,flash = &flash0; // Uncomment this if you enabled one of the "vddh" nodes below. // zmk,battery = &vbatt; - zmk,kscan = &kscan; - zmk,matrix_transform = &default_transform; + zmk,physical-layout = &default_layout; }; <%block name="kscan"> diff --git a/zmk/templates/board/nrf52840/unibody/${id}-layouts.dtsi b/zmk/templates/board/nrf52840/unibody/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/board/nrf52840/unibody/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" /> diff --git a/zmk/templates/board/nrf52840/unibody/${id}.dts b/zmk/templates/board/nrf52840/unibody/${id}.dts index fd473f6..cc8793a 100644 --- a/zmk/templates/board/nrf52840/unibody/${id}.dts +++ b/zmk/templates/board/nrf52840/unibody/${id}.dts @@ -4,7 +4,6 @@ <%block name="includes"> #include "${id}-pinctrl.dtsi" - <%block name="chosen"> chosen { @@ -14,8 +13,7 @@ zephyr,flash = &flash0; // Uncomment this if you enabled one of the "vddh" nodes below. // zmk,battery = &vbatt; - zmk,kscan = &kscan; - zmk,matrix_transform = &default_transform; + zmk,physical-layout = &default_layout; }; <%block name="nodes"> diff --git a/zmk/templates/board/other/Kconfig b/zmk/templates/board/other/Kconfig index 188ded0..08eb36a 100644 --- a/zmk/templates/board/other/Kconfig +++ b/zmk/templates/board/other/Kconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. if ${self.guard() | trim} diff --git a/zmk/templates/board/other/Kconfig.defconfig b/zmk/templates/board/other/Kconfig.defconfig index 3c605b5..2e09b7f 100644 --- a/zmk/templates/board/other/Kconfig.defconfig +++ b/zmk/templates/board/other/Kconfig.defconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. <%block name="before" /> diff --git a/zmk/templates/board/other/board.cmake b/zmk/templates/board/other/board.cmake index b023029..4e77106 100644 --- a/zmk/templates/board/other/board.cmake +++ b/zmk/templates/board/other/board.cmake @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#flash-and-debug-support +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#flash-and-debug-support # for more information. <%text> include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) diff --git a/zmk/templates/board/other/board.yaml b/zmk/templates/board/other/board.yaml index 5435819..0d96b58 100644 --- a/zmk/templates/board/other/board.yaml +++ b/zmk/templates/board/other/board.yaml @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/develop/test/twister.html#board-configuration +# See https://docs.zephyrproject.org/3.5.0/develop/test/twister.html#board-configuration # for more information. identifier: ${id} diff --git a/zmk/templates/board/other/board_defconfig b/zmk/templates/board/other/board_defconfig index 2b4b7d6..50a6473 100644 --- a/zmk/templates/board/other/board_defconfig +++ b/zmk/templates/board/other/board_defconfig @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. CONFIG_BOARD_${id.upper()}=y diff --git a/zmk/templates/board/other/pinctrl.dtsi b/zmk/templates/board/other/pinctrl.dtsi index 86b6193..ca27ed4 100644 --- a/zmk/templates/board/other/pinctrl.dtsi +++ b/zmk/templates/board/other/pinctrl.dtsi @@ -1,6 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html -// and https://docs.zephyrproject.org/3.6.0/hardware/pinctrl/index.html for +// See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html +// and https://docs.zephyrproject.org/3.5.0/hardware/pinctrl/index.html for // more instructions. &pinctrl { diff --git a/zmk/templates/board/other/split/${id}-layouts.dtsi b/zmk/templates/board/other/split/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/board/other/split/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" /> diff --git a/zmk/templates/board/other/split/${id}.dtsi b/zmk/templates/board/other/split/${id}.dtsi index 174690c..561e185 100644 --- a/zmk/templates/board/other/split/${id}.dtsi +++ b/zmk/templates/board/other/split/${id}.dtsi @@ -1,5 +1,4 @@ <%inherit file="/common/board_split.dtsi" />\ <%block name="includes"> #include "${id}-pinctrl.dtsi" - diff --git a/zmk/templates/board/other/split/Kconfig.board b/zmk/templates/board/other/split/Kconfig.board index 81d6af6..be1bf24 100644 --- a/zmk/templates/board/other/split/Kconfig.board +++ b/zmk/templates/board/other/split/Kconfig.board @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. config BOARD_${id.upper()}_LEFT diff --git a/zmk/templates/board/other/unibody/${id}-layouts.dtsi b/zmk/templates/board/other/unibody/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/board/other/unibody/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" /> diff --git a/zmk/templates/board/other/unibody/${id}.dts b/zmk/templates/board/other/unibody/${id}.dts index b86ddfd..a58d0c0 100644 --- a/zmk/templates/board/other/unibody/${id}.dts +++ b/zmk/templates/board/other/unibody/${id}.dts @@ -1,5 +1,4 @@ <%inherit file="/common/board.dts" /> <%block name="includes"> #include "${id}-pinctrl.dtsi" - diff --git a/zmk/templates/board/other/unibody/Kconfig.board b/zmk/templates/board/other/unibody/Kconfig.board index 57440a7..930c8df 100644 --- a/zmk/templates/board/other/unibody/Kconfig.board +++ b/zmk/templates/board/other/unibody/Kconfig.board @@ -1,5 +1,5 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html#write-kconfig-files +# See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files # for more information. config BOARD_${id.upper()} diff --git a/zmk/templates/common/board.dts b/zmk/templates/common/board.dts index 860fd56..891e726 100644 --- a/zmk/templates/common/board.dts +++ b/zmk/templates/common/board.dts @@ -1,20 +1,22 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://docs.zephyrproject.org/3.6.0/hardware/porting/board_porting.html -// and https://zmk.dev/docs/development/new-shield for more instructions. +// See https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html +// and https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. /dts-v1/; <%block name="system_includes" /> #include <%block name="includes" /> +#include "${id}-layouts.dtsi" + / { model = "${name}"; compatible = "${id}"; <%block name="chosen"> chosen { - zmk,kscan = &kscan; - zmk,matrix_transform = &default_transform; + zmk,physical-layout = &default_layout; }; diff --git a/zmk/templates/common/board_left.dts b/zmk/templates/common/board_left.dts index 85d72b7..ecd49ee 100644 --- a/zmk/templates/common/board_left.dts +++ b/zmk/templates/common/board_left.dts @@ -1,5 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. #include "${id}.dtsi" #include "${id}_left-pinctrl.dtsi" diff --git a/zmk/templates/common/board_right.dts b/zmk/templates/common/board_right.dts index 535887f..4ebfc59 100644 --- a/zmk/templates/common/board_right.dts +++ b/zmk/templates/common/board_right.dts @@ -1,5 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. #include "${id}.dtsi" #include "${id}_right-pinctrl.dtsi" diff --git a/zmk/templates/common/default.conf b/zmk/templates/common/default.conf index 0aab779..690879f 100644 --- a/zmk/templates/common/default.conf +++ b/zmk/templates/common/default.conf @@ -1,5 +1,6 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://zmk.dev/docs/development/new-shield for more instructions. +# See https://zmk.dev/docs/development/hardware-integration/new-shield for more +# instructions. # This file will be copied into the user's config directory when they add this # keyboard. Define any Kconfig options users may frequently want to set here, diff --git a/zmk/templates/common/hardware.zmk.yml b/zmk/templates/common/hardware.zmk.yml index a3783e4..64c6b50 100644 --- a/zmk/templates/common/hardware.zmk.yml +++ b/zmk/templates/common/hardware.zmk.yml @@ -1,5 +1,6 @@ # This file was generated from a template. Edit it to match your keyboard. -# See https://zmk.dev/docs/development/hardware-metadata-files for instructions. +# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files +# for instructions. file_format: "1" id: ${id} @@ -13,7 +14,8 @@ arch: ${arch} url: https://example.com # Add any features your keyboard supports here. -# See https://zmk.dev/docs/development/hardware-metadata-files#features. +# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files#features features: - keys + - studio # Remove this line if your keyboard will not support ZMK Studio ${self.body()} \ No newline at end of file diff --git a/zmk/templates/common/keymap.dtsi b/zmk/templates/common/keymap.dtsi index 6643b24..26748a9 100644 --- a/zmk/templates/common/keymap.dtsi +++ b/zmk/templates/common/keymap.dtsi @@ -1,12 +1,12 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more instructions. #include #include / { // Define a default keymap here. - // See https://zmk.dev/docs/development/new-shield#default-keymap. + // See https://zmk.dev/docs/development/hardware-integration/new-shield#default-keymap. keymap { compatible = "zmk,keymap"; diff --git a/zmk/templates/common/kscan.dtsi b/zmk/templates/common/kscan.dtsi index 96817c7..c35f13d 100644 --- a/zmk/templates/common/kscan.dtsi +++ b/zmk/templates/common/kscan.dtsi @@ -11,7 +11,7 @@ wakeup-source; // Replace these comments with the GPIO pins in the matrix. - // See https://zmk.dev/docs/development/new-shield#shield-overlays + // See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays col-gpios = , diff --git a/zmk/templates/common/kscan_split_common.dtsi b/zmk/templates/common/kscan_split_common.dtsi index 8a66e69..68c58b1 100644 --- a/zmk/templates/common/kscan_split_common.dtsi +++ b/zmk/templates/common/kscan_split_common.dtsi @@ -12,7 +12,7 @@ wakeup-source; // Replace these comments with the GPIO pins in the matrix. - // See https://zmk.dev/docs/development/new-shield#shield-overlays + // See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays row-gpios = , diff --git a/zmk/templates/common/kscan_split_left.dtsi b/zmk/templates/common/kscan_split_left.dtsi index 529c012..178de63 100644 --- a/zmk/templates/common/kscan_split_left.dtsi +++ b/zmk/templates/common/kscan_split_left.dtsi @@ -1,7 +1,7 @@ <%page args="node = '&gpio0'" /> &kscan { // Replace these comments with the GPIO pins in the matrix for the left side. - // See https://zmk.dev/docs/development/new-shield#shield-overlays + // See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays col-gpios = , diff --git a/zmk/templates/common/kscan_split_right.dtsi b/zmk/templates/common/kscan_split_right.dtsi index c0fefe8..1d8535f 100644 --- a/zmk/templates/common/kscan_split_right.dtsi +++ b/zmk/templates/common/kscan_split_right.dtsi @@ -6,7 +6,7 @@ &kscan { // Replace these comments with the GPIO pins in the matrix for the right side. - // See https://zmk.dev/docs/development/new-shield#shield-overlays + // See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays col-gpios = , diff --git a/zmk/templates/common/layouts.dtsi b/zmk/templates/common/layouts.dtsi new file mode 100644 index 0000000..2ba9e06 --- /dev/null +++ b/zmk/templates/common/layouts.dtsi @@ -0,0 +1,23 @@ +// See https://zmk.dev/docs/development/hardware-integration/physical-layouts +// for how to configure this. + +#include + +/ { + default_layout: default_layout { + compatible = "zmk,physical-layout"; + display-name = "Default Layout"; + transform = <&default_transform>; + kscan = <&kscan>; + + // Edit this to define the positions and sizes of the keys, or remove it + // if your keyboard will not support ZMK Studio. + // https://zmk.dev/docs/development/hardware-integration/physical-layouts#optional-keys-property + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 0 0 0 0> + , <&key_physical_attrs 100 100 100 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + ; + }; +}; diff --git a/zmk/templates/common/matrix_transform.dtsi b/zmk/templates/common/matrix_transform.dtsi index 565b771..19c24fb 100644 --- a/zmk/templates/common/matrix_transform.dtsi +++ b/zmk/templates/common/matrix_transform.dtsi @@ -1,5 +1,5 @@ default_transform: default_transform { - // See https://zmk.dev/docs/development/new-shield#optional-matrix-transform + // See https://zmk.dev/docs/development/hardware-integration/new-shield#matrix-transform // for how to configure this compatible = "zmk,matrix-transform"; columns = <2>; diff --git a/zmk/templates/common/matrix_transform_split.dtsi b/zmk/templates/common/matrix_transform_split.dtsi index 586a874..4ad3159 100644 --- a/zmk/templates/common/matrix_transform_split.dtsi +++ b/zmk/templates/common/matrix_transform_split.dtsi @@ -1,5 +1,5 @@ default_transform: default_transform { - // See https://zmk.dev/docs/development/new-shield#optional-matrix-transform + // See https://zmk.dev/docs/development/hardware-integration/new-shield#matrix-transform // for how to configure this compatible = "zmk,matrix-transform"; columns = <4>; diff --git a/zmk/templates/common/shield.overlay b/zmk/templates/common/shield.overlay index a69d677..7122f34 100644 --- a/zmk/templates/common/shield.overlay +++ b/zmk/templates/common/shield.overlay @@ -1,15 +1,17 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. <%block name="system_includes" /> #include + <%block name="includes" /> +#include "${id}-layouts.dtsi" / { <%block name="chosen"> chosen { - zmk,kscan = &kscan; - zmk,matrix_transform = &default_transform; + zmk,physical-layout = &default_layout; }; diff --git a/zmk/templates/common/shield_left.overlay b/zmk/templates/common/shield_left.overlay index 6af31bb..3619888 100644 --- a/zmk/templates/common/shield_left.overlay +++ b/zmk/templates/common/shield_left.overlay @@ -1,5 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. #include "${id}.dtsi" diff --git a/zmk/templates/common/shield_right.overlay b/zmk/templates/common/shield_right.overlay index 98798e1..3baa4b1 100644 --- a/zmk/templates/common/shield_right.overlay +++ b/zmk/templates/common/shield_right.overlay @@ -1,5 +1,6 @@ // This file was generated from a template. Edit it to match your keyboard. -// See https://zmk.dev/docs/development/new-shield for more instructions. +// See https://zmk.dev/docs/development/hardware-integration/new-shield for more +// instructions. #include "${id}.dtsi" diff --git a/zmk/templates/shield/split/${id}-layouts.dtsi b/zmk/templates/shield/split/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/shield/split/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" /> diff --git a/zmk/templates/shield/unibody/${id}-layouts.dtsi b/zmk/templates/shield/unibody/${id}-layouts.dtsi new file mode 100644 index 0000000..7948d19 --- /dev/null +++ b/zmk/templates/shield/unibody/${id}-layouts.dtsi @@ -0,0 +1 @@ +<%inherit file="/common/layouts.dtsi" />