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

Added support for the Keebio Levinson Rev 3 Shield. #566

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 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
17 changes: 17 additions & 0 deletions app/boards/shields/levinson/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#Copyright (c) 2021 The ZMK Contributors
#SPDX-License-Identifier: MIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#Copyright (c) 2021 The ZMK Contributors
#SPDX-License-Identifier: MIT
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nicell thanks for the further instructions, I have added the Levinson as an option in the files you mentioned following the formatting of all the other shields. I hope this was correct. I also added in those spaces in the copyright lines. Not sure how that one got missed ;)



if SHIELD_LEVINSON_LEFT

config ZMK_KEYBOARD_NAME
default "Levinson Left"

endif

if SHIELD_LEVINSON_RIGHT

config ZMK_KEYBOARD_NAME
default "Levinson Right"

endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A recent change was made to how we define the central and peripheral for splits, which can be seen here: https://zmkfirmware.dev/docs/development/new-shield#kconfigdefconfig. Could you update this file to match the docs? Along with this you'll need to clear out the left and right .conf files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made and pushed.

8 changes: 8 additions & 0 deletions app/boards/shields/levinson/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -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)
Empty file.
34 changes: 34 additions & 0 deletions app/boards/shields/levinson/levinson.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

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

/ {
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)
>;
};
};
115 changes: 115 additions & 0 deletions app/boards/shields/levinson/levinson.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

//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
>;
};
};
};
2 changes: 2 additions & 0 deletions app/boards/shields/levinson/levinson_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

31 changes: 31 additions & 0 deletions app/boards/shields/levinson/levinson_left.overlay
Original file line number Diff line number Diff line change
@@ -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)>
;
};
};
1 change: 1 addition & 0 deletions app/boards/shields/levinson/levinson_right.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ZMK_SPLIT=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CONFIG_ZMK_SPLIT=y

35 changes: 35 additions & 0 deletions app/boards/shields/levinson/levinson_right.overlay
Original file line number Diff line number Diff line change
@@ -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)>
;
};
};