diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c2a51196a8..fc730446645 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,8 @@ jobs: - jorne_right - kyria_left - kyria_right + - levinson_left + - levinson_right - lily58_left - lily58_right - microdox_left diff --git a/app/boards/shields/levinson/Kconfig.defconfig b/app/boards/shields/levinson/Kconfig.defconfig new file mode 100644 index 00000000000..eddc14ccb6d --- /dev/null +++ b/app/boards/shields/levinson/Kconfig.defconfig @@ -0,0 +1,30 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + + +if SHIELD_LEVINSON_LEFT + +config ZMK_KEYBOARD_NAME + default "Levinson Left" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_LEVINSON_RIGHT + +config ZMK_KEYBOARD_NAME + default "Levinson Right" + +config USB + 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..985049c65c8 --- /dev/null +++ b/app/boards/shields/levinson/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2021 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..e69de29bb2d diff --git a/app/boards/shields/levinson/levinson.dtsi b/app/boards/shields/levinson/levinson.dtsi new file mode 100644 index 00000000000..a7fa37faa8b --- /dev/null +++ b/app/boards/shields/levinson/levinson.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021 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..e36c6ef4a10 --- /dev/null +++ b/app/boards/shields/levinson/levinson.keymap @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2021 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 + >; + }; + }; +}; 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..f8719e59577 --- /dev/null +++ b/app/boards/shields/levinson/levinson_left.overlay @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021 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_d 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 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..ee75a0fb545 --- /dev/null +++ b/app/boards/shields/levinson/levinson_right.overlay @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 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_a 3 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 9 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 98f8715f514..f7a61cdce0f 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -38,6 +38,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what - [CRBN](https://keygem.store/collections/group-buys/products/group-buy-featherlight-40-kit) (`crbn`) - [tidbit](https://nullbits.co/tidbit/) (`tidbit`) - [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`) +- [Levinson](https://keeb.io/products/levinson-lets-split-w-led-backlight) (`levinson_left` and `levinson_right`) ## Other Hardware diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1 index a521934e27d..bd7e62a1a63 100644 --- a/docs/static/setup.ps1 +++ b/docs/static/setup.ps1 @@ -91,9 +91,9 @@ Write-Host "Keyboard Shield Selection:" $prompt = "Pick a keyboard" # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!" -$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek" -$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n" +$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "Levinson" +$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "levinson" +$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "y" $choice = Get-Choice-From-Options -Options $options -Prompt $prompt $shield_title = $($options[$choice]) diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 5ceff6747c5..1b8823f3949 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -92,7 +92,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "Levinson") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -120,6 +120,7 @@ select opt in "${options[@]}" "Quit"; do 17 ) shield_title="CRBN" shield="crbn"; split="n"; break;; 18 ) shield_title="Tidbit" shield="tidbit"; split="n" break;; 19 ) shield_title="Eek!" shield="eek"; split="n" break;; + 20 ) shield_title="Levinson" shield="levinson"; split="y" break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;;