diff options
author | ReFil <[email protected]> | 2024-09-26 14:29:34 +0100 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2024-09-26 11:53:24 -0600 |
commit | a8f7888f4d6c289deea1cbbc4c1f1ee85cc19d66 (patch) | |
tree | de60576e0ab172b5a1f4f447bb2905e109e58b97 | |
parent | a47f1fe2e173e97c22d9f44cbd5a65889b8b3a0a (diff) | |
download | zmk-a8f7888f4d6c289deea1cbbc4c1f1ee85cc19d66.tar.gz zmk-a8f7888f4d6c289deea1cbbc4c1f1ee85cc19d66.zip |
feat(boards): BT60 V1 Physical Layout
-rw-r--r-- | app/boards/arm/bt60/bt60.dtsi | 2 | ||||
-rw-r--r-- | app/boards/arm/bt60/bt60_v1.dts | 36 | ||||
-rw-r--r-- | app/boards/arm/bt60/bt60_v1.keymap | 49 | ||||
-rw-r--r-- | app/boards/arm/bt60/bt60_v1_hs.dts | 8 | ||||
-rw-r--r-- | app/boards/arm/bt60/bt60_v1_hs.keymap | 10 |
5 files changed, 44 insertions, 61 deletions
diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 83ff3f04aa..5e176e6024 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -17,8 +17,6 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,battery = &vbatt; - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; }; sensors: sensors { diff --git a/app/boards/arm/bt60/bt60_v1.dts b/app/boards/arm/bt60/bt60_v1.dts index 315d8cceb8..d7ecb5aeac 100644 --- a/app/boards/arm/bt60/bt60_v1.dts +++ b/app/boards/arm/bt60/bt60_v1.dts @@ -6,12 +6,13 @@ /dts-v1/; #include "bt60.dtsi" +#include <layouts/common/60percent/60percent.dtsi> / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &ansi_transform; + zmk,physical-layout = &layout_60_ansi; }; ansi_transform: keymap_transform_0 { @@ -66,19 +67,6 @@ >; }; - split_transform: keymap_transform_4 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(0,14) - 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(1,13) - 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,13) - RC(3,0) 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(3,14) - RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) - >; - }; - kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; wakeup-source; @@ -112,3 +100,23 @@ ; }; }; + +&layout_60_ansi { + status = "okay"; + transform = <&ansi_transform>; +}; + +&layout_60_iso { + status = "okay"; + transform = <&iso_transform>; +}; + +&layout_60_all1u { + status = "okay"; + transform = <&all_1u_transform>; +}; + +&layout_60_hhkb { + status = "okay"; + transform = <&hhkb_transform>; +}; diff --git a/app/boards/arm/bt60/bt60_v1.keymap b/app/boards/arm/bt60/bt60_v1.keymap index be3b206a16..65442b582e 100644 --- a/app/boards/arm/bt60/bt60_v1.keymap +++ b/app/boards/arm/bt60/bt60_v1.keymap @@ -2,26 +2,25 @@ #include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/bt.h> -#define ANSI true -//#define HHKB true -//#define ISO true -//#define ALL_1U true -//#define SPLIT_BKSP_RSHFT true +#define ANSI +//#define HHKB +//#define ISO +//#define ALL_1U / { chosen { #ifdef ANSI - zmk,matrix-transform = &ansi_transform; - #elif defined(HHKB) - zmk,matrix-transform = &hhkb_transform; + zmk,physical-layout = &layout_60_ansi; #elif defined(ISO) - zmk,matrix-transform = &iso_transform; + zmk,physical-layout = &layout_60_iso; #elif defined(ALL_1U) - zmk,matrix-transform = &all_1u_transform; + zmk,physical-layout = &layout_60_all1u; + #elif defined(HHKB) + zmk,physical-layout = &layout_60_hhkb; #else - zmk,matrix-transform = &split_transform; + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v1.keymap" #endif }; @@ -148,33 +147,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC| DEL | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | - // | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | - // ------------------------------------------------------------------------------------------ - bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - bindings = < - &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans - &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" #endif }; }; diff --git a/app/boards/arm/bt60/bt60_v1_hs.dts b/app/boards/arm/bt60/bt60_v1_hs.dts index 27e3828617..23d4d55bbd 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.dts +++ b/app/boards/arm/bt60/bt60_v1_hs.dts @@ -6,12 +6,12 @@ /dts-v1/; #include "bt60.dtsi" - +#include <layouts/common/60percent/ansi.dtsi> / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &layout_60_ansi; }; default_transform: keymap_transform_0 { @@ -60,3 +60,7 @@ ; }; }; + +&layout_60_ansi { + transform = <&default_transform>; +}; diff --git a/app/boards/arm/bt60/bt60_v1_hs.keymap b/app/boards/arm/bt60/bt60_v1_hs.keymap index f1e483e3a1..a36246e5b9 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.keymap +++ b/app/boards/arm/bt60/bt60_v1_hs.keymap @@ -8,14 +8,14 @@ default_layer { // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | // ------------------------------------------------------------------------------------------ bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &bt BT_CLR + &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT @@ -25,7 +25,7 @@ }; raise { bindings = < - &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans + &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT |