diff --git a/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4_layout.dtsi b/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4_layout.dtsi new file mode 100644 index 0000000..8d10e75 --- /dev/null +++ b/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4_layout.dtsi @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2022-2024 alin m elena + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + m66_layout: m66_layout { + compatible = "zmk,physical-layout"; + display-name = "m66 default layout"; + transform = <&m66>; + keys // w h x y rot rx ry + = <&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 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 600 100 0 0 0> + , <&key_physical_attrs 100 100 700 100 0 0 0> + , <&key_physical_attrs 100 100 800 100 0 0 0> + , <&key_physical_attrs 100 100 900 100 0 0 0> + , <&key_physical_attrs 100 100 1000 100 0 0 0> + , <&key_physical_attrs 100 100 1100 100 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 0 0 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> + , <&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 600 200 0 0 0> + , <&key_physical_attrs 100 100 700 200 0 0 0> + , <&key_physical_attrs 100 100 800 200 0 0 0> + , <&key_physical_attrs 100 100 900 200 0 0 0> + , <&key_physical_attrs 100 100 1000 200 0 0 0> + , <&key_physical_attrs 100 100 1100 200 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 0 300 0 0 0> + , <&key_physical_attrs 100 100 100 300 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 600 300 0 0 0> + , <&key_physical_attrs 100 100 700 300 0 0 0> + , <&key_physical_attrs 100 100 800 300 0 0 0> + , <&key_physical_attrs 100 100 900 300 0 0 0> + , <&key_physical_attrs 100 100 1000 300 0 0 0> + , <&key_physical_attrs 100 100 1100 300 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 0 400 0 0 0> + , <&key_physical_attrs 100 100 100 400 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 600 400 0 0 0> + , <&key_physical_attrs 100 100 700 400 0 0 0> + , <&key_physical_attrs 100 100 800 400 0 0 0> + , <&key_physical_attrs 100 100 900 400 0 0 0> + , <&key_physical_attrs 100 100 1000 400 0 0 0> + , <&key_physical_attrs 100 100 1100 400 0 0 0> + , <&key_physical_attrs 100 100 1200 400 0 0 0> + , <&key_physical_attrs 100 100 0 500 0 0 0> + , <&key_physical_attrs 100 100 100 500 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 500 500 0 0 0> + , <&key_physical_attrs 100 100 600 500 0 0 0> + , <&key_physical_attrs 100 100 700 500 0 0 0> + , <&key_physical_attrs 100 100 800 500 0 0 0> + , <&key_physical_attrs 100 100 900 500 0 0 0> + , <&key_physical_attrs 100 100 1000 500 0 0 0> + , <&key_physical_attrs 100 100 1100 500 0 0 0> + , <&key_physical_attrs 100 100 1200 500 0 0 0> + ; + }; + + m66_position_map { + compatible = "zmk,physical-layout-position-map"; + complete; + m66_layout_posmap: m66_layout { + physical-layout = <&m66_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 56 57 58 59 60 61 62 63 64 65> + ; + }; + }; + + m66: m66_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; +/* +┌────┐ +│ 0N │ +├────┼────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ +│ 0A │ 0B │ 0C │ 0D │ 0E │ 0F │ 0G │ 0H │ 0I │ 0J │ 0K │ 0L │ 0M │ +├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +│ 1A │ 1B │ 1C │ 1D │ 1E │ 1F │ 1G │ 1H │ 1I │ 1J │ 1K │ 1L │ 1M │ +├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +│ 2A │ 2B │ 2C │ 2D │ 2E │ 2F │ 2G │ 2H │ 2I │ 2J │ 2K │ 2L │ 2M │ +├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +│ 3A │ 3B │ 3C │ 3D │ 3E │ 3F │ 3G │ 3H │ 3I │ 3J │ 3K │ 3L │ 3M │ +├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +│ 4A │ 4B │ 4C │ 4D │ 4E │ 4F │ 4G │ 4H │ 4I │ 4J │ 4K │ 4L │ 4M │ +└────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘ + +*/ + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) +RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) + >; + }; +};