diff --git a/app/boards/shields/levinson/Kconfig.defconfig b/app/boards/shields/levinson/Kconfig.defconfig new file mode 100644 index 00000000000..15bafa2a351 --- /dev/null +++ b/app/boards/shields/levinson/Kconfig.defconfig @@ -0,0 +1,20 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + + +if SHIELD_LEVINSON_LEFT + +config ZMK_KEYBOARD_NAME + default "Levinson" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_LEVINSON_LEFT || SHIELD_LEVINSON_RIGHT + +config ZMK_SPLIT + default y + +endif \ No newline at end of file diff --git a/app/boards/shields/levinson/Kconfig.shield b/app/boards/shields/levinson/Kconfig.shield new file mode 100644 index 00000000000..d9b769b8eae --- /dev/null +++ b/app/boards/shields/levinson/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_LEVINSON_LEFT + def_bool $(shields_list_contains,levinson_left) + +config SHIELD_LEVINSON_RIGHT + def_bool $(shields_list_contains,levinson_right) diff --git a/app/boards/shields/levinson/levinson.conf b/app/boards/shields/levinson/levinson.conf new file mode 100644 index 00000000000..dcd95fed5f9 --- /dev/null +++ b/app/boards/shields/levinson/levinson.conf @@ -0,0 +1 @@ +CONFIG_ZMK_SLEEP=y \ No newline at end of file diff --git a/app/boards/shields/levinson/levinson.dtsi b/app/boards/shields/levinson/levinson.dtsi new file mode 100644 index 00000000000..cc07c55695a --- /dev/null +++ b/app/boards/shields/levinson/levinson.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + 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 | SW22 | SW23 | SW24 | | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | + +// The Levinson boards are *not* the same for each half and are labeled as either left or right. +// This requires that the right half matrix have its columns inverted. + + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,11) RC(0,10) RC(0,9) RC(0,8) RC(0,7) RC(0,6) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,7) RC(1,6) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,11) RC(2,10) RC(2,9) RC(2,8) RC(2,7) RC(2,6) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,11) RC(3,10) RC(3,9) RC(3,8) RC(3,7) RC(3,6) + >; + }; +}; diff --git a/app/boards/shields/levinson/levinson.keymap b/app/boards/shields/levinson/levinson.keymap new file mode 100644 index 00000000000..1d1455e4684 --- /dev/null +++ b/app/boards/shields/levinson/levinson.keymap @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + +//Layer definitions +#define QWERTY 0 +#define COLEMAK 1 +#define DVORAK 2 +#define LOWER 3 +#define RAISE 4 +#define ADJ 5 + +/ { + keymap { + compatible = "zmk,keymap"; + + qwerty { +// ------------------------------------- ------------------------------------- +// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC| +// | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | +// |LSHFT| Z | X | C | V | B | | N | M | , | . | / |ENTER| +// | ADJ |LCTRL| LALT| LGUI|LOWER|SPACE| |SPACE|RAISE| LEFT| DOWN| UP |RIGHT| +// ------------------------------------- ------------------------------------- + bindings = < + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ENTER + &mo ADJ &kp LCTRL &kp LALT &kp LGUI &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + + colemak { +// ------------------------------------- ------------------------------------- +// | TAB | Q | W | F | P | G | | J | L | U | Y | ; | BSPC| +// | ESC | A | R | S | T | D | | H | N | E | I | O | ' | +// |LSHFT| Z | X | C | V | B | | K | M | , | . | / |ENTER| +// | ADJ |LCTRL| LALT| LGUI|LOWER|SPACE| |SPACE|RAISE| LEFT| DOWN| UP |RIGHT| +// ------------------------------------- ------------------------------------- + bindings = < + &kp TAB &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SEMI &kp BSPC + &kp ESC &kp A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &kp O &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ENTER + &mo ADJ &kp LCTRL &kp LALT &kp LGUI &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + + dvorak { +// ------------------------------------- ------------------------------------- +// | TAB | ' | , | . | P | Y | | F | G | C | R | L | BSPC| +// | ESC | A | O | E | U | I | | D | H | T | N | S | / | +// |LSHFT| ; | Q | J | K | X | | B | M | W | V | Z |ENTER| +// | ADJ |LCTRL| LALT| LGUI|LOWER|SPACE| |SPACE|RAISE| LEFT| DOWN| UP |RIGHT| +// ------------------------------------- ------------------------------------- + bindings = < + &kp TAB &kp SQT &kp COMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L &kp BSPC + &kp ESC &kp A &kp O &kp E &kp U &kp I &kp D &kp H &kp T &kp N &kp S &kp FSLH + &kp LSHFT &kp SEMI &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z &kp ENTER + &mo ADJ &kp LCTRL &kp LALT &kp LGUI &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + + lower { +// ------------------------------------- ------------------------------------- +// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC| +// | DEL | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +// | BL | F7 | F8 | F9 | F10 | F11 | | F12 |LS(#)|LS(\)| | | | +// | | | | | | | | | ADJ | NEXT| Vol-| Vol+| PLAY| +// ------------------------------------- ------------------------------------- + bindings = < + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PERCENT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp BSPC + &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &rgb_ug RGB_EFF &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(NON_US_HASH) &kp LS(NON_US_BSLH) &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &mo ADJ &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE + >; + }; + + raise { +// ------------------------------------- ------------------------------------- +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BSPC| +// | DEL | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | | | +// | | F7 | F8 | F9 | F10 | F11 | | F12 | #~ | \| | | | | +// | | | | | ADJ | | | | | NEXT| Vol-| Vol+| PLAY| +// ------------------------------------- ------------------------------------- + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC + &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp PIPE + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp NON_US_HASH &kp NON_US_BSLH &trans &trans &trans + &trans &trans &trans &trans &mo ADJ &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE + >; + }; + + adjust { +// ------------------------------------- ------------------------------------- +// | |RESET| | | | | | | | | | | DEL | +// | | | | | | | | |QWERT|COLEM|DVORA| | | +// | | | | | | | | | | | | | | +// | | | | | | | | | | | | | | +// ------------------------------------- ------------------------------------- + bindings = < + &trans &bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DEL + &trans &trans &trans &trans &trans &trans &trans &to QWERTY &to COLEMAK &to DVORAK &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/levinson/levinson.zmk.yml b/app/boards/shields/levinson/levinson.zmk.yml new file mode 100644 index 00000000000..f738a881415 --- /dev/null +++ b/app/boards/shields/levinson/levinson.zmk.yml @@ -0,0 +1,13 @@ +file_format: "1" +id: levinson +name: Levinson +type: shield +url: https://keeb.io/collections/levinson-keyboard +requires: + - pro_micro +exposes: +features: + - keys +siblings: + - levinson_left + - levinson_right \ No newline at end of file diff --git a/app/boards/shields/levinson/levinson_left.conf b/app/boards/shields/levinson/levinson_left.conf new file mode 100644 index 00000000000..e69de29bb2d diff --git a/app/boards/shields/levinson/levinson_left.overlay b/app/boards/shields/levinson/levinson_left.overlay new file mode 100644 index 00000000000..fed132cbed7 --- /dev/null +++ b/app/boards/shields/levinson/levinson_left.overlay @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "levinson.dtsi" + +/ { + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 3 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; diff --git a/app/boards/shields/levinson/levinson_right.conf b/app/boards/shields/levinson/levinson_right.conf new file mode 100644 index 00000000000..e69de29bb2d diff --git a/app/boards/shields/levinson/levinson_right.overlay b/app/boards/shields/levinson/levinson_right.overlay new file mode 100644 index 00000000000..291fcba5423 --- /dev/null +++ b/app/boards/shields/levinson/levinson_right.overlay @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "levinson.dtsi" + +&default_transform { + col-offset = <6>; +}; + +/ { + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro 3 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +};