Skip to content

Commit

Permalink
refine upside down layer & combos
Browse files Browse the repository at this point in the history
  • Loading branch information
willpuckett authored and github-actions[bot] committed Jan 16, 2025
1 parent 8ee9b23 commit e7f9c86
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 128 deletions.
4 changes: 4 additions & 0 deletions .images/keymap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ parse_config:
type: text_with_symbol

zmk_combos:
combo_usd_l:
draw_separate: true
combo_usd_r:
draw_separate: true
combo_esc:
draw_separate: true
combo_num_word:
Expand Down
355 changes: 275 additions & 80 deletions .images/keymap_caster.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 27 additions & 23 deletions config/boards/shields/ehrbl/combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
#define RPI 175
#define RPI_LONG 280

ZMK_COMBO(num_word, &rpislnw USD NUM, LM4 LM1, 0, 50, RPI_LONG)
ZMK_COMBO(num_word, &num_word NUM, LM4 LM1, 0, 50, RPI_LONG)
ZMK_COMBO(caps_lock, &kp CAPS, LM1 RM1, 0, 50, RPI)
ZMK_COMBO(caps_word, &rpislcw USD 0, RM1 RM4, 0, 50, RPI_LONG)
ZMK_COMBO(caps_word, &caps_word, RM1 RM4, 0, 50, RPI_LONG)

// Up Side Down
ZMK_COMBO(usd_l, &usd USD USD, LM1 LM2 LM3, 0 USD, 50, RPI_LONG)
ZMK_COMBO(usd_r, &usd USD USD, RM1 RM2 RM3, 0 USD, 50, RPI_LONG)

ZMK_COMBO(grave, &mt TILDE GRAVE, LT4 LT3, 0, 25, RPI)
ZMK_COMBO(esc, &kp ESC, LT3 LT2 LT1, 0 NUM, 25, RPI_LONG)
ZMK_COMBO(esc, &kp ESC, LT3 LT2 LT1, 0 NUM USD, 25, RPI_SHORT)

// Center columns rotated on to home row
ZMK_COMBO(tab, &kp TAB, LM4 LM3, 0 NUM, 25, RPI)
ZMK_COMBO(minus, &mt UNDER MINUS, LM1 LM2, 0 NUM, 25, RPI)
ZMK_COMBO(slash, &mt QMARK SLASH, RM1 RM2, 0 NUM, 25, RPI)
ZMK_COMBO(slash, &mt QMARK SLASH, RM1 RM2, 0 NUM, 25, RPI_SHORT)
ZMK_COMBO(semi, &mt COLON SEMI, RM3 RM4, 0 NUM, 25, RPI)

// Letters
Expand All @@ -22,21 +26,21 @@ ZMK_COMBO(x, &kp X, LT2 LT3, 0, 25, RPI_SHORT)
ZMK_COMBO(z, &kp Z, LB1 LB4, 0, 25, RPI)

// Numbers
ZMK_COMBO(equl, &mt PLUS EQUAL, LT1 LT2, 0 NUM, 25, RPI_LONG)
ZMK_COMBO(bslh, &mt PIPE BSLH, RT1 RT2, 0, 25, RPI_LONG)
ZMK_COMBO(lbkt, &mt LBRC LBKT, RT2 RT3, 0, 25, RPI_LONG)
ZMK_COMBO(rbkt, &mt RBRC RBKT, RB2 RB3, 0, 25, RPI_LONG)

ZMK_COMBO(1, &mt N1 EXCL, LM4 LT4, 0, 50, RPI)
ZMK_COMBO(2, &mt N2 AT, LM3 LT3, 0, 50, RPI)
ZMK_COMBO(3, &mt N3 HASH, LM2 LT2, 0, 50, RPI)
ZMK_COMBO(4, &mt N4 DOLLAR, LM1 LT1, 0, 50, RPI)
ZMK_COMBO(5, &mt N5 PERCENT, LH1 LH2, 0, 50, RPI)
ZMK_COMBO(6, &mt N6 CARET, RH1 RH2, 0, 50, RPI)
ZMK_COMBO(7, &mt N7 AMPS, RM1 RT1, 0, 50, RPI)
ZMK_COMBO(8, &mt N8 STAR, RM2 RT2, 0, 50, RPI)
ZMK_COMBO(9, &mt N9 LPAR, RM3 RT3, 0, 50, RPI)
ZMK_COMBO(0, &mt N0 RPAR, RM4 RT4, 0, 50, RPI)
ZMK_COMBO(equl, &mt PLUS EQUAL, LT1 LT2, 0 NUM, 25, RPI)
ZMK_COMBO(bslh, &mt PIPE BSLH, RT1 RT2, 0, 25, RPI)
ZMK_COMBO(lbkt, &mt LBRC LBKT, RT2 RT3, 0, 25, RPI)
ZMK_COMBO(rbkt, &mt RBRC RBKT, RB2 RB3, 0, 25, RPI)

ZMK_COMBO(1, &mt N1 EXCL, LM4 LT4, 0, 50, RPI_SHORT)
ZMK_COMBO(2, &mt N2 AT, LM3 LT3, 0, 50, RPI_SHORT)
ZMK_COMBO(3, &mt N3 HASH, LM2 LT2, 0, 50, RPI_SHORT)
ZMK_COMBO(4, &mt N4 DOLLAR, LM1 LT1, 0, 50, RPI_SHORT)
ZMK_COMBO(5, &mt N5 PERCENT, LH1 LH2, 0, 50, RPI_SHORT)
ZMK_COMBO(6, &mt N6 CARET, RH1 RH2, 0, 50, RPI_SHORT)
ZMK_COMBO(7, &mt N7 AMPS, RM1 RT1, 0, 50, RPI_SHORT)
ZMK_COMBO(8, &mt N8 STAR, RM2 RT2, 0, 50, RPI_SHORT)
ZMK_COMBO(9, &mt N9 LPAR, RM3 RT3, 0, 50, RPI_SHORT)
ZMK_COMBO(0, &mt N0 RPAR, RM4 RT4, 0, 50, RPI_SHORT)

// Keypad
ZMK_COMBO(kp_pm, &rpi KP_MINUS KP_PLUS, LM4 LB4, NUM, 50, RPI)
Expand All @@ -49,10 +53,10 @@ ZMK_COMBO(copy, &kp LG(C), LB2 LM2, 0, 50, RPI)
ZMK_COMBO(paste, &kp LG(V), LB1 LM1, 0, 50, RPI)

// Navigation
ZMK_COMBO(left, &mt HOME LEFT, RB1 RM1, 0 NUM, 50, RPI)
ZMK_COMBO(down, &mt PG_DN DOWN, RB2 RM2, 0 NUM, 50, RPI)
ZMK_COMBO(up, &mt PG_UP UP, RB3 RM3, 0 NUM, 50, RPI)
ZMK_COMBO(right, &mt END RIGHT, RM4 RB4, 0 NUM, 50, RPI)
ZMK_COMBO(left, &mt HOME LEFT, RB1 RM1, 0 NUM, 50, RPI_SHORT)
ZMK_COMBO(down, &mt PG_DN DOWN, RB2 RM2, 0 NUM, 50, RPI_SHORT)
ZMK_COMBO(up, &mt PG_UP UP, RB3 RM3, 0 NUM, 50, RPI_SHORT)
ZMK_COMBO(right, &mt END RIGHT, RM4 RB4, 0 NUM, 50, RPI_SHORT)

// Bluetooth
ZMK_COMBO(bl_clear, &bt BT_CLR, RB1 RM1, FUN, 50, RPI)
Expand Down
26 changes: 13 additions & 13 deletions config/boards/shields/ehrbl/ehrbl.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@
bindings = <
&kp B &kp F &kp D &kp L &kp P &kp O &kp U &kp Y
&hl LCTRL C &hl LALT S &hl LGUI T &hls LSHFT R &hrs RSHFT N &hr RGUI A &hr RALT I &hr RCTRL H
&kp V &kp W &kp G &kp M &kp K &rpi LT COMMA &rpi GT DOT &rpi DQT SQT
&mqt FUN BSPC &mqt NUM SPACE &kp E &kp RET
&kp V &kp W &kp G &kp M &rpi LT COMMA &rpi GT DOT &rpi DQT SQT &kp K
&mqt FUN BSPC &mqtm NUM SPACE &kp E &kp RET
>;
};
num_layer {
bindings = <
&kp KP_ENTER &rpi AMPS KP_N7 &rpi STAR KP_N8 &rpi LPAR KP_N9 &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &none
&rpi RPAR KP_N0 &rpi DLLR KP_N4 &rpi PRCNT KP_N5 &rpi CARET KP_N6 &hrs LSHFT C_PREV &hr RGUI C_PP &hr RALT C_NEXT &kp RCTRL
&kp KP_DOT &rpi EXCL KP_N1 &rpi AT KP_N2 &rpi HASH KP_N3 &none &none &none &none
&trans &trans &trans &kp K_CANCEL
&kp KP_ENTER &rpi AMPS KP_N7 &rpi STAR KP_N8 &rpi LPAR KP_N9 &trans &trans &trans &trans
&rpi RPAR KP_N0 &rpi DLLR KP_N4 &rpi PRCNT KP_N5 &rpi CARET KP_N6 &hrs LSHFT LEFT &hr RGUI DOWN &hr RALT UP &hr RCTRL RIGHT
&kp KP_DOT &rpi EXCL KP_N1 &rpi AT KP_N2 &rpi HASH KP_N3 &kp HOME &kp PG_DN &kp PG_UP &kp END
&trans &trans &kp K_CANCEL &trans
>;
};
fun_layer {
bindings = <
&kp F12 &kp F7 &kp F8 &kp F9 &trans &trans &trans &trans
&kp F11 &kp F4 &kp F5 &kp F6 &trans &trans &trans &trans
&kp F10 &kp F1 &kp F2 &kp F3 &trans &trans &trans &trans
&trans &trans &trans &trans
&kp F12 &kp F7 &kp F8 &kp F9 &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &none
&kp F11 &kp F4 &kp F5 &kp F6 &kp C_PREV &kp C_PP &kp C_NEXT &none
&kp F10 &kp F1 &kp F2 &kp F3 &trans &trans &trans &trans
&trans &trans &trans &trans
>;
};
the_upside_down_layer {
bindings = <
&kp Y &kp U &kp O &kp P &kp L &kp D &kp F &kp B
&hr LCTRL H &hr LALT I &hr LGUI A &hrs LSHFT N &hls RSHFT R &hl RGUI T &hl RALT S &hl RCTRL C
&rpi DQT SQT &rpi GT DOT &rpi LT COMMA &kp K &kp M &kp G &kp W &kp V
&kp RET &kp E &mqt NUM SPACE &mqt FUN BSPC
&hs LCTRL H &hs LALT I &hs LGUI A &hs LSHFT N &hs RSHFT R &hs RGUI T &hs RALT S &hs RCTRL C
&kp K &rpi DQT SQT &rpi GT DOT &rpi LT COMMA &kp M &kp G &kp W &kp V
&kp RET &kp E &mqtm NUM SPACE &mqt FUN BSPC
>;
};
};
Expand Down
2 changes: 1 addition & 1 deletion config/boards/shields/ehrbl/ehrbl_dongle.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7

# From https://github.com/rain2813/zmk-cygnus-oled/blob/main/config/boards/shields/dongle_display/dongle_display.conf
# CONFIG_ZMK_DISPLAY=y
Expand Down
2 changes: 1 addition & 1 deletion config/boards/shields/ehrbl/ehrbl_left_central.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7
16 changes: 15 additions & 1 deletion config/boards/shields/ehrbl/magic.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,31 @@ ZMK_MACRO(github, wait-ms = <30>; tap-ms = <40>; bindings= <&kp I &kp T &kp H &k
ZMK_MACRO(ght, wait-ms = <30>; tap-ms = <40>; bindings= <&kp G &kp H &kp T>;)
ZMK_MACRO(le, wait-ms = <30>; tap-ms = <40>; bindings= <&kp L &kp E>;)

&sk {
release-after-ms = <2000>;
quick-release;
};

ZMK_MACRO(ss, wait-ms = <10>; tap-ms = <10>; bindings= <&kp SPACE &sk LSHFT>;)

/ {
behaviors {
magic: adaptive_magic {
compatible = "zmk,behavior-antecedent-morph";
label = "ADAPTIVE_MAGIC";
#binding-cells = <0>;
defaults = <&kp RETURN>;
bindings = <&he>, <&an>, <&kp O>, <&nd>, <&ng>, <&er>, <&nt>, <&as>, <&ou>, <&kp E>, <&uld>, <&ent>, <&rom>, <&the>, <&but>, <&github>, <&ght>, <&kp Y>, <&kp O>, <&kp E>;
antecedents = <T C Z A I H E W Y V O M F DOT COMMA G U B J K>;
max-delay-ms = <300>;
};
mgs: adaptive_magic_space {
compatible = "zmk,behavior-antecedent-morph";
#binding-cells = <0>;
defaults = <&kp SPACE>;
bindings = <&ss>, <&ss>, <&ss>;
antecedents = <DOT QMARK EXCL>;
max-delay-ms = <1000>;
};
};
};
// bqjv
29 changes: 20 additions & 9 deletions config/boards/shields/ehrbl/taps.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
/ {
behaviors {

hs: home_row_sticky {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <HM_TAPPING_TERM>;
require-prior-idle-ms = <HM_RPI>;
hold-trigger-on-release;
bindings = <&sk>, <&kp>;
};

hl: home_row_mod_left {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
Expand Down Expand Up @@ -62,36 +72,37 @@
require-prior-idle-ms = <HM_RPI>;
bindings = <&mo>, <&kp>;
};
rpi: require-prior-idle {

mqtm: momentary-quick-tap-magic {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <175>;
quick-tap-ms = <200>;
tapping-term-ms = <200>;
quick-tap-ms = <125>;
require-prior-idle-ms = <HM_RPI>;
bindings = <&kp>, <&kp>;
bindings = <&mo>, <&mgs>;
};

rpislnw: require-prior-idle-sticky-layer-num-word {
rpi: require-prior-idle {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <175>;
quick-tap-ms = <200>;
require-prior-idle-ms = <HM_RPI>;
bindings = <&sl>, <&num_word>;
bindings = <&kp>, <&kp>;
};

rpislcw: require-prior-idle-sticky-layer-caps-word {
usd: up-side-down {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <175>;
quick-tap-ms = <200>;
require-prior-idle-ms = <HM_RPI>;
bindings = <&sl>, <&caps_word>;
bindings = <&tog>, <&sl>;
};


td: tap_dance_mod_tap {
compatible = "zmk,behavior-tap-dance";
Expand Down

0 comments on commit e7f9c86

Please sign in to comment.