Add redox shield
This commit is contained in:
parent
61b249666b
commit
23150cdc59
11 changed files with 193 additions and 1 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -16,6 +16,8 @@ jobs:
|
|||
- kyria_right
|
||||
- lily58_left
|
||||
- lily58_right
|
||||
- redox_left
|
||||
- redox_right
|
||||
- romac
|
||||
include:
|
||||
- board: proton_c
|
||||
|
|
16
app/boards/shields/redox/Kconfig.defconfig
Normal file
16
app/boards/shields/redox/Kconfig.defconfig
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_REDOX_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Redox Left"
|
||||
|
||||
endif
|
||||
|
||||
if SHIELD_REDOX_RIGHT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Redox Right"
|
||||
|
||||
endif
|
8
app/boards/shields/redox/Kconfig.shield
Normal file
8
app/boards/shields/redox/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_REDOX_LEFT
|
||||
def_bool $(shields_list_contains,redox_left)
|
||||
|
||||
config SHIELD_REDOX_RIGHT
|
||||
def_bool $(shields_list_contains,redox_right)
|
0
app/boards/shields/redox/redox.conf
Normal file
0
app/boards/shields/redox/redox.conf
Normal file
51
app/boards/shields/redox/redox.dtsi
Normal file
51
app/boards/shields/redox/redox.dtsi
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
*
|
||||
* 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 = <10>;
|
||||
rows = <7>;
|
||||
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 |
|
||||
// | SW13 | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | SW13 |
|
||||
// | SW20 | SW19 | SW18 | SW17 | SW16 | SW15 | SW14 | | SW14 | SW15 | SW16 | SW17 | SW18 | SW19 | SW20 |
|
||||
// | SW28 | SW27 | SW26 | SW25 | SW24 | SW23 | SW22 | SW21 | | SW21 | SW22 | SW23 | SW24 | SW25 | SW26 | SW27 | SW28 |
|
||||
// | SW35 | SW34 | SW33 | SW32 | | SW31 | | SW30 | SW29 | | SW29 | SW30 | | SW31 | | SW32 | SW33 | SW34 | SW35 |
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) 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(0,6) RC(0,7) 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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(2,0) RC(2,1) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(4,0) RC(4,1)
|
||||
RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(3,4) RC(4,8) RC(4,9) RC(3,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
||||
RC(5,6) RC(5,7) RC(5,8) RC(5,9) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(6,6) RC(6,7) RC(6,8) RC(6,9)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 6 (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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
bt_unpair_combo: bt_unpair_combo {
|
||||
compatible = "zmk,bt-unpair-combo";
|
||||
};
|
||||
};
|
60
app/boards/shields/redox/redox.keymap
Normal file
60
app/boards/shields/redox/redox.keymap
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
/ {
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
default_layer {
|
||||
// -------------------------------------------------------------------------------------------------------------------------------
|
||||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
|
||||
// | TAB | Q | W | E | R | T | LOWER | | LOWER | Y | U | I | O | P | = |
|
||||
// | ESC | A | S | D | F | G | "[" | | "]" | H | J | K | L | ; | ' |
|
||||
// | SHIFT | Z | X | C | V | B | PGUP | PGDN | | HOME | END | N | M | , | . | / | SHIFT |
|
||||
// | GUI | + | - | ALT | | CTRL | | BSPC | DEL | | ENTER | SPACE | | ALT | | <- | v | ^ | -> |
|
||||
bindings = <
|
||||
&kp GRAV &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &mo 1 &mo 1 &kp Y &kp U &kp I &kp O &kp P &kp EQL
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp LBKT &kp RBKT &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp PGUP &kp PGDN &kp HOME &kp END &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT
|
||||
&kp LGUI &kp KPLS &kp MINUS &kp LALT &kp LCTL &kp BKSP &kp DEL &kp RET &kp SPC &kp RALT &kp LARW &kp DARW &kp UAWR &kp RARW
|
||||
>;
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
// ----------------------------------------------------------------------------------------------------------------------
|
||||
// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
|
||||
// | | ! | @ | { | } | "|" | | | | / | 7 | 8 | 9 | - | |
|
||||
// | | # | $ | "[" | "]" | ` | | | | * | 4 | 5 | 6 | + | |
|
||||
// | | % | ^ | ( | ) | ~ | | | | | | | 1 | 2 | 3 | ENTER | |
|
||||
// | | | | | | | | | | | | | | 0 | | 0 | . | ENTER | |
|
||||
bindings = <
|
||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans
|
||||
&trans &kp BANG &kp ATSN &kp LCUR &kp RCUR &kp PIPE &trans &trans &kp FSLH &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp MINUS &trans
|
||||
&trans &kp HASH &kp CURU &kp LBKT &kp RBKT &kp GRAV &trans &trans &kp KMLT &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp KPLS &trans
|
||||
&trans &kp PRCT &kp CRRT &kp LPRN &kp RPRN &kp TILD &trans &trans &trans &trans &trans &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp RET &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp NUM_0 &kp NUM_0 &kp DOT &kp RET &trans
|
||||
>;
|
||||
};
|
||||
|
||||
// TODO: raise_layer layout
|
||||
raise_layer {
|
||||
// ----------------------------------------------------------------------------------------------------------------------
|
||||
// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
|
||||
// | | ! | @ | { | } | "|" | | | | / | 7 | 8 | 9 | - | |
|
||||
// | | # | $ | "[" | "]" | ` | | | | * | 4 | 5 | 6 | + | |
|
||||
// | | % | ^ | ( | ) | ~ | | | | | | | 1 | 2 | 3 | ENTER | |
|
||||
// | | | | | | | | | | | | | | 0 | | 0 | . | ENTER | |
|
||||
bindings = <
|
||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans
|
||||
&trans &kp BANG &kp ATSN &kp LCUR &kp RCUR &kp PIPE &trans &trans &kp FSLH &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp MINUS &trans
|
||||
&trans &kp HASH &kp CURU &kp LBKT &kp RBKT &kp GRAV &trans &trans &kp KMLT &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp KPLS &trans
|
||||
&trans &kp PRCT &kp CRRT &kp LPRN &kp RPRN &kp TILD &trans &trans &trans &trans &trans &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp RET &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp NUM_0 &kp NUM_0 &kp DOT &kp RET &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
2
app/boards/shields/redox/redox_left.conf
Normal file
2
app/boards/shields/redox/redox_left.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CONFIG_ZMK_SPLIT=y
|
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
23
app/boards/shields/redox/redox_left.overlay
Normal file
23
app/boards/shields/redox/redox_left.overlay
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "redox.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
|
||||
&bt_unpair_combo {
|
||||
key-positions = <0 60>;
|
||||
};
|
2
app/boards/shields/redox/redox_right.conf
Normal file
2
app/boards/shields/redox/redox_right.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CONFIG_ZMK_SPLIT=y
|
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
27
app/boards/shields/redox/redox_right.overlay
Normal file
27
app/boards/shields/redox/redox_right.overlay
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Pete Johanson, Kurtis Lew
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "redox.dtsi"
|
||||
|
||||
&default_transform {
|
||||
col-offset = <8>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
|
||||
&bt_unpair_combo {
|
||||
key-positions = <11 71>;
|
||||
};
|
3
docs/static/setup.sh
vendored
3
docs/static/setup.sh
vendored
|
@ -38,7 +38,7 @@ echo ""
|
|||
echo "Keyboard Shield Selection:"
|
||||
|
||||
prompt="Pick an keyboard:"
|
||||
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "RoMac")
|
||||
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "RoMac" "Redox")
|
||||
|
||||
PS3="$prompt "
|
||||
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
|
||||
|
@ -54,6 +54,7 @@ select opt in "${options[@]}" "Quit"; do
|
|||
5 ) shield_title="Sofle" shield="sofle"; split="y"; break;;
|
||||
6 ) shield_title="Iris" shield="iris"; split="y"; break;;
|
||||
7 ) shield_title="RoMac" shield="romac"; split="n"; break;;
|
||||
8 ) shield_title="Redox" shield="redox"; split="y"; break;;
|
||||
|
||||
# Add link to docs on adding your own custom shield in your ZMK config!
|
||||
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;
|
||||
|
|
Loading…
Add table
Reference in a new issue