diff --git a/app/boards/arm/adv360pro/adv360pro-layouts.dtsi b/app/boards/arm/adv360pro/adv360pro-layouts.dtsi new file mode 100644 index 00000000000..7970e1be3b5 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro-layouts.dtsi @@ -0,0 +1,87 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 125 100 0 25 0 0 0> + , <&key_physical_attrs 100 100 125 25 0 0 0> + , <&key_physical_attrs 100 100 225 0 0 0 0> + , <&key_physical_attrs 100 100 325 0 0 0 0> + , <&key_physical_attrs 100 100 425 0 0 0 0> + , <&key_physical_attrs 100 100 525 0 0 0 0> + , <&key_physical_attrs 100 100 625 0 0 0 0> + , <&key_physical_attrs 100 100 1075 0 0 0 0> + , <&key_physical_attrs 100 100 1175 0 0 0 0> + , <&key_physical_attrs 100 100 1275 0 0 0 0> + , <&key_physical_attrs 100 100 1375 0 0 0 0> + , <&key_physical_attrs 100 100 1475 0 0 0 0> + , <&key_physical_attrs 100 100 1575 25 0 0 0> + , <&key_physical_attrs 125 100 1675 25 0 0 0> + , <&key_physical_attrs 125 100 0 125 0 0 0> + , <&key_physical_attrs 100 100 125 125 0 0 0> + , <&key_physical_attrs 100 100 225 100 0 0 0> + , <&key_physical_attrs 100 100 325 100 0 0 0> + , <&key_physical_attrs 100 100 425 100 0 0 0> + , <&key_physical_attrs 100 100 525 100 0 0 0> + , <&key_physical_attrs 100 100 625 100 0 0 0> + , <&key_physical_attrs 100 100 1075 100 0 0 0> + , <&key_physical_attrs 100 100 1175 100 0 0 0> + , <&key_physical_attrs 100 100 1275 100 0 0 0> + , <&key_physical_attrs 100 100 1375 100 0 0 0> + , <&key_physical_attrs 100 100 1475 100 0 0 0> + , <&key_physical_attrs 100 100 1575 125 0 0 0> + , <&key_physical_attrs 125 100 1675 125 0 0 0> + , <&key_physical_attrs 125 100 0 225 0 0 0> + , <&key_physical_attrs 100 100 125 225 0 0 0> + , <&key_physical_attrs 100 100 225 200 0 0 0> + , <&key_physical_attrs 100 100 325 200 0 0 0> + , <&key_physical_attrs 100 100 425 200 0 0 0> + , <&key_physical_attrs 100 100 525 200 0 0 0> + , <&key_physical_attrs 100 100 625 200 0 0 0> + , <&key_physical_attrs 100 100 675 400 1500 525 400> + , <&key_physical_attrs 100 100 775 400 1500 525 400> + , <&key_physical_attrs 100 100 925 400 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1025 400 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1075 200 0 0 0> + , <&key_physical_attrs 100 100 1175 200 0 0 0> + , <&key_physical_attrs 100 100 1275 200 0 0 0> + , <&key_physical_attrs 100 100 1375 200 0 0 0> + , <&key_physical_attrs 100 100 1475 200 0 0 0> + , <&key_physical_attrs 100 100 1575 225 0 0 0> + , <&key_physical_attrs 125 100 1675 225 0 0 0> + , <&key_physical_attrs 125 100 0 325 0 0 0> + , <&key_physical_attrs 100 100 125 325 0 0 0> + , <&key_physical_attrs 100 100 225 300 0 0 0> + , <&key_physical_attrs 100 100 325 300 0 0 0> + , <&key_physical_attrs 100 100 425 300 0 0 0> + , <&key_physical_attrs 100 100 525 300 0 0 0> + , <&key_physical_attrs 100 100 775 500 1500 525 400> + , <&key_physical_attrs 100 100 925 500 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1175 300 0 0 0> + , <&key_physical_attrs 100 100 1275 300 0 0 0> + , <&key_physical_attrs 100 100 1375 300 0 0 0> + , <&key_physical_attrs 100 100 1475 300 0 0 0> + , <&key_physical_attrs 100 100 1575 325 0 0 0> + , <&key_physical_attrs 125 100 1675 325 0 0 0> + , <&key_physical_attrs 125 100 0 425 0 0 0> + , <&key_physical_attrs 100 100 125 425 0 0 0> + , <&key_physical_attrs 100 100 225 400 0 0 0> + , <&key_physical_attrs 100 100 325 400 0 0 0> + , <&key_physical_attrs 100 100 425 400 0 0 0> + , <&key_physical_attrs 100 200 575 500 1500 525 400> + , <&key_physical_attrs 100 200 675 500 1500 525 400> + , <&key_physical_attrs 100 100 775 600 1500 525 400> + , <&key_physical_attrs 100 100 925 600 (-1500) 1275 400> + , <&key_physical_attrs 100 200 1025 500 (-1500) 1275 400> + , <&key_physical_attrs 100 200 1125 500 (-1500) 1275 400> + , <&key_physical_attrs 100 100 1275 400 0 0 0> + , <&key_physical_attrs 100 100 1375 400 0 0 0> + , <&key_physical_attrs 100 100 1475 400 0 0 0> + , <&key_physical_attrs 100 100 1575 425 0 0 0> + , <&key_physical_attrs 125 100 1675 425 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/arm/adv360pro/adv360pro.dtsi index b979e9a5736..ca7eaacca07 100644 --- a/app/boards/arm/adv360pro/adv360pro.dtsi +++ b/app/boards/arm/adv360pro/adv360pro.dtsi @@ -11,10 +11,13 @@ #include #include -#include - +#include "adv360pro-layouts.dtsi" #include "adv360pro-pinctrl.dtsi" +&physical_layout0 { + transform = <&matrix_transform0>; +}; + / { model = "Adv360 Pro"; compatible = "kinesis,adv360pro"; @@ -23,14 +26,14 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan0; zmk,backlight = &backlight; zmk,battery = &vbatt; - zmk,physical-layout = &default_layout; + zmk,physical-layout = &physical_layout0; + zmk,kscan = &kscan0; zmk,underglow = &led_strip; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <20>; rows = <5>; @@ -46,92 +49,6 @@ >; }; - default_layout: default_layout { - compatible = "zmk,physical-layout"; - display-name = "Default"; - - transform = <&default_transform>; - - keys // w h x y rot rx ry - = <&key_physical_attrs 125 100 0 25 0 0 0> - , <&key_physical_attrs 100 100 125 25 0 0 0> - , <&key_physical_attrs 100 100 225 0 0 0 0> - , <&key_physical_attrs 100 100 325 0 0 0 0> - , <&key_physical_attrs 100 100 425 0 0 0 0> - , <&key_physical_attrs 100 100 525 0 0 0 0> - , <&key_physical_attrs 100 100 625 0 0 0 0> - , <&key_physical_attrs 100 100 1075 0 0 0 0> - , <&key_physical_attrs 100 100 1175 0 0 0 0> - , <&key_physical_attrs 100 100 1275 0 0 0 0> - , <&key_physical_attrs 100 100 1375 0 0 0 0> - , <&key_physical_attrs 100 100 1475 0 0 0 0> - , <&key_physical_attrs 100 100 1575 25 0 0 0> - , <&key_physical_attrs 125 100 1675 25 0 0 0> - , <&key_physical_attrs 125 100 0 125 0 0 0> - , <&key_physical_attrs 100 100 125 125 0 0 0> - , <&key_physical_attrs 100 100 225 100 0 0 0> - , <&key_physical_attrs 100 100 325 100 0 0 0> - , <&key_physical_attrs 100 100 425 100 0 0 0> - , <&key_physical_attrs 100 100 525 100 0 0 0> - , <&key_physical_attrs 100 100 625 100 0 0 0> - , <&key_physical_attrs 100 100 1075 100 0 0 0> - , <&key_physical_attrs 100 100 1175 100 0 0 0> - , <&key_physical_attrs 100 100 1275 100 0 0 0> - , <&key_physical_attrs 100 100 1375 100 0 0 0> - , <&key_physical_attrs 100 100 1475 100 0 0 0> - , <&key_physical_attrs 100 100 1575 125 0 0 0> - , <&key_physical_attrs 125 100 1675 125 0 0 0> - , <&key_physical_attrs 125 100 0 225 0 0 0> - , <&key_physical_attrs 100 100 125 225 0 0 0> - , <&key_physical_attrs 100 100 225 200 0 0 0> - , <&key_physical_attrs 100 100 325 200 0 0 0> - , <&key_physical_attrs 100 100 425 200 0 0 0> - , <&key_physical_attrs 100 100 525 200 0 0 0> - , <&key_physical_attrs 100 100 625 200 0 0 0> - , <&key_physical_attrs 100 100 675 400 1500 525 400> - , <&key_physical_attrs 100 100 775 400 1500 525 400> - , <&key_physical_attrs 100 100 925 400 (-1500) 1275 400> - , <&key_physical_attrs 100 100 1025 400 (-1500) 1275 400> - , <&key_physical_attrs 100 100 1075 200 0 0 0> - , <&key_physical_attrs 100 100 1175 200 0 0 0> - , <&key_physical_attrs 100 100 1275 200 0 0 0> - , <&key_physical_attrs 100 100 1375 200 0 0 0> - , <&key_physical_attrs 100 100 1475 200 0 0 0> - , <&key_physical_attrs 100 100 1575 225 0 0 0> - , <&key_physical_attrs 125 100 1675 225 0 0 0> - , <&key_physical_attrs 125 100 0 325 0 0 0> - , <&key_physical_attrs 100 100 125 325 0 0 0> - , <&key_physical_attrs 100 100 225 300 0 0 0> - , <&key_physical_attrs 100 100 325 300 0 0 0> - , <&key_physical_attrs 100 100 425 300 0 0 0> - , <&key_physical_attrs 100 100 525 300 0 0 0> - , <&key_physical_attrs 100 100 775 500 1500 525 400> - , <&key_physical_attrs 100 100 925 500 (-1500) 1275 400> - , <&key_physical_attrs 100 100 1175 300 0 0 0> - , <&key_physical_attrs 100 100 1275 300 0 0 0> - , <&key_physical_attrs 100 100 1375 300 0 0 0> - , <&key_physical_attrs 100 100 1475 300 0 0 0> - , <&key_physical_attrs 100 100 1575 325 0 0 0> - , <&key_physical_attrs 125 100 1675 325 0 0 0> - , <&key_physical_attrs 125 100 0 425 0 0 0> - , <&key_physical_attrs 100 100 125 425 0 0 0> - , <&key_physical_attrs 100 100 225 400 0 0 0> - , <&key_physical_attrs 100 100 325 400 0 0 0> - , <&key_physical_attrs 100 100 425 400 0 0 0> - , <&key_physical_attrs 100 200 575 500 1500 525 400> - , <&key_physical_attrs 100 200 675 500 1500 525 400> - , <&key_physical_attrs 100 100 775 600 1500 525 400> - , <&key_physical_attrs 100 100 925 600 (-1500) 1275 400> - , <&key_physical_attrs 100 200 1025 500 (-1500) 1275 400> - , <&key_physical_attrs 100 200 1125 500 (-1500) 1275 400> - , <&key_physical_attrs 100 100 1275 400 0 0 0> - , <&key_physical_attrs 100 100 1375 400 0 0 0> - , <&key_physical_attrs 100 100 1475 400 0 0 0> - , <&key_physical_attrs 100 100 1575 425 0 0 0> - , <&key_physical_attrs 125 100 1675 425 0 0 0> - ; - }; - // Node name must match original "EXT_POWER" label to preserve user settings. EXT_POWER { compatible = "zmk,ext-power-generic"; diff --git a/app/boards/arm/adv360pro/adv360pro_right.dts b/app/boards/arm/adv360pro/adv360pro_right.dts index 748cc42aeb0..3c96f3a1762 100644 --- a/app/boards/arm/adv360pro/adv360pro_right.dts +++ b/app/boards/arm/adv360pro/adv360pro_right.dts @@ -36,6 +36,6 @@ }; }; -&default_transform { +&matrix_transform0 { col-offset = <10>; }; diff --git a/app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi b/app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi new file mode 100644 index 00000000000..bc0f552794b --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi @@ -0,0 +1,20 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "BDN9"; + + 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 200 0 0 0 0> + , <&key_physical_attrs 100 100 0 100 0 0 0> + , <&key_physical_attrs 100 100 100 100 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index 6274b834166..389d23b7de6 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -11,7 +11,11 @@ #include -#include +#include "bdn9_rev2-layouts.dtsi" + +&physical_layout0 { + transform = <&matrix_transform0>; +}; / { model = "Keeb.io BDN9 rev2"; @@ -20,13 +24,12 @@ chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan; zmk,underglow = &led_strip; + zmk,physical-layout = &physical_layout0; + zmk,kscan = &kscan0; }; - matrix_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - + matrix_transform0: matrix_transform_0 { compatible = "zmk,matrix-transform"; columns = <3>; rows = <3>; @@ -37,26 +40,7 @@ >; }; - physical_layout { - compatible = "zmk,physical-layout"; - - display-name = "BDN9"; - transform = <&matrix_transform>; - - 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 200 0 0 0 0> - , <&key_physical_attrs 100 100 0 100 0 0 0> - , <&key_physical_attrs 100 100 100 100 0 0 0> - , <&key_physical_attrs 100 100 200 100 0 0 0> - , <&key_physical_attrs 100 100 0 200 0 0 0> - , <&key_physical_attrs 100 100 100 200 0 0 0> - , <&key_physical_attrs 100 100 200 200 0 0 0> - ; - }; - - kscan: kscan { + kscan0: kscan_0 { compatible = "zmk,kscan-gpio-direct"; input-gpios diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts index 235a92e458d..b649129b20f 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/arm/ferris/ferris_rev02.dts @@ -13,7 +13,7 @@ #include &cuddlykeyboards_ferris_layout { - transform = <&transform>; + transform = <&matrix_transform0>; }; / { @@ -23,13 +23,14 @@ chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,kscan = &kscan; + zmk,kscan = &kscan0; + zmk,physical-layout = &cuddlykeyboards_ferris_layout; /* TODO: Enable once we support the IC for underglow zmk,underglow = &led_strip; */ }; - transform: transform { + matrix_transform0: matrix_transform0 { compatible = "zmk,matrix-transform"; rows = <4>; columns = <10>; @@ -42,7 +43,7 @@ >; }; - kscan: kscan { + kscan0: kscan0 { compatible = "zmk,kscan-composite"; rows = <4>; columns = <10>; diff --git a/app/boards/arm/glove80/glove80-layouts.dtsi b/app/boards/arm/glove80/glove80-layouts.dtsi new file mode 100644 index 00000000000..0c4f2d4e6d1 --- /dev/null +++ b/app/boards/arm/glove80/glove80-layouts.dtsi @@ -0,0 +1,91 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 50 0 0 0> + , <&key_physical_attrs 100 100 100 50 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 0 0 0 0> + , <&key_physical_attrs 100 100 1500 0 0 0 0> + , <&key_physical_attrs 100 100 1600 50 0 0 0> + , <&key_physical_attrs 100 100 1700 50 0 0 0> + , <&key_physical_attrs 100 100 0 150 0 0 0> + , <&key_physical_attrs 100 100 100 150 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 100 0 0 0> + , <&key_physical_attrs 100 100 1500 100 0 0 0> + , <&key_physical_attrs 100 100 1600 150 0 0 0> + , <&key_physical_attrs 100 100 1700 150 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 250 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 200 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1400 200 0 0 0> + , <&key_physical_attrs 100 100 1500 200 0 0 0> + , <&key_physical_attrs 100 100 1600 250 0 0 0> + , <&key_physical_attrs 100 100 1700 250 0 0 0> + , <&key_physical_attrs 100 100 0 350 0 0 0> + , <&key_physical_attrs 100 100 100 350 0 0 0> + , <&key_physical_attrs 100 100 200 300 0 0 0> + , <&key_physical_attrs 100 100 300 300 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 300 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 300 0 0 0> + , <&key_physical_attrs 100 100 1400 300 0 0 0> + , <&key_physical_attrs 100 100 1500 300 0 0 0> + , <&key_physical_attrs 100 100 1600 350 0 0 0> + , <&key_physical_attrs 100 100 1700 350 0 0 0> + , <&key_physical_attrs 100 100 0 450 0 0 0> + , <&key_physical_attrs 100 100 100 450 0 0 0> + , <&key_physical_attrs 100 100 200 400 0 0 0> + , <&key_physical_attrs 100 100 300 400 0 0 0> + , <&key_physical_attrs 100 100 400 400 0 0 0> + , <&key_physical_attrs 100 100 500 400 0 0 0> + , <&key_physical_attrs 100 100 400 450 3000 450 925> + , <&key_physical_attrs 100 100 400 450 4500 450 925> + , <&key_physical_attrs 100 100 400 450 6000 450 925> + , <&key_physical_attrs 100 100 1300 450 (-6000) 1350 925> + , <&key_physical_attrs 100 100 1300 450 (-4500) 1350 925> + , <&key_physical_attrs 100 100 1300 450 (-3000) 1350 925> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 1300 400 0 0 0> + , <&key_physical_attrs 100 100 1400 400 0 0 0> + , <&key_physical_attrs 100 100 1500 400 0 0 0> + , <&key_physical_attrs 100 100 1600 450 0 0 0> + , <&key_physical_attrs 100 100 1700 450 0 0 0> + , <&key_physical_attrs 100 100 0 550 0 0 0> + , <&key_physical_attrs 100 100 100 550 0 0 0> + , <&key_physical_attrs 100 100 200 500 0 0 0> + , <&key_physical_attrs 100 100 300 500 0 0 0> + , <&key_physical_attrs 100 100 400 500 0 0 0> + , <&key_physical_attrs 100 100 400 550 2000 450 925> + , <&key_physical_attrs 100 100 400 550 4000 450 925> + , <&key_physical_attrs 100 100 400 550 6000 450 925> + , <&key_physical_attrs 100 100 1300 550 (-6000) 1350 925> + , <&key_physical_attrs 100 100 1300 550 (-4000) 1350 925> + , <&key_physical_attrs 100 100 1300 550 (-2000) 1350 925> + , <&key_physical_attrs 100 100 1300 500 0 0 0> + , <&key_physical_attrs 100 100 1400 500 0 0 0> + , <&key_physical_attrs 100 100 1500 500 0 0 0> + , <&key_physical_attrs 100 100 1600 550 0 0 0> + , <&key_physical_attrs 100 100 1700 550 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/arm/glove80/glove80.dtsi index fdf890adc51..ae760163205 100644 --- a/app/boards/arm/glove80/glove80.dtsi +++ b/app/boards/arm/glove80/glove80.dtsi @@ -7,19 +7,23 @@ #include #include +#include "glove80-layouts.dtsi" + +&physical_layout0 { + transform = <&matrix_transform0>; +}; -#include / { chosen { zmk,kscan = &kscan0; - zmk,physical-layout = &default_layout; + zmk,physical-layout = &physical_layout0; zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; rows = <6>; @@ -41,96 +45,6 @@ debounce-press-ms = <4>; debounce-release-ms = <20>; }; - - default_layout: default_layout { - compatible = "zmk,physical-layout"; - display-name = "Default"; - - transform = <&default_transform>; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 50 0 0 0> - , <&key_physical_attrs 100 100 100 50 0 0 0> - , <&key_physical_attrs 100 100 200 0 0 0 0> - , <&key_physical_attrs 100 100 300 0 0 0 0> - , <&key_physical_attrs 100 100 400 0 0 0 0> - , <&key_physical_attrs 100 100 1300 0 0 0 0> - , <&key_physical_attrs 100 100 1400 0 0 0 0> - , <&key_physical_attrs 100 100 1500 0 0 0 0> - , <&key_physical_attrs 100 100 1600 50 0 0 0> - , <&key_physical_attrs 100 100 1700 50 0 0 0> - , <&key_physical_attrs 100 100 0 150 0 0 0> - , <&key_physical_attrs 100 100 100 150 0 0 0> - , <&key_physical_attrs 100 100 200 100 0 0 0> - , <&key_physical_attrs 100 100 300 100 0 0 0> - , <&key_physical_attrs 100 100 400 100 0 0 0> - , <&key_physical_attrs 100 100 500 100 0 0 0> - , <&key_physical_attrs 100 100 1200 100 0 0 0> - , <&key_physical_attrs 100 100 1300 100 0 0 0> - , <&key_physical_attrs 100 100 1400 100 0 0 0> - , <&key_physical_attrs 100 100 1500 100 0 0 0> - , <&key_physical_attrs 100 100 1600 150 0 0 0> - , <&key_physical_attrs 100 100 1700 150 0 0 0> - , <&key_physical_attrs 100 100 0 250 0 0 0> - , <&key_physical_attrs 100 100 100 250 0 0 0> - , <&key_physical_attrs 100 100 200 200 0 0 0> - , <&key_physical_attrs 100 100 300 200 0 0 0> - , <&key_physical_attrs 100 100 400 200 0 0 0> - , <&key_physical_attrs 100 100 500 200 0 0 0> - , <&key_physical_attrs 100 100 1200 200 0 0 0> - , <&key_physical_attrs 100 100 1300 200 0 0 0> - , <&key_physical_attrs 100 100 1400 200 0 0 0> - , <&key_physical_attrs 100 100 1500 200 0 0 0> - , <&key_physical_attrs 100 100 1600 250 0 0 0> - , <&key_physical_attrs 100 100 1700 250 0 0 0> - , <&key_physical_attrs 100 100 0 350 0 0 0> - , <&key_physical_attrs 100 100 100 350 0 0 0> - , <&key_physical_attrs 100 100 200 300 0 0 0> - , <&key_physical_attrs 100 100 300 300 0 0 0> - , <&key_physical_attrs 100 100 400 300 0 0 0> - , <&key_physical_attrs 100 100 500 300 0 0 0> - , <&key_physical_attrs 100 100 1200 300 0 0 0> - , <&key_physical_attrs 100 100 1300 300 0 0 0> - , <&key_physical_attrs 100 100 1400 300 0 0 0> - , <&key_physical_attrs 100 100 1500 300 0 0 0> - , <&key_physical_attrs 100 100 1600 350 0 0 0> - , <&key_physical_attrs 100 100 1700 350 0 0 0> - , <&key_physical_attrs 100 100 0 450 0 0 0> - , <&key_physical_attrs 100 100 100 450 0 0 0> - , <&key_physical_attrs 100 100 200 400 0 0 0> - , <&key_physical_attrs 100 100 300 400 0 0 0> - , <&key_physical_attrs 100 100 400 400 0 0 0> - , <&key_physical_attrs 100 100 500 400 0 0 0> - , <&key_physical_attrs 100 100 400 450 3000 450 925> - , <&key_physical_attrs 100 100 400 450 4500 450 925> - , <&key_physical_attrs 100 100 400 450 6000 450 925> - , <&key_physical_attrs 100 100 1300 450 (-6000) 1350 925> - , <&key_physical_attrs 100 100 1300 450 (-4500) 1350 925> - , <&key_physical_attrs 100 100 1300 450 (-3000) 1350 925> - , <&key_physical_attrs 100 100 1200 400 0 0 0> - , <&key_physical_attrs 100 100 1300 400 0 0 0> - , <&key_physical_attrs 100 100 1400 400 0 0 0> - , <&key_physical_attrs 100 100 1500 400 0 0 0> - , <&key_physical_attrs 100 100 1600 450 0 0 0> - , <&key_physical_attrs 100 100 1700 450 0 0 0> - , <&key_physical_attrs 100 100 0 550 0 0 0> - , <&key_physical_attrs 100 100 100 550 0 0 0> - , <&key_physical_attrs 100 100 200 500 0 0 0> - , <&key_physical_attrs 100 100 300 500 0 0 0> - , <&key_physical_attrs 100 100 400 500 0 0 0> - , <&key_physical_attrs 100 100 400 550 2000 450 925> - , <&key_physical_attrs 100 100 400 550 4000 450 925> - , <&key_physical_attrs 100 100 400 550 6000 450 925> - , <&key_physical_attrs 100 100 1300 550 (-6000) 1350 925> - , <&key_physical_attrs 100 100 1300 550 (-4000) 1350 925> - , <&key_physical_attrs 100 100 1300 550 (-2000) 1350 925> - , <&key_physical_attrs 100 100 1300 500 0 0 0> - , <&key_physical_attrs 100 100 1400 500 0 0 0> - , <&key_physical_attrs 100 100 1500 500 0 0 0> - , <&key_physical_attrs 100 100 1600 550 0 0 0> - , <&key_physical_attrs 100 100 1700 550 0 0 0> - ; - }; }; &adc { diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts index 6f108d74763..cc8104c7d9a 100644 --- a/app/boards/arm/glove80/glove80_rh.dts +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -79,7 +79,7 @@ }; /* For right hand, the columns are offset by 7 */ -&default_transform { +&matrix_transform0 { col-offset = <7>; }; diff --git a/app/boards/shields/hummingbird/hummingbird-layouts.dtsi b/app/boards/shields/hummingbird/hummingbird-layouts.dtsi new file mode 100644 index 00000000000..bfae8224027 --- /dev/null +++ b/app/boards/shields/hummingbird/hummingbird-layouts.dtsi @@ -0,0 +1,41 @@ +#include + +/ { + physical_layout0: physical_layout_0 { + compatible = "zmk,physical-layout"; + display-name = "Default"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 25 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 75 0 0 0> + , <&key_physical_attrs 100 100 600 75 0 0 0> + , <&key_physical_attrs 100 100 700 25 0 0 0> + , <&key_physical_attrs 100 100 800 0 0 0 0> + , <&key_physical_attrs 100 100 900 25 0 0 0> + , <&key_physical_attrs 100 100 1000 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 175 0 0 0> + , <&key_physical_attrs 100 100 600 175 0 0 0> + , <&key_physical_attrs 100 100 700 125 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 125 0 0 0> + , <&key_physical_attrs 100 100 1000 175 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 700 225 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 225 0 0 0> + , <&key_physical_attrs 100 100 325 350 0 0 0> + , <&key_physical_attrs 100 100 425 375 0 0 0> + , <&key_physical_attrs 100 100 575 375 0 0 0> + , <&key_physical_attrs 100 100 675 350 0 0 0> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index b077804e5b3..2efc263b134 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -5,15 +5,19 @@ */ #include +#include "hummingbird-layouts.dtsi" -#include +&physical_layout0 { + transform = <&matrix_transform0>; +}; / { chosen { zmk,kscan = &kscan0; + zmk,physical-layout = &physical_layout0; }; - default_transform: keymap_transform_0 { + matrix_transform0: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <7>; rows = <6>; @@ -49,46 +53,4 @@ , <&xiao_d 5 GPIO_ACTIVE_HIGH> ; }; - - - layout_0: layout_0 { - compatible = "zmk,physical-layout"; - display-name = "Default"; - - transform = <&default_transform>; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 75 0 0 0> - , <&key_physical_attrs 100 100 100 25 0 0 0> - , <&key_physical_attrs 100 100 200 0 0 0 0> - , <&key_physical_attrs 100 100 300 25 0 0 0> - , <&key_physical_attrs 100 100 400 75 0 0 0> - , <&key_physical_attrs 100 100 600 75 0 0 0> - , <&key_physical_attrs 100 100 700 25 0 0 0> - , <&key_physical_attrs 100 100 800 0 0 0 0> - , <&key_physical_attrs 100 100 900 25 0 0 0> - , <&key_physical_attrs 100 100 1000 75 0 0 0> - , <&key_physical_attrs 100 100 0 175 0 0 0> - , <&key_physical_attrs 100 100 100 125 0 0 0> - , <&key_physical_attrs 100 100 200 100 0 0 0> - , <&key_physical_attrs 100 100 300 125 0 0 0> - , <&key_physical_attrs 100 100 400 175 0 0 0> - , <&key_physical_attrs 100 100 600 175 0 0 0> - , <&key_physical_attrs 100 100 700 125 0 0 0> - , <&key_physical_attrs 100 100 800 100 0 0 0> - , <&key_physical_attrs 100 100 900 125 0 0 0> - , <&key_physical_attrs 100 100 1000 175 0 0 0> - , <&key_physical_attrs 100 100 100 225 0 0 0> - , <&key_physical_attrs 100 100 200 200 0 0 0> - , <&key_physical_attrs 100 100 300 225 0 0 0> - , <&key_physical_attrs 100 100 700 225 0 0 0> - , <&key_physical_attrs 100 100 800 200 0 0 0> - , <&key_physical_attrs 100 100 900 225 0 0 0> - , <&key_physical_attrs 100 100 325 350 0 0 0> - , <&key_physical_attrs 100 100 425 375 0 0 0> - , <&key_physical_attrs 100 100 575 375 0 0 0> - , <&key_physical_attrs 100 100 675 350 0 0 0> - ; - }; - }; diff --git a/app/boards/shields/jiran/layouts/full.dtsi b/app/boards/shields/jiran/jiran-layouts.dtsi similarity index 84% rename from app/boards/shields/jiran/layouts/full.dtsi rename to app/boards/shields/jiran/jiran-layouts.dtsi index 205c53fef5d..b56c7725650 100644 --- a/app/boards/shields/jiran/layouts/full.dtsi +++ b/app/boards/shields/jiran/jiran-layouts.dtsi @@ -1,6 +1,40 @@ +#include +#include #include -#include "position_map.dtsi" +&layouts_kgoh_jian_position_map { + ladniy_jiran_full_posmap: full_jiran { + physical-layout = <&ladniy_jiran_full_layout>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 > + , <12 13 14 15 16 17 18 19 20 21 22 23 24 25> + , < 26 27 28 29 30 31 32 33 34 35 36 37 > + , < 38 39 40 41 42 43 44 45 46 47 48 49 > + , < 50 51 52 53 54 55 >; + }; +}; + +&kgoh_jian_full_posmap { + positions + = < 44 45 46 47 48 49 50 51 52 53 54 55 > + , < 0 1 2 3 4 5 6 7 8 9 10 11 12 13> + , < 14 15 16 17 18 19 20 21 22 23 24 25 > + , < 26 27 28 29 30 31 32 33 34 35 36 37 > + , < 38 39 40 41 42 43 >; +}; + +&kgoh_jian_6col_posmap { + positions + = < 42 43 44 45 46 47 48 49 50 51 52 53 > + , <54 0 1 2 3 4 5 6 7 8 9 10 11 55> + , < 12 13 14 15 16 17 18 19 20 21 22 23 > + , < 24 25 26 27 28 29 30 31 32 33 34 35 > + , < 36 37 38 39 40 41 >; +}; + +&kgoh_jian_full_layout { + display-name = "Jian (with pinky)"; +}; / { ladniy_jiran_full_layout: ladniy_jiran_full_layout { @@ -67,15 +101,3 @@ ; }; }; - -&layouts_ladniy_jiran_position_map { - ladniy_jiran_full_posmap: full { - physical-layout = <&ladniy_jiran_full_layout>; - positions - = < 0 1 2 3 4 5 6 7 8 9 10 11 > - , <12 13 14 15 16 17 18 19 20 21 22 23 24 25> - , < 26 27 28 29 30 31 32 33 34 35 36 37 > - , < 38 39 40 41 42 43 44 45 46 47 48 49 > - , < 50 51 52 53 54 55 >; - }; -}; diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index d760de17c7b..0e0bd0a404c 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -6,12 +6,10 @@ #include -#include "layouts/full.dtsi" -#include "layouts/jian.dtsi" -#include "layouts/6column.dtsi" +#include "jiran-layouts.dtsi" &ladniy_jiran_full_layout { - transform = <&default_transform>; + transform = <&jiran_transform>; }; &kgoh_jian_full_layout { @@ -28,7 +26,7 @@ zmk,physical-layout = &ladniy_jiran_full_layout; }; - default_transform: keymap_transform_0 { + jiran_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; rows = <5>; diff --git a/app/boards/shields/jiran/jiran_right.overlay b/app/boards/shields/jiran/jiran_right.overlay index 668c55139ce..d2c067237e1 100644 --- a/app/boards/shields/jiran/jiran_right.overlay +++ b/app/boards/shields/jiran/jiran_right.overlay @@ -6,7 +6,7 @@ #include "jiran.dtsi" -&default_transform { +&jiran_transform { col-offset = <6>; }; diff --git a/app/boards/shields/jiran/layouts/6column.dtsi b/app/boards/shields/jiran/layouts/6column.dtsi deleted file mode 100644 index 56e5d32f4a6..00000000000 --- a/app/boards/shields/jiran/layouts/6column.dtsi +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -#include "position_map.dtsi" - -&layouts_kgoh_jian_position_map { - status = "disabled"; -}; - -&layouts_ladniy_jiran_position_map { - ladniy_jiran_6col_posmap: six { - physical-layout = <&kgoh_jian_6col_layout>; - positions - = < 42 43 44 45 46 47 48 49 50 51 52 53 > - , <54 0 1 2 3 4 5 6 7 8 9 10 11 55> - , < 12 13 14 15 16 17 18 19 20 21 22 23 > - , < 24 25 26 27 28 29 30 31 32 33 34 35 > - , < 36 37 38 39 40 41 >; - }; -}; diff --git a/app/boards/shields/jiran/layouts/jian.dtsi b/app/boards/shields/jiran/layouts/jian.dtsi deleted file mode 100644 index 0fefcfce27b..00000000000 --- a/app/boards/shields/jiran/layouts/jian.dtsi +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include - -#include "position_map.dtsi" - -&kgoh_jian_full_layout { - display-name = "Jian (with pinky)"; -}; - -&layouts_kgoh_jian_position_map { - status = "disabled"; -}; - -&layouts_ladniy_jiran_position_map { - ladniy_jiran_jian_posmap: jian { - physical-layout = <&kgoh_jian_full_layout>; - positions - = < 44 45 46 47 48 49 50 51 52 53 54 55 > - , < 0 1 2 3 4 5 6 7 8 9 10 11 12 13> - , < 14 15 16 17 18 19 20 21 22 23 24 25 > - , < 26 27 28 29 30 31 32 33 34 35 36 37 > - , < 38 39 40 41 42 43 >; - }; -}; diff --git a/app/boards/shields/jiran/layouts/position_map.dtsi b/app/boards/shields/jiran/layouts/position_map.dtsi deleted file mode 100644 index 26f63d8e122..00000000000 --- a/app/boards/shields/jiran/layouts/position_map.dtsi +++ /dev/null @@ -1,7 +0,0 @@ -/ { - layouts_ladniy_jiran_position_map: layouts_ladniy_jiran_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - }; -}; diff --git a/app/boards/shields/jorne/layouts/full.dtsi b/app/boards/shields/jorne/jorne-layouts.dtsi similarity index 84% rename from app/boards/shields/jorne/layouts/full.dtsi rename to app/boards/shields/jorne/jorne-layouts.dtsi index 545122981da..0a5258977b8 100644 --- a/app/boards/shields/jorne/layouts/full.dtsi +++ b/app/boards/shields/jorne/jorne-layouts.dtsi @@ -1,6 +1,33 @@ +#include +#include #include -#include "position_map.dtsi" +&layouts_foostan_corne_position_map { + joric_jorne_full_posmap: full { + physical-layout = <&joric_jorne_full_layout>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13> + , < 14 15 16 17 18 19 20 21 22 23 24 25 > + , < 26 27 28 29 30 31 32 33 34 35 36 37 > + , < 38 39 40 41 42 43 >; + }; +}; + +&foostan_corne_6col_posmap { + positions + = <42 0 1 2 3 4 5 6 7 8 9 10 11 43> + , < 12 13 14 15 16 17 18 19 20 21 22 23 > + , < 24 25 26 27 28 29 30 31 32 33 34 35 > + , < 36 37 38 39 40 41 >; +}; + +&foostan_corne_5col_posmap { + positions + = <36 37 0 1 2 3 4 5 6 7 8 9 38 39> + , < 40 10 11 12 13 14 15 16 17 18 19 41 > + , < 42 20 21 22 23 24 25 26 27 28 29 43 > + , < 30 31 32 33 34 35 >; +}; / { joric_jorne_full_layout: joric_jorne_full_layout { @@ -55,14 +82,3 @@ ; }; }; - -&layouts_joric_jorne_position_map { - joric_jorne_full_posmap: full { - physical-layout = <&joric_jorne_full_layout>; - positions - = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13> - , < 14 15 16 17 18 19 20 21 22 23 24 25 > - , < 26 27 28 29 30 31 32 33 34 35 36 37 > - , < 38 39 40 41 42 43 >; - }; -}; diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index 483b47e41e6..d76c87dceeb 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -6,12 +6,10 @@ #include -#include "layouts/full.dtsi" -#include "layouts/6column.dtsi" -#include "layouts/5column.dtsi" +#include "jorne-layouts.dtsi" &joric_jorne_full_layout { - transform = <&default_transform>; + transform = <&jorne_transform>; }; &foostan_corne_6col_layout { @@ -29,7 +27,7 @@ zmk,physical-layout = &joric_jorne_full_layout; }; - default_transform: keymap_transform_0 { + jorne_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; rows = <4>; diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 604f4816205..6c4b3329372 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -6,7 +6,7 @@ #include "jorne.dtsi" -&default_transform { +&jorne_transform { col-offset = <6>; }; diff --git a/app/boards/shields/jorne/layouts/5column.dtsi b/app/boards/shields/jorne/layouts/5column.dtsi deleted file mode 100644 index d9f0f4827a1..00000000000 --- a/app/boards/shields/jorne/layouts/5column.dtsi +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -#include "position_map.dtsi" - -&layouts_foostan_corne_position_map { - status = "disabled"; -}; - -&layouts_joric_jorne_position_map { - joric_jorne_5col_posmap: five { - physical-layout = <&foostan_corne_5col_layout>; - positions - = <36 37 0 1 2 3 4 5 6 7 8 9 38 39> - , < 40 10 11 12 13 14 15 16 17 18 19 41 > - , < 42 20 21 22 23 24 25 26 27 28 29 43 > - , < 30 31 32 33 34 35 >; - }; -}; diff --git a/app/boards/shields/jorne/layouts/6column.dtsi b/app/boards/shields/jorne/layouts/6column.dtsi deleted file mode 100644 index 65d4fa8543a..00000000000 --- a/app/boards/shields/jorne/layouts/6column.dtsi +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -#include "position_map.dtsi" - -&layouts_foostan_corne_position_map { - status = "disabled"; -}; - -&layouts_joric_jorne_position_map { - joric_jorne_6col_posmap: six { - physical-layout = <&foostan_corne_6col_layout>; - positions - = <42 0 1 2 3 4 5 6 7 8 9 10 11 43> - , < 12 13 14 15 16 17 18 19 20 21 22 23 > - , < 24 25 26 27 28 29 30 31 32 33 34 35 > - , < 36 37 38 39 40 41 >; - }; -}; diff --git a/app/boards/shields/jorne/layouts/position_map.dtsi b/app/boards/shields/jorne/layouts/position_map.dtsi deleted file mode 100644 index 6d183e0be9d..00000000000 --- a/app/boards/shields/jorne/layouts/position_map.dtsi +++ /dev/null @@ -1,7 +0,0 @@ -/ { - layouts_joric_jorne_position_map: layouts_joric_jorne_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - }; -}; diff --git a/app/boards/shields/kyria/kyria-layout.dtsi b/app/boards/shields/kyria/kyria-layouts.dtsi similarity index 100% rename from app/boards/shields/kyria/kyria-layout.dtsi rename to app/boards/shields/kyria/kyria-layouts.dtsi diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 661d1ff506e..f2d7b9beabb 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -6,7 +6,7 @@ #include -#include "kyria-layout.dtsi" +#include "kyria-layouts.dtsi" / { chosen { diff --git a/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi b/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi new file mode 100644 index 00000000000..e5b752db8e4 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi @@ -0,0 +1,27 @@ +#include + +/ { + matrix_physical_layout: matrix_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Matrix Layout"; + + keys + = <&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> + ; + }; + + direct_physical_layout: direct_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Direct Wire Layout"; + + keys + = <&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> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.dtsi b/app/boards/shields/zmk_uno/zmk_uno.dtsi index 9ea625a420f..26451cf9be2 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.dtsi +++ b/app/boards/shields/zmk_uno/zmk_uno.dtsi @@ -6,6 +6,8 @@ #include #include +#include "zmk_uno-layouts.dtsi" + &arduino_i2c { status = "okay"; @@ -135,3 +137,13 @@ nice_view_spi: &arduino_spi { b-gpios = <&arduino_header 14 GPIO_PULL_UP>; }; }; + +&matrix_physical_layout { + kscan = <&kscan_matrix>; + transform = <&matrix_transform>; +}; + +&direct_physical_layout { + kscan = <&kscan_direct>; + transform = <&direct_matrix_transform>; +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 2a8eb26635a..3516611a3ec 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -4,10 +4,9 @@ * SPDX-License-Identifier: MIT */ - #include "zmk_uno.dtsi" +#include "zmk_uno.dtsi" #include -#include #include #include @@ -59,36 +58,4 @@ bindings = <&ble_one>; }; }; - - matrix_physical_layout: matrix_physical_layout { - compatible = "zmk,physical-layout"; - display-name = "Matrix Layout"; - - kscan = <&kscan_matrix>; - transform = <&matrix_transform>; - - keys - = <&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> - ; - }; - - direct_physical_layout: direct_physical_layout { - compatible = "zmk,physical-layout"; - - display-name = "Direct Wire Layout"; - - kscan = <&kscan_direct>; - transform = <&direct_matrix_transform>; - - keys - = <&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/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi b/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi new file mode 100644 index 00000000000..7a0c493493c --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi @@ -0,0 +1,37 @@ +#include + +/ { + split_matrix_physical_layout: matrix_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Matrix Layout"; + + keys + = <&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> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + ; + }; + + split_direct_physical_layout: direct_physical_layout { + compatible = "zmk,physical-layout"; + + display-name = "Direct Wire Layout"; + + keys + = <&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> + , <&key_physical_attrs 100 100 0 200 0 0 0> + , <&key_physical_attrs 100 100 100 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 0 0 0> + ; + }; + +}; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno_split.dtsi b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi index 9afbf79a4ae..cd911555b90 100644 --- a/app/boards/shields/zmk_uno/zmk_uno_split.dtsi +++ b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi @@ -4,17 +4,16 @@ * SPDX-License-Identifier: MIT */ - #include "zmk_uno.dtsi" +#include "zmk_uno.dtsi" +#include "zmk_uno_split-layouts.dtsi" - #include - - left_encoder: &encoder { +left_encoder: &encoder { status = "disabled"; - }; +}; - / { +/ { chosen { - zmk,physical-layout = &matrix_physical_layout; + zmk,physical-layout = &split_matrix_physical_layout; }; split_matrix_transform: split_matrix_transform { @@ -45,45 +44,6 @@ >; }; - matrix_physical_layout: matrix_physical_layout { - compatible = "zmk,physical-layout"; - display-name = "Matrix Layout"; - - kscan = <&kscan_matrix>; - transform = <&split_matrix_transform>; - - keys - = <&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> - , <&key_physical_attrs 100 100 0 200 0 0 0> - , <&key_physical_attrs 100 100 100 200 0 0 0> - , <&key_physical_attrs 100 100 0 300 0 0 0> - , <&key_physical_attrs 100 100 100 300 0 0 0> - ; - }; - - direct_physical_layout: direct_physical_layout { - compatible = "zmk,physical-layout"; - - display-name = "Direct Wire Layout"; - - kscan = <&kscan_direct>; - transform = <&split_direct_matrix_transform>; - - keys - = <&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> - , <&key_physical_attrs 100 100 0 200 0 0 0> - , <&key_physical_attrs 100 100 100 200 0 0 0> - , <&key_physical_attrs 100 100 0 300 0 0 0> - , <&key_physical_attrs 100 100 100 300 0 0 0> - ; - }; - right_encoder: right_encoder { steps = <80>; status = "disabled"; @@ -97,4 +57,14 @@ sensors = <&encoder &right_encoder>; triggers-per-rotation = <20>; }; - }; +}; + +&split_matrix_physical_layout { + kscan = <&kscan_matrix>; + transform = <&split_matrix_transform>; +}; + +&split_direct_physical_layout { + kscan = <&kscan_direct>; + transform = <&split_direct_matrix_transform>; +}; \ No newline at end of file diff --git a/app/dts/layouts/foostan/corne/5column.dtsi b/app/dts/layouts/foostan/corne/5column.dtsi index fe2cd4d196e..72d52a6010b 100644 --- a/app/dts/layouts/foostan/corne/5column.dtsi +++ b/app/dts/layouts/foostan/corne/5column.dtsi @@ -48,7 +48,7 @@ }; &layouts_foostan_corne_position_map { - foostan_corne_5col_posmap: five_column { + foostan_corne_5col_posmap: five { physical-layout = <&foostan_corne_5col_layout>; positions = <36 0 1 2 3 4 5 6 7 8 9 37>