feat(shields): add redox shield
Tested on my redox build. Keymap is same as the original redox with the exception of the mouse keys in the NAV layer which are not supported by zmk and the addition of the bluetooth control keys in the ADJ layer. Signed-off-by: Nikos Nikoleris <nikos.nikoleris@gmail.com>
This commit is contained in:
parent
fadb508671
commit
eb16c41530
10 changed files with 206 additions and 0 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -51,6 +51,8 @@ jobs:
|
|||
- quefrency_left
|
||||
- quefrency_right
|
||||
- reviung41
|
||||
- redox_left
|
||||
- redox_right
|
||||
- romac
|
||||
- romac_plus
|
||||
- settings_reset
|
||||
|
|
24
app/boards/shields/redox/Kconfig.defconfig
Normal file
24
app/boards/shields/redox/Kconfig.defconfig
Normal file
|
@ -0,0 +1,24 @@
|
|||
if SHIELD_REDOX_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Redox"
|
||||
|
||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if SHIELD_REDOX_RIGHT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Redox Right"
|
||||
|
||||
endif
|
||||
|
||||
if SHIELD_REDOX_LEFT || SHIELD_REDOX_RIGHT
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
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 The ZMK Contributors
|
||||
# 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)
|
3
app/boards/shields/redox/redox.conf
Normal file
3
app/boards/shields/redox/redox.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Uncomment the following lines to enable the Redox RGB Underglow
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# CONFIG_WS2812_STRIP=y
|
46
app/boards/shields/redox/redox.dtsi
Normal file
46
app/boards/shields/redox/redox.dtsi
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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 = <14>;
|
||||
rows = <5>;
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | SW13 | | SW13 | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
|
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | SW19 | SW20 | | SW20 | SW19 | SW18 | SW17 | SW16 | SW15 | SW14 |
|
||||
// | SW21 | SW22 | SW23 | SW24 | SW25 | SW26 | SW27 | SW28 | | SW28 | SW27 | SW26 | SW25 | SW24 | SW23 | SW22 | SW21 |
|
||||
// | SW29 | SW30 | SW31 | SW32 | SW33 | SW34 | SW35 | | SW35 | SW34 | SW33 | SW32 | SW31 | SW30 | SW29 |
|
||||
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(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(0,6) RC(0,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(1,6) RC(1,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(2,6) RC(3,6) RC(3,7) RC(2,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
|
||||
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(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
|
||||
>;
|
||||
};
|
||||
|
||||
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)>
|
||||
;
|
||||
};
|
||||
};
|
81
app/boards/shields/redox/redox.keymap
Normal file
81
app/boards/shields/redox/redox.keymap
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
#define DEF 0
|
||||
#define SYMB 1
|
||||
#define NAV 2
|
||||
#define ADJ 3
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
// ---------------------------------------------------------------------------------------------------------------
|
||||
// | NAV/` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | NAV/MINUS |
|
||||
// | TAB | Q | W | E | R | T | SYMB | | SYMB | Y | U | I | O | P | = |
|
||||
// | ESC | A | S | D | F | G | [ | | ] | H | J | K | L | ; | ' |
|
||||
// | SHFT | Z | X | C | V | B | L3/PGUP | PGDN | | HOME | L3/END | N | M | , | . | / | SHFT |
|
||||
// | LGUI | + | - | LALT/* | LCTRL/* | BKSP | DEL | | ENT | SPC | RALT | LEFT | DOWN | UP | RIGHT |
|
||||
bindings = <
|
||||
< NAV GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 < 2 MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &mo SYMB &mo SYMB &kp Y &kp U &kp I &kp O &kp P &kp EQUAL
|
||||
&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 SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B < ADJ PGUP &kp PGDN &kp HOME < ADJ END &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT
|
||||
&kp LGUI &kp PLUS &kp MINUS &mt LALT KP_MULTIPLY &mt LCTL BSLH &kp BSPC &kp DEL &kp ENTER &kp SPACE &kp RALT &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||
>;
|
||||
};
|
||||
symbol_layer {
|
||||
// -----------------------------------------------------------------------------
|
||||
// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | n/a |
|
||||
// | | ! | @ | { | } | | | | | | / | 7 | 8 | 9 | - | n/a |
|
||||
// | | # | $ | [ | ] | ` | | | | * | 4 | 5 | 6 | + | n/a |
|
||||
// | | % | ^ | ( | ) | ~ | | | | | | n/a | 1 | 2 | 3 | ENTER | n/a |
|
||||
// | | | | | | | | | | | 0 | 0 | . | ENTER | n/a |
|
||||
bindings = <
|
||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &none
|
||||
&trans &kp EXCL &kp AT &kp LBRC &kp RBRC &kp PIPE &trans &trans &kp BSLH &kp N7 &kp N8 &kp N9 &kp MINUS &none
|
||||
&trans &kp HASH &kp DOLLAR &kp LBKT &kp RBKT &kp GRAVE &trans &trans &kp STAR &kp N4 &kp N5 &kp N6 &kp PLUS &none
|
||||
&trans &kp PERCENT &kp CARET &kp LPAR &kp RPAR &kp TILDE &trans &trans &trans &trans &none &kp N1 &kp N2 &kp N3 &kp ENTER &none
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp N0 &kp N0 &kp DOT &kp ENTER &none
|
||||
>;
|
||||
};
|
||||
navigate_layer {
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
// | | | | | | | | | | | | | |
|
||||
// | n/a | n/a | (M_UP) | n/a | MW_UP | n/a | | | | n/a | n/a | n/a | n/a | n/a | n/a |
|
||||
// | n/a | (M_LEFT) | (M_DOWN) | (M_RIGHT) | MW_DOWN | n/a | | | | LEFT | DOWN | UP | RIGHT | n/a | n/a |
|
||||
// | n/a | n/a | n/a | n/a | n/a | n/a | | | | | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
|
||||
// | n/a | n/a | n/a | n/a | M_1 | M_2 | | | | | n/a | n/a | n/a | n/a | n/a |
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&none &none &none &none &kp K_SCROLL_UP &none &trans &trans &none &none &none &none &none &none
|
||||
&none &none &none &none &kp K_SCROLL_DOWN &none &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none
|
||||
&none &none &none &none &none &none &trans &trans &trans &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &trans &trans &trans &none &none &none &none &none
|
||||
>;
|
||||
};
|
||||
adjust_layer {
|
||||
// ----------------------------------------------------------------------------------------------------------------------------
|
||||
// | BTCLR | BT0 | BT1 | BT2 | BT3 | BT4 | | BT4 | BT3 | BT2 | BT1 | BT0 | BTCLR |
|
||||
// | n/a | reset | bootloader | n/a | n/a | n/a | n/a | | n/a | n/a | n/a | n/a | bootloader | reset | n/a |
|
||||
// | n/a | n/a | n/a | n/a | n/a | n/a | n/a | | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
|
||||
// | n/a | n/a | n/a | n/a | n/a | n/a | | n/a | | n/a | | n/a | n/a | n/a | n/a | n/a | n/a |
|
||||
// | n/a | n/a | n/a | n/a | n/a | n/a | n/a | | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
|
||||
bindings = <
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
|
||||
&none &reset &bootloader &none &none &none &none &none &none &none &none &bootloader &reset &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &trans &none &none &trans &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
0
app/boards/shields/redox/redox_left.conf
Normal file
0
app/boards/shields/redox/redox_left.conf
Normal file
19
app/boards/shields/redox/redox_left.overlay
Normal file
19
app/boards/shields/redox/redox_left.overlay
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "redox.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 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>
|
||||
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
0
app/boards/shields/redox/redox_right.conf
Normal file
0
app/boards/shields/redox/redox_right.conf
Normal file
23
app/boards/shields/redox/redox_right.overlay
Normal file
23
app/boards/shields/redox/redox_right.overlay
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "redox.dtsi"
|
||||
|
||||
&default_transform {
|
||||
col-offset = <7>;
|
||||
};
|
||||
|
||||
&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_d 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
Loading…
Add table
Reference in a new issue