forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add shared layout .dtsi files to promote reuse.
* Add Corne and Ferris shared layouts, and update the respective shields to use them. * Add a sample Hummingbird physical layout for testing posix xiao.
- Loading branch information
1 parent
8fa827e
commit dcfcb22
Showing
5 changed files
with
253 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <physical_layouts.dtsi> | ||
|
||
/ { | ||
cuddlykeyboards_ferris_layout: cuddlykeyboards_ferris_layout { | ||
compatible = "zmk,physical-layout"; | ||
display-name = "Default"; | ||
|
||
transform = <&cuddlykeyboards_ferris_transform>; | ||
|
||
keys // w h x y rot rx ry | ||
= <&key_physical_attrs 100 100 0 95 0 0 0> | ||
, <&key_physical_attrs 100 100 100 32 0 0 0> | ||
, <&key_physical_attrs 100 100 200 0 0 0 0> | ||
, <&key_physical_attrs 100 100 300 28 0 0 0> | ||
, <&key_physical_attrs 100 100 400 42 0 0 0> | ||
, <&key_physical_attrs 100 100 700 42 0 0 0> | ||
, <&key_physical_attrs 100 100 800 28 0 0 0> | ||
, <&key_physical_attrs 100 100 900 0 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 32 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 95 0 0 0> | ||
, <&key_physical_attrs 100 100 0 195 0 0 0> | ||
, <&key_physical_attrs 100 100 100 132 0 0 0> | ||
, <&key_physical_attrs 100 100 200 100 0 0 0> | ||
, <&key_physical_attrs 100 100 300 129 0 0 0> | ||
, <&key_physical_attrs 100 100 400 142 0 0 0> | ||
, <&key_physical_attrs 100 100 700 142 0 0 0> | ||
, <&key_physical_attrs 100 100 800 129 0 0 0> | ||
, <&key_physical_attrs 100 100 900 100 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 132 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 195 0 0 0> | ||
, <&key_physical_attrs 100 100 0 295 0 0 0> | ||
, <&key_physical_attrs 100 100 100 231 0 0 0> | ||
, <&key_physical_attrs 100 100 200 200 0 0 0> | ||
, <&key_physical_attrs 100 100 300 229 0 0 0> | ||
, <&key_physical_attrs 100 100 400 242 0 0 0> | ||
, <&key_physical_attrs 100 100 700 242 0 0 0> | ||
, <&key_physical_attrs 100 100 800 229 0 0 0> | ||
, <&key_physical_attrs 100 100 900 200 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 231 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 295 0 0 0> | ||
, <&key_physical_attrs 100 100 330 355 1500 430 455> | ||
, <&key_physical_attrs 100 100 430 355 3000 430 455> | ||
, <&key_physical_attrs 100 100 670 355 (-3000) 770 455> | ||
, <&key_physical_attrs 100 100 770 355 (-1500) 770 455> | ||
; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
#include <physical_layouts.dtsi> | ||
|
||
/ { | ||
foostan_corne_6col_transform: foostan_corne_6col_transform { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <12>; | ||
rows = <4>; | ||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | ||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | ||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | ||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | | ||
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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) | ||
>; | ||
}; | ||
|
||
foostan_corne_5col_transform: foostan_corne_5col_transform { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <10>; | ||
rows = <4>; | ||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | | ||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | | ||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | | ||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | | ||
map = < | ||
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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) | ||
>; | ||
}; | ||
|
||
foostan_corne_6col_layout: foostan_corne_6col_layout { | ||
compatible = "zmk,physical-layout"; | ||
display-name = "6-column"; | ||
|
||
transform = <&foostan_corne_6col_transform>; | ||
|
||
keys // w h x y rot rx ry | ||
= <&key_physical_attrs 100 100 0 37 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 24 0 0 0> | ||
, <&key_physical_attrs 100 100 800 24 0 0 0> | ||
, <&key_physical_attrs 100 100 900 12 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 0 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 12 0 0 0> | ||
, <&key_physical_attrs 100 100 1200 37 0 0 0> | ||
, <&key_physical_attrs 100 100 1300 37 0 0 0> | ||
, <&key_physical_attrs 100 100 0 137 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 124 0 0 0> | ||
, <&key_physical_attrs 100 100 800 124 0 0 0> | ||
, <&key_physical_attrs 100 100 900 112 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 100 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 112 0 0 0> | ||
, <&key_physical_attrs 100 100 1200 137 0 0 0> | ||
, <&key_physical_attrs 100 100 1300 137 0 0 0> | ||
, <&key_physical_attrs 100 100 0 237 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 224 0 0 0> | ||
, <&key_physical_attrs 100 100 800 224 0 0 0> | ||
, <&key_physical_attrs 100 100 900 212 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 200 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 212 0 0 0> | ||
, <&key_physical_attrs 100 100 1200 237 0 0 0> | ||
, <&key_physical_attrs 100 100 1300 237 0 0 0> | ||
, <&key_physical_attrs 100 100 350 312 0 0 0> | ||
, <&key_physical_attrs 100 100 450 312 1200 450 412> | ||
, <&key_physical_attrs 100 150 548 283 2400 548 433> | ||
, <&key_physical_attrs 100 150 752 283 (-2400) 852 433> | ||
, <&key_physical_attrs 100 100 850 312 (-1200) 950 412> | ||
, <&key_physical_attrs 100 100 950 312 0 0 0> | ||
; | ||
}; | ||
|
||
foostan_corne_5col_layout: foostan_corne_5col_layout { | ||
compatible = "zmk,physical-layout"; | ||
display-name = "5-column"; | ||
|
||
transform = <&foostan_corne_5col_transform>; | ||
|
||
keys // w h x y rot rx ry | ||
= <&key_physical_attrs 100 100 0 37 0 0 0> | ||
, <&key_physical_attrs 100 100 100 12 0 0 0> | ||
, <&key_physical_attrs 100 100 200 0 0 0 0> | ||
, <&key_physical_attrs 100 100 300 12 0 0 0> | ||
, <&key_physical_attrs 100 100 400 24 0 0 0> | ||
, <&key_physical_attrs 100 100 700 24 0 0 0> | ||
, <&key_physical_attrs 100 100 800 12 0 0 0> | ||
, <&key_physical_attrs 100 100 900 0 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 12 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 37 0 0 0> | ||
, <&key_physical_attrs 100 100 0 137 0 0 0> | ||
, <&key_physical_attrs 100 100 100 112 0 0 0> | ||
, <&key_physical_attrs 100 100 200 100 0 0 0> | ||
, <&key_physical_attrs 100 100 300 112 0 0 0> | ||
, <&key_physical_attrs 100 100 400 124 0 0 0> | ||
, <&key_physical_attrs 100 100 700 124 0 0 0> | ||
, <&key_physical_attrs 100 100 800 112 0 0 0> | ||
, <&key_physical_attrs 100 100 900 100 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 112 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 137 0 0 0> | ||
, <&key_physical_attrs 100 100 0 237 0 0 0> | ||
, <&key_physical_attrs 100 100 100 212 0 0 0> | ||
, <&key_physical_attrs 100 100 200 200 0 0 0> | ||
, <&key_physical_attrs 100 100 300 212 0 0 0> | ||
, <&key_physical_attrs 100 100 400 224 0 0 0> | ||
, <&key_physical_attrs 100 100 700 224 0 0 0> | ||
, <&key_physical_attrs 100 100 800 212 0 0 0> | ||
, <&key_physical_attrs 100 100 900 200 0 0 0> | ||
, <&key_physical_attrs 100 100 1000 212 0 0 0> | ||
, <&key_physical_attrs 100 100 1100 237 0 0 0> | ||
, <&key_physical_attrs 100 100 250 312 0 0 0> | ||
, <&key_physical_attrs 100 100 350 312 1200 350 412> | ||
, <&key_physical_attrs 100 150 448 283 2400 448 433> | ||
, <&key_physical_attrs 100 150 652 283 (-2400) 752 433> | ||
, <&key_physical_attrs 100 100 750 312 (-1200) 850 412> | ||
, <&key_physical_attrs 100 100 850 312 0 0 0> | ||
; | ||
}; | ||
|
||
foostan_corne_position_map { | ||
compatible = "zmk,physical-layout-position-map"; | ||
|
||
complete; | ||
|
||
twelve { | ||
physical-layout = <&foostan_corne_6col_layout>; | ||
positions | ||
= < 1 2 3 4 5 6 7 8 9 10 > | ||
, < 13 14 15 16 17 18 19 20 21 22 > | ||
, < 25 26 27 28 29 30 31 32 33 34 > | ||
, < 36 37 38 39 40 41 >; | ||
}; | ||
|
||
ten { | ||
physical-layout = <&foostan_corne_5col_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>; | ||
}; | ||
}; | ||
}; |