feat(shields): Add Studio support to boardsource3x4 (#3154)

* feat(shields): Add Studio support to boardsource3x4

* rename default transform

* add position maps
This commit is contained in:
snoyer
2025-12-28 12:32:42 +04:00
committed by GitHub
parent a9e0befcb6
commit 40e06f3c00
4 changed files with 107 additions and 3 deletions

View File

@@ -1,14 +1,47 @@
/*
* Copyright (c) 2020 The ZMK Contributors
* Copyright (c) 2025 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
#include "boardsource3x4-layouts.dtsi"
&horizontal_physical_layout {
transform = <&horizontal_transform>;
};
&vertical_physical_layout {
transform = <&vertical_transform>;
};
/ {
chosen {
zmk,kscan = &kscan0;
zmk,physical-layout = &horizontal_physical_layout;
};
horizontal_transform: horizontal_transform {
compatible = "zmk,matrix-transform";
columns = <4>;
rows = <3>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3)
RC(1,0) RC(1,1) RC(1,2) RC(1,3)
RC(2,0) RC(2,1) RC(2,2) RC(2,3)
>;
};
vertical_transform: vertical_transform {
compatible = "zmk,matrix-transform";
columns = <4>;
rows = <3>;
map = <
RC(0,3) RC(1,3) RC(2,3)
RC(0,2) RC(1,2) RC(2,2)
RC(0,1) RC(1,1) RC(2,1)
RC(0,0) RC(1,0) RC(2,0)
>;
};
kscan0: kscan {