Browse Source

fix(shields): Cradio v2 keymap/shield improvements

* fix cradio dtsi add new keymap and readme

Co-authored-by: Dom H <dom@hxy.io>
xmkb
David Barr 4 years ago committed by GitHub
parent
commit
0f28130493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/boards/shields/cradio/Kconfig.defconfig
  2. 1
      app/boards/shields/cradio/README.md
  3. 0
      app/boards/shields/cradio/cradio.conf
  4. 68
      app/boards/shields/cradio/cradio.dtsi
  5. 99
      app/boards/shields/cradio/cradio.keymap
  6. 2
      app/boards/shields/cradio/cradio_left.overlay
  7. 1
      app/boards/shields/cradio/cradio_right.conf
  8. 2
      app/boards/shields/cradio/cradio_right.overlay

10
app/boards/shields/cradio/Kconfig.defconfig

@ -4,7 +4,7 @@
if SHIELD_CRADIO_LEFT if SHIELD_CRADIO_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "cradio left" default "Cradio"
config ZMK_SPLIT_BLE_ROLE_CENTRAL config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y default y
@ -14,13 +14,13 @@ endif
if SHIELD_CRADIO_RIGHT if SHIELD_CRADIO_RIGHT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "cradio right" default "Cradio_Right"
endif endif
if SHIELD_CRADIO_LEFT || SHIELD_CRADIO_RIGHT if SHIELD_CRADIO_RIGHT || SHIELD_CRADIO_LEFT
config ZMK_SPLIT config ZMK_SPLIT
default y default y
endif endif

1
app/boards/shields/cradio/README.md

@ -0,0 +1 @@
Cradio is a firmware for a few 34 key keyboards, including Cradio, Hypergolic and Sweep.

0
app/boards/shields/cradio/cradio.conf

68
app/boards/shields/cradio/cradio.dtsi

@ -3,48 +3,50 @@
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
//zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <34>; columns = <34>;
rows = <1>; rows = <1>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17)
RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22)
RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27)
RC(0,15) RC(0,16) RC(0,33) RC(0,32) RC(0,15) RC(0,16) RC(0,33) RC(0,32)
>; >;
};
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-direct"; compatible = "zmk,kscan-gpio-direct";
label = "KSCAN"; label = "KSCAN";
input-gpios input-gpios
= <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_a 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
; ;
};
};
}; };
};

99
app/boards/shields/cradio/cradio.keymap

@ -9,35 +9,94 @@
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
/ { &mt {
// flavor = "tap-preferred";
// tapping_term_ms = <200>;
};
/ {
combos {
compatible = "zmk,combos";
combo_esc {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp ESC>;
};
combo_tab {
timeout-ms = <50>;
key-positions = <10 11>;
bindings = <&kp TAB>;
};
combo_ralt {
timeout-ms = <50>;
key-positions = <17 16>;
bindings = <&kp RALT>;
};
combo_lalt {
timeout-ms = <50>;
key-positions = <11 12>;
bindings = <&kp LALT>;
};
combo_lgui {
timeout-ms = <50>;
key-positions = <12 13>;
bindings = <&kp LGUI>;
};
combo_rgui {
timeout-ms = <50>;
key-positions = <17 18>;
bindings = <&kp RGUI>;
};
};
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
bindings = < bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp QUOT
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET
&mo 1 &kp LCTRL &kp SPACE &mo 2 &mo 1 &kp LCTL &kp SPC &mo 2
>; >;
}; };
upper_layer {
left_layer {
bindings = < bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &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
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp H &kp J &kp K &kp L &kp SEMI &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL
&mo 1 &kp LCTRL &kp SPACE &mo 2 &mo 1 &kp LGUI &kp RGUI &mo 2
>; >;
}; };
lower_layer { right_layer {
bindings = < bindings = <
&kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN
&trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp PIPE &kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP
&trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH &kp TILDE &kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT
&mo 1 &kp LCTRL &kp SPACE &mo 2 &mo 3 &kp LCTL &kp SPC &mo 2
>; >;
}; };
tri_layer {
bindings = <
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans
&bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans
&trans &trans &trans &trans
>;
};
}; };
}; };

2
app/boards/shields/cradio/cradio_left.overlay

@ -3,5 +3,5 @@
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
#include "cradio.dtsi" #include "cradio.dtsi"

1
app/boards/shields/cradio/cradio_right.conf

@ -1,3 +1,2 @@
# Copyright (c) 2020 The ZMK Contributors # Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT

2
app/boards/shields/cradio/cradio_right.overlay

@ -3,7 +3,7 @@
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
#include "cradio.dtsi" #include "cradio.dtsi"
&default_transform { &default_transform {

Loading…
Cancel
Save