Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(shields): Add physical layout for Lotus58 #2753

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions app/boards/shields/lotus58/lotus58-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#include <physical_layouts.dtsi>

/ {
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 37 0 0 0>
, <&key_physical_attrs 100 100 200 12 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 12 0 0 0>
, <&key_physical_attrs 100 100 500 25 0 0 0>
, <&key_physical_attrs 100 100 1050 25 0 0 0>
, <&key_physical_attrs 100 100 1150 12 0 0 0>
, <&key_physical_attrs 100 100 1250 0 0 0 0>
, <&key_physical_attrs 100 100 1350 12 0 0 0>
, <&key_physical_attrs 100 100 1450 37 0 0 0>
, <&key_physical_attrs 100 100 1550 50 0 0 0>
, <&key_physical_attrs 100 100 0 150 0 0 0>
, <&key_physical_attrs 100 100 100 137 0 0 0>
, <&key_physical_attrs 100 100 200 112 0 0 0>
, <&key_physical_attrs 100 100 300 100 0 0 0>
, <&key_physical_attrs 100 100 400 112 0 0 0>
, <&key_physical_attrs 100 100 500 125 0 0 0>
, <&key_physical_attrs 100 100 1050 125 0 0 0>
, <&key_physical_attrs 100 100 1150 112 0 0 0>
, <&key_physical_attrs 100 100 1250 100 0 0 0>
, <&key_physical_attrs 100 100 1350 112 0 0 0>
, <&key_physical_attrs 100 100 1450 137 0 0 0>
, <&key_physical_attrs 100 100 1550 150 0 0 0>
, <&key_physical_attrs 100 100 0 250 0 0 0>
, <&key_physical_attrs 100 100 100 237 0 0 0>
, <&key_physical_attrs 100 100 200 212 0 0 0>
, <&key_physical_attrs 100 100 300 200 0 0 0>
, <&key_physical_attrs 100 100 400 212 0 0 0>
, <&key_physical_attrs 100 100 500 225 0 0 0>
, <&key_physical_attrs 100 100 625 75 0 0 0>
, <&key_physical_attrs 100 100 925 75 0 0 0>
, <&key_physical_attrs 100 100 1050 225 0 0 0>
, <&key_physical_attrs 100 100 1150 212 0 0 0>
, <&key_physical_attrs 100 100 1250 200 0 0 0>
, <&key_physical_attrs 100 100 1350 212 0 0 0>
, <&key_physical_attrs 100 100 1450 237 0 0 0>
, <&key_physical_attrs 100 100 1550 250 0 0 0>
, <&key_physical_attrs 100 100 0 350 0 0 0>
, <&key_physical_attrs 100 100 100 337 0 0 0>
, <&key_physical_attrs 100 100 200 312 0 0 0>
, <&key_physical_attrs 100 100 300 300 0 0 0>
, <&key_physical_attrs 100 100 400 312 0 0 0>
, <&key_physical_attrs 100 100 500 325 0 0 0>
, <&key_physical_attrs 100 100 625 275 0 0 0>
, <&key_physical_attrs 100 100 925 275 0 0 0>
, <&key_physical_attrs 100 100 1050 325 0 0 0>
, <&key_physical_attrs 100 100 1150 312 0 0 0>
, <&key_physical_attrs 100 100 1250 300 0 0 0>
, <&key_physical_attrs 100 100 1350 312 0 0 0>
, <&key_physical_attrs 100 100 1450 337 0 0 0>
, <&key_physical_attrs 100 100 1550 350 0 0 0>
, <&key_physical_attrs 100 100 250 412 0 0 0>
, <&key_physical_attrs 100 100 350 415 0 0 0>
, <&key_physical_attrs 100 100 450 425 0 0 0>
, <&key_physical_attrs 100 150 575 400 3000 625 475>
, <&key_physical_attrs 100 150 975 400 (-3000) 1025 475>
, <&key_physical_attrs 100 100 1100 425 0 0 0>
, <&key_physical_attrs 100 100 1200 415 0 0 0>
, <&key_physical_attrs 100 100 1300 415 0 0 0>
;
};
};
10 changes: 8 additions & 2 deletions app/boards/shields/lotus58/lotus58.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@

#include <dt-bindings/zmk/matrix_transform.h>

#include "lotus58-layouts.dtsi"

/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
zmk,physical-layout = &physical_layout0;
};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <4>;
rows = <5>;
Nick-Munnich marked this conversation as resolved.
Show resolved Hide resolved
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 |
// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | SW30 | | SW30 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
Expand Down Expand Up @@ -68,6 +70,10 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7
};
};

&physical_layout0 {
transform = <&default_transform>;
};

&pro_micro_i2c {
status = "okay";

Expand Down
1 change: 1 addition & 0 deletions app/boards/shields/lotus58/lotus58.zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ features:
- keys
- display
- encoder
- studio
siblings:
- lotus58_left
- lotus58_right
Loading