From 99b85064371097a37c2c9eca746026a5e79b5600 Mon Sep 17 00:00:00 2001 From: Nicolas Munnich Date: Tue, 5 Nov 2024 15:29:33 +0100 Subject: refactor: new physical layouts convention --- app/boards/arm/adv360pro/adv360pro-layouts.dtsi | 87 +++++++++++++ app/boards/arm/adv360pro/adv360pro.dtsi | 99 ++------------- app/boards/arm/adv360pro/adv360pro_right.dts | 2 +- app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi | 20 +++ app/boards/arm/bdn9/bdn9_rev2.dts | 34 ++--- app/boards/arm/ferris/ferris_rev02.dts | 9 +- app/boards/arm/glove80/glove80-layouts.dtsi | 91 ++++++++++++++ app/boards/arm/glove80/glove80.dtsi | 100 ++------------- app/boards/arm/glove80/glove80_rh.dts | 2 +- .../shields/hummingbird/hummingbird-layouts.dtsi | 41 ++++++ app/boards/shields/hummingbird/hummingbird.overlay | 50 +------- app/boards/shields/jiran/jiran-layouts.dtsi | 103 ++++++++++++++++ app/boards/shields/jiran/jiran.dtsi | 8 +- app/boards/shields/jiran/jiran_right.overlay | 2 +- app/boards/shields/jiran/layouts/6column.dtsi | 20 --- app/boards/shields/jiran/layouts/full.dtsi | 81 ------------ app/boards/shields/jiran/layouts/jian.dtsi | 24 ---- app/boards/shields/jiran/layouts/position_map.dtsi | 7 -- app/boards/shields/jorne/jorne-layouts.dtsi | 84 +++++++++++++ app/boards/shields/jorne/jorne.dtsi | 8 +- app/boards/shields/jorne/jorne_right.overlay | 2 +- app/boards/shields/jorne/layouts/5column.dtsi | 19 --- app/boards/shields/jorne/layouts/6column.dtsi | 19 --- app/boards/shields/jorne/layouts/full.dtsi | 68 ---------- app/boards/shields/jorne/layouts/position_map.dtsi | 7 -- app/boards/shields/kyria/kyria-layout.dtsi | 137 --------------------- app/boards/shields/kyria/kyria-layouts.dtsi | 137 +++++++++++++++++++++ app/boards/shields/kyria/kyria_common.dtsi | 2 +- app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi | 27 ++++ app/boards/shields/zmk_uno/zmk_uno.dtsi | 12 ++ app/boards/shields/zmk_uno/zmk_uno.overlay | 35 +----- .../shields/zmk_uno/zmk_uno_split-layouts.dtsi | 37 ++++++ app/boards/shields/zmk_uno/zmk_uno_split.dtsi | 64 +++------- app/dts/layouts/foostan/corne/5column.dtsi | 2 +- 34 files changed, 704 insertions(+), 736 deletions(-) create mode 100644 app/boards/arm/adv360pro/adv360pro-layouts.dtsi create mode 100644 app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi create mode 100644 app/boards/arm/glove80/glove80-layouts.dtsi create mode 100644 app/boards/shields/hummingbird/hummingbird-layouts.dtsi create mode 100644 app/boards/shields/jiran/jiran-layouts.dtsi delete mode 100644 app/boards/shields/jiran/layouts/6column.dtsi delete mode 100644 app/boards/shields/jiran/layouts/full.dtsi delete mode 100644 app/boards/shields/jiran/layouts/jian.dtsi delete mode 100644 app/boards/shields/jiran/layouts/position_map.dtsi create mode 100644 app/boards/shields/jorne/jorne-layouts.dtsi delete mode 100644 app/boards/shields/jorne/layouts/5column.dtsi delete mode 100644 app/boards/shields/jorne/layouts/6column.dtsi delete mode 100644 app/boards/shields/jorne/layouts/full.dtsi delete mode 100644 app/boards/shields/jorne/layouts/position_map.dtsi delete mode 100644 app/boards/shields/kyria/kyria-layout.dtsi create mode 100644 app/boards/shields/kyria/kyria-layouts.dtsi create mode 100644 app/boards/shields/zmk_uno/zmk_uno-layouts.dtsi create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split-layouts.dtsi diff --git a/app/boards/arm/adv360pro/adv360pro-layouts.dtsi b/app/boards/arm/adv360pro/adv360pro-layouts.dtsi new file mode 100644 index 0000000000..7970e1be3b --- /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 b979e9a573..ca7eaacca0 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 748cc42aeb..3c96f3a176 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 0000000000..bc0f552794 --- /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 6274b83416..389d23b7de 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 235a92e458..b649129b20 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 0000000000..0c4f2d4e6d --- /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 fdf890adc5..ae76016320 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 6f108d7476..cc8104c7d9 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 0000000000..bfae822402 --- /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 b077804e5b..2efc263b13 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/jiran-layouts.dtsi b/app/boards/shields/jiran/jiran-layouts.dtsi new file mode 100644 index 0000000000..b56c772565 --- /dev/null +++ b/app/boards/shields/jiran/jiran-layouts.dtsi @@ -0,0 +1,103 @@ +#include +#include +#include + +&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 { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky/numbers)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 62 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 600 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 62 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 162 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 600 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 162 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 1600 250 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 262 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 600 237 0 0 0> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 262 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 100 375 0 0 0> + , <&key_physical_attrs 100 100 200 362 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 600 337 0 0 0> + , <&key_physical_attrs 100 100 1000 337 0 0 0> + , <&key_physical_attrs 100 100 1100 325 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 325 0 0 0> + , <&key_physical_attrs 100 100 1400 362 0 0 0> + , <&key_physical_attrs 100 100 1500 375 0 0 0> + , <&key_physical_attrs 100 100 500 425 0 0 0> + , <&key_physical_attrs 100 100 600 437 0 0 0> + , <&key_physical_attrs 100 100 700 450 0 0 0> + , <&key_physical_attrs 100 100 900 450 0 0 0> + , <&key_physical_attrs 100 100 1000 437 0 0 0> + , <&key_physical_attrs 100 100 1100 425 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index d760de17c7..0e0bd0a404 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 668c55139c..d2c067237e 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 56e5d32f4a..0000000000 --- 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/full.dtsi b/app/boards/shields/jiran/layouts/full.dtsi deleted file mode 100644 index 205c53fef5..0000000000 --- a/app/boards/shields/jiran/layouts/full.dtsi +++ /dev/null @@ -1,81 +0,0 @@ -#include - -#include "position_map.dtsi" - -/ { - ladniy_jiran_full_layout: ladniy_jiran_full_layout { - compatible = "zmk,physical-layout"; - display-name = "Full (with pinky/numbers)"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 100 75 0 0 0> - , <&key_physical_attrs 100 100 200 62 0 0 0> - , <&key_physical_attrs 100 100 300 25 0 0 0> - , <&key_physical_attrs 100 100 400 0 0 0 0> - , <&key_physical_attrs 100 100 500 25 0 0 0> - , <&key_physical_attrs 100 100 600 37 0 0 0> - , <&key_physical_attrs 100 100 1000 37 0 0 0> - , <&key_physical_attrs 100 100 1100 25 0 0 0> - , <&key_physical_attrs 100 100 1200 0 0 0 0> - , <&key_physical_attrs 100 100 1300 25 0 0 0> - , <&key_physical_attrs 100 100 1400 62 0 0 0> - , <&key_physical_attrs 100 100 1500 75 0 0 0> - , <&key_physical_attrs 100 100 0 250 0 0 0> - , <&key_physical_attrs 100 100 100 175 0 0 0> - , <&key_physical_attrs 100 100 200 162 0 0 0> - , <&key_physical_attrs 100 100 300 125 0 0 0> - , <&key_physical_attrs 100 100 400 100 0 0 0> - , <&key_physical_attrs 100 100 500 125 0 0 0> - , <&key_physical_attrs 100 100 600 137 0 0 0> - , <&key_physical_attrs 100 100 1000 137 0 0 0> - , <&key_physical_attrs 100 100 1100 125 0 0 0> - , <&key_physical_attrs 100 100 1200 100 0 0 0> - , <&key_physical_attrs 100 100 1300 125 0 0 0> - , <&key_physical_attrs 100 100 1400 162 0 0 0> - , <&key_physical_attrs 100 100 1500 175 0 0 0> - , <&key_physical_attrs 100 100 1600 250 0 0 0> - , <&key_physical_attrs 100 100 100 275 0 0 0> - , <&key_physical_attrs 100 100 200 262 0 0 0> - , <&key_physical_attrs 100 100 300 225 0 0 0> - , <&key_physical_attrs 100 100 400 200 0 0 0> - , <&key_physical_attrs 100 100 500 225 0 0 0> - , <&key_physical_attrs 100 100 600 237 0 0 0> - , <&key_physical_attrs 100 100 1000 237 0 0 0> - , <&key_physical_attrs 100 100 1100 225 0 0 0> - , <&key_physical_attrs 100 100 1200 200 0 0 0> - , <&key_physical_attrs 100 100 1300 225 0 0 0> - , <&key_physical_attrs 100 100 1400 262 0 0 0> - , <&key_physical_attrs 100 100 1500 275 0 0 0> - , <&key_physical_attrs 100 100 100 375 0 0 0> - , <&key_physical_attrs 100 100 200 362 0 0 0> - , <&key_physical_attrs 100 100 300 325 0 0 0> - , <&key_physical_attrs 100 100 400 300 0 0 0> - , <&key_physical_attrs 100 100 500 325 0 0 0> - , <&key_physical_attrs 100 100 600 337 0 0 0> - , <&key_physical_attrs 100 100 1000 337 0 0 0> - , <&key_physical_attrs 100 100 1100 325 0 0 0> - , <&key_physical_attrs 100 100 1200 300 0 0 0> - , <&key_physical_attrs 100 100 1300 325 0 0 0> - , <&key_physical_attrs 100 100 1400 362 0 0 0> - , <&key_physical_attrs 100 100 1500 375 0 0 0> - , <&key_physical_attrs 100 100 500 425 0 0 0> - , <&key_physical_attrs 100 100 600 437 0 0 0> - , <&key_physical_attrs 100 100 700 450 0 0 0> - , <&key_physical_attrs 100 100 900 450 0 0 0> - , <&key_physical_attrs 100 100 1000 437 0 0 0> - , <&key_physical_attrs 100 100 1100 425 0 0 0> - ; - }; -}; - -&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/layouts/jian.dtsi b/app/boards/shields/jiran/layouts/jian.dtsi deleted file mode 100644 index 0fefcfce27..0000000000 --- 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 26f63d8e12..0000000000 --- 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/jorne-layouts.dtsi b/app/boards/shields/jorne/jorne-layouts.dtsi new file mode 100644 index 0000000000..0a5258977b --- /dev/null +++ b/app/boards/shields/jorne/jorne-layouts.dtsi @@ -0,0 +1,84 @@ +#include +#include +#include + +&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 { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 112 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 37 0 0 0> + , <&key_physical_attrs 100 100 300 12 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 12 0 0 0> + , <&key_physical_attrs 100 100 600 24 0 0 0> + , <&key_physical_attrs 100 100 900 24 0 0 0> + , <&key_physical_attrs 100 100 1000 12 0 0 0> + , <&key_physical_attrs 100 100 1100 0 0 0 0> + , <&key_physical_attrs 100 100 1200 12 0 0 0> + , <&key_physical_attrs 100 100 1300 37 0 0 0> + , <&key_physical_attrs 100 100 1400 37 0 0 0> + , <&key_physical_attrs 100 100 1500 112 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 137 0 0 0> + , <&key_physical_attrs 100 100 300 112 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 112 0 0 0> + , <&key_physical_attrs 100 100 600 124 0 0 0> + , <&key_physical_attrs 100 100 900 124 0 0 0> + , <&key_physical_attrs 100 100 1000 112 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 112 0 0 0> + , <&key_physical_attrs 100 100 1300 137 0 0 0> + , <&key_physical_attrs 100 100 1400 137 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 237 0 0 0> + , <&key_physical_attrs 100 100 300 212 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 212 0 0 0> + , <&key_physical_attrs 100 100 600 224 0 0 0> + , <&key_physical_attrs 100 100 900 224 0 0 0> + , <&key_physical_attrs 100 100 1000 212 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 1200 212 0 0 0> + , <&key_physical_attrs 100 100 1300 237 0 0 0> + , <&key_physical_attrs 100 100 1400 237 0 0 0> + , <&key_physical_attrs 100 100 450 312 0 0 0> + , <&key_physical_attrs 100 100 550 312 1200 550 412> + , <&key_physical_attrs 100 150 648 283 2400 648 433> + , <&key_physical_attrs 100 150 852 283 (-2400) 952 433> + , <&key_physical_attrs 100 100 950 312 (-1200) 1050 412> + , <&key_physical_attrs 100 100 1050 312 0 0 0> + ; + }; +}; diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index 483b47e41e..d76c87dcee 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 604f481620..6c4b332937 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 d9f0f4827a..0000000000 --- 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 65d4fa8543..0000000000 --- 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/full.dtsi b/app/boards/shields/jorne/layouts/full.dtsi deleted file mode 100644 index 545122981d..0000000000 --- a/app/boards/shields/jorne/layouts/full.dtsi +++ /dev/null @@ -1,68 +0,0 @@ -#include - -#include "position_map.dtsi" - -/ { - joric_jorne_full_layout: joric_jorne_full_layout { - compatible = "zmk,physical-layout"; - display-name = "Full (with pinky)"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 112 0 0 0> - , <&key_physical_attrs 100 100 100 37 0 0 0> - , <&key_physical_attrs 100 100 200 37 0 0 0> - , <&key_physical_attrs 100 100 300 12 0 0 0> - , <&key_physical_attrs 100 100 400 0 0 0 0> - , <&key_physical_attrs 100 100 500 12 0 0 0> - , <&key_physical_attrs 100 100 600 24 0 0 0> - , <&key_physical_attrs 100 100 900 24 0 0 0> - , <&key_physical_attrs 100 100 1000 12 0 0 0> - , <&key_physical_attrs 100 100 1100 0 0 0 0> - , <&key_physical_attrs 100 100 1200 12 0 0 0> - , <&key_physical_attrs 100 100 1300 37 0 0 0> - , <&key_physical_attrs 100 100 1400 37 0 0 0> - , <&key_physical_attrs 100 100 1500 112 0 0 0> - , <&key_physical_attrs 100 100 100 137 0 0 0> - , <&key_physical_attrs 100 100 200 137 0 0 0> - , <&key_physical_attrs 100 100 300 112 0 0 0> - , <&key_physical_attrs 100 100 400 100 0 0 0> - , <&key_physical_attrs 100 100 500 112 0 0 0> - , <&key_physical_attrs 100 100 600 124 0 0 0> - , <&key_physical_attrs 100 100 900 124 0 0 0> - , <&key_physical_attrs 100 100 1000 112 0 0 0> - , <&key_physical_attrs 100 100 1100 100 0 0 0> - , <&key_physical_attrs 100 100 1200 112 0 0 0> - , <&key_physical_attrs 100 100 1300 137 0 0 0> - , <&key_physical_attrs 100 100 1400 137 0 0 0> - , <&key_physical_attrs 100 100 100 237 0 0 0> - , <&key_physical_attrs 100 100 200 237 0 0 0> - , <&key_physical_attrs 100 100 300 212 0 0 0> - , <&key_physical_attrs 100 100 400 200 0 0 0> - , <&key_physical_attrs 100 100 500 212 0 0 0> - , <&key_physical_attrs 100 100 600 224 0 0 0> - , <&key_physical_attrs 100 100 900 224 0 0 0> - , <&key_physical_attrs 100 100 1000 212 0 0 0> - , <&key_physical_attrs 100 100 1100 200 0 0 0> - , <&key_physical_attrs 100 100 1200 212 0 0 0> - , <&key_physical_attrs 100 100 1300 237 0 0 0> - , <&key_physical_attrs 100 100 1400 237 0 0 0> - , <&key_physical_attrs 100 100 450 312 0 0 0> - , <&key_physical_attrs 100 100 550 312 1200 550 412> - , <&key_physical_attrs 100 150 648 283 2400 648 433> - , <&key_physical_attrs 100 150 852 283 (-2400) 952 433> - , <&key_physical_attrs 100 100 950 312 (-1200) 1050 412> - , <&key_physical_attrs 100 100 1050 312 0 0 0> - ; - }; -}; - -&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/layouts/position_map.dtsi b/app/boards/shields/jorne/layouts/position_map.dtsi deleted file mode 100644 index 6d183e0be9..0000000000 --- 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-layout.dtsi deleted file mode 100644 index 4c0c37e7c1..0000000000 --- a/app/boards/shields/kyria/kyria-layout.dtsi +++ /dev/null @@ -1,137 +0,0 @@ -#include - -/ { - splitkb_kyria_6col_layout: splitkb_kyria_6col_layout { - compatible = "zmk,physical-layout"; - display-name = "6 Column"; - - keys // w h x y rot rx ry - = <&key_physical_attrs 100 100 0 75 0 0 0> - , <&key_physical_attrs 100 100 100 75 0 0 0> - , <&key_physical_attrs 100 100 200 25 0 0 0> - , <&key_physical_attrs 100 100 300 0 0 0 0> - , <&key_physical_attrs 100 100 400 25 0 0 0> - , <&key_physical_attrs 100 100 500 37 0 0 0> - , <&key_physical_attrs 100 100 1100 37 0 0 0> - , <&key_physical_attrs 100 100 1200 25 0 0 0> - , <&key_physical_attrs 100 100 1300 0 0 0 0> - , <&key_physical_attrs 100 100 1400 25 0 0 0> - , <&key_physical_attrs 100 100 1500 75 0 0 0> - , <&key_physical_attrs 100 100 1600 75 0 0 0> - , <&key_physical_attrs 100 100 0 175 0 0 0> - , <&key_physical_attrs 100 100 100 175 0 0 0> - , <&key_physical_attrs 100 100 200 125 0 0 0> - , <&key_physical_attrs 100 100 300 100 0 0 0> - , <&key_physical_attrs 100 100 400 125 0 0 0> - , <&key_physical_attrs 100 100 500 137 0 0 0> - , <&key_physical_attrs 100 100 1100 137 0 0 0> - , <&key_physical_attrs 100 100 1200 125 0 0 0> - , <&key_physical_attrs 100 100 1300 100 0 0 0> - , <&key_physical_attrs 100 100 1400 125 0 0 0> - , <&key_physical_attrs 100 100 1500 175 0 0 0> - , <&key_physical_attrs 100 100 1600 175 0 0 0> - , <&key_physical_attrs 100 100 0 275 0 0 0> - , <&key_physical_attrs 100 100 100 275 0 0 0> - , <&key_physical_attrs 100 100 200 225 0 0 0> - , <&key_physical_attrs 100 100 300 200 0 0 0> - , <&key_physical_attrs 100 100 400 225 0 0 0> - , <&key_physical_attrs 100 100 500 237 0 0 0> - , <&key_physical_attrs 100 100 350 225 3000 400 792> - , <&key_physical_attrs 100 100 350 225 4500 400 792> - , <&key_physical_attrs 100 100 1250 225 (-4500) 1300 792> - , <&key_physical_attrs 100 100 1250 225 (-3000) 1300 792> - , <&key_physical_attrs 100 100 1100 237 0 0 0> - , <&key_physical_attrs 100 100 1200 225 0 0 0> - , <&key_physical_attrs 100 100 1300 200 0 0 0> - , <&key_physical_attrs 100 100 1400 225 0 0 0> - , <&key_physical_attrs 100 100 1500 275 0 0 0> - , <&key_physical_attrs 100 100 1600 275 0 0 0> - , <&key_physical_attrs 100 100 250 325 0 0 0> - , <&key_physical_attrs 100 100 350 325 0 0 0> - , <&key_physical_attrs 100 100 350 325 1500 400 792> - , <&key_physical_attrs 100 100 350 325 3000 400 792> - , <&key_physical_attrs 100 100 350 325 4500 400 792> - , <&key_physical_attrs 100 100 1250 325 (-4500) 1300 792> - , <&key_physical_attrs 100 100 1250 325 (-3000) 1300 792> - , <&key_physical_attrs 100 100 1250 325 (-1500) 1300 792> - , <&key_physical_attrs 100 100 1250 325 0 0 0> - , <&key_physical_attrs 100 100 1350 325 0 0 0> - ; - }; - - splitkb_kyria_5col_layout: splitkb_kyria_5col_layout { - compatible = "zmk,physical-layout"; - display-name = "5 Column"; - - 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 37 0 0 0> - , <&key_physical_attrs 100 100 1000 37 0 0 0> - , <&key_physical_attrs 100 100 1100 25 0 0 0> - , <&key_physical_attrs 100 100 1200 0 0 0 0> - , <&key_physical_attrs 100 100 1300 25 0 0 0> - , <&key_physical_attrs 100 100 1400 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 137 0 0 0> - , <&key_physical_attrs 100 100 1000 137 0 0 0> - , <&key_physical_attrs 100 100 1100 125 0 0 0> - , <&key_physical_attrs 100 100 1200 100 0 0 0> - , <&key_physical_attrs 100 100 1300 125 0 0 0> - , <&key_physical_attrs 100 100 1400 175 0 0 0> - , <&key_physical_attrs 100 100 0 275 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 400 237 0 0 0> - , <&key_physical_attrs 100 100 250 225 3000 300 792> - , <&key_physical_attrs 100 100 250 225 4500 300 792> - , <&key_physical_attrs 100 100 1150 225 (-4500) 1200 792> - , <&key_physical_attrs 100 100 1150 225 (-3000) 1200 792> - , <&key_physical_attrs 100 100 1000 237 0 0 0> - , <&key_physical_attrs 100 100 1100 225 0 0 0> - , <&key_physical_attrs 100 100 1200 200 0 0 0> - , <&key_physical_attrs 100 100 1300 225 0 0 0> - , <&key_physical_attrs 100 100 1400 275 0 0 0> - , <&key_physical_attrs 100 100 150 325 0 0 0> - , <&key_physical_attrs 100 100 250 325 0 0 0> - , <&key_physical_attrs 100 100 250 325 1500 300 792> - , <&key_physical_attrs 100 100 250 325 3000 300 792> - , <&key_physical_attrs 100 100 250 325 4500 300 792> - , <&key_physical_attrs 100 100 1150 325 (-4500) 1200 792> - , <&key_physical_attrs 100 100 1150 325 (-3000) 1200 792> - , <&key_physical_attrs 100 100 1150 325 (-1500) 1200 792> - , <&key_physical_attrs 100 100 1150 325 0 0 0> - , <&key_physical_attrs 100 100 1250 325 0 0 0> - ; - }; - - splitkb_kyria_position_map { - compatible = "zmk,physical-layout-position-map"; - - complete; - - twelve { - physical-layout = <&splitkb_kyria_6col_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 >; - }; - - ten { - physical-layout = <&splitkb_kyria_5col_layout>; - positions - = <44 0 1 2 3 4 5 6 7 8 9 47> - , <45 10 11 12 13 14 15 16 17 18 19 48> - , <46 20 21 22 23 24 25 26 27 28 29 30 31 32 33 49> - , < 34 35 36 37 38 39 40 41 42 43 >; - }; - }; -}; diff --git a/app/boards/shields/kyria/kyria-layouts.dtsi b/app/boards/shields/kyria/kyria-layouts.dtsi new file mode 100644 index 0000000000..4c0c37e7c1 --- /dev/null +++ b/app/boards/shields/kyria/kyria-layouts.dtsi @@ -0,0 +1,137 @@ +#include + +/ { + splitkb_kyria_6col_layout: splitkb_kyria_6col_layout { + compatible = "zmk,physical-layout"; + display-name = "6 Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 75 0 0 0> + , <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 25 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 25 0 0 0> + , <&key_physical_attrs 100 100 500 37 0 0 0> + , <&key_physical_attrs 100 100 1100 37 0 0 0> + , <&key_physical_attrs 100 100 1200 25 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1400 25 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 1600 75 0 0 0> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 125 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 125 0 0 0> + , <&key_physical_attrs 100 100 500 137 0 0 0> + , <&key_physical_attrs 100 100 1100 137 0 0 0> + , <&key_physical_attrs 100 100 1200 125 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1400 125 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 1600 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 225 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 225 0 0 0> + , <&key_physical_attrs 100 100 500 237 0 0 0> + , <&key_physical_attrs 100 100 350 225 3000 400 792> + , <&key_physical_attrs 100 100 350 225 4500 400 792> + , <&key_physical_attrs 100 100 1250 225 (-4500) 1300 792> + , <&key_physical_attrs 100 100 1250 225 (-3000) 1300 792> + , <&key_physical_attrs 100 100 1100 237 0 0 0> + , <&key_physical_attrs 100 100 1200 225 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1400 225 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 1600 275 0 0 0> + , <&key_physical_attrs 100 100 250 325 0 0 0> + , <&key_physical_attrs 100 100 350 325 0 0 0> + , <&key_physical_attrs 100 100 350 325 1500 400 792> + , <&key_physical_attrs 100 100 350 325 3000 400 792> + , <&key_physical_attrs 100 100 350 325 4500 400 792> + , <&key_physical_attrs 100 100 1250 325 (-4500) 1300 792> + , <&key_physical_attrs 100 100 1250 325 (-3000) 1300 792> + , <&key_physical_attrs 100 100 1250 325 (-1500) 1300 792> + , <&key_physical_attrs 100 100 1250 325 0 0 0> + , <&key_physical_attrs 100 100 1350 325 0 0 0> + ; + }; + + splitkb_kyria_5col_layout: splitkb_kyria_5col_layout { + compatible = "zmk,physical-layout"; + display-name = "5 Column"; + + 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 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 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 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 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 400 237 0 0 0> + , <&key_physical_attrs 100 100 250 225 3000 300 792> + , <&key_physical_attrs 100 100 250 225 4500 300 792> + , <&key_physical_attrs 100 100 1150 225 (-4500) 1200 792> + , <&key_physical_attrs 100 100 1150 225 (-3000) 1200 792> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 275 0 0 0> + , <&key_physical_attrs 100 100 150 325 0 0 0> + , <&key_physical_attrs 100 100 250 325 0 0 0> + , <&key_physical_attrs 100 100 250 325 1500 300 792> + , <&key_physical_attrs 100 100 250 325 3000 300 792> + , <&key_physical_attrs 100 100 250 325 4500 300 792> + , <&key_physical_attrs 100 100 1150 325 (-4500) 1200 792> + , <&key_physical_attrs 100 100 1150 325 (-3000) 1200 792> + , <&key_physical_attrs 100 100 1150 325 (-1500) 1200 792> + , <&key_physical_attrs 100 100 1150 325 0 0 0> + , <&key_physical_attrs 100 100 1250 325 0 0 0> + ; + }; + + splitkb_kyria_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + + twelve { + physical-layout = <&splitkb_kyria_6col_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 >; + }; + + ten { + physical-layout = <&splitkb_kyria_5col_layout>; + positions + = <44 0 1 2 3 4 5 6 7 8 9 47> + , <45 10 11 12 13 14 15 16 17 18 19 48> + , <46 20 21 22 23 24 25 26 27 28 29 30 31 32 33 49> + , < 34 35 36 37 38 39 40 41 42 43 >; + }; + }; +}; diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 661d1ff506..f2d7b9beab 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 0000000000..e5b752db8e --- /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 9ea625a420..26451cf9be 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 2a8eb26635..3516611a3e 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 0000000000..7a0c493493 --- /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 9afbf79a4a..cd911555b9 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 fe2cd4d196..72d52a6010 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> -- cgit v1.2.3