Skip to content

Commit

Permalink
improve USD
Browse files Browse the repository at this point in the history
  • Loading branch information
willpuckett committed Jan 28, 2025
1 parent 9cd3c62 commit 73d7eea
Show file tree
Hide file tree
Showing 7 changed files with 599 additions and 105 deletions.
22 changes: 18 additions & 4 deletions .images/keymap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ parse_config:
type: trans

raw_binding_map:
'&mgs SPACE': $$mdi:keyboard-space$$
'&sys_reset': $$mdi:backup-restore$$
'&bootloader': $$mdi:progress-download$$
'&studio_unlock': $$mdi:lock-open-outline$$
Expand Down Expand Up @@ -139,7 +140,13 @@ parse_config:
draw_separate: true
combo_usd_r:
draw_separate: true
combo_esc:
combo_usd_lt:
draw_separate: true
combo_usd_rt:
draw_separate: true
combo_esc_l:
draw_separate: true
combo_esc_r:
draw_separate: true
combo_num_word:
draw_separate: true
Expand Down Expand Up @@ -186,7 +193,7 @@ parse_config:
LALT: ALT

SPACE: $$mdi:keyboard-space$$
# ESC: $$mdi:keyboard-esc$$
ESC: $$mdi:keyboard-esc$$

RETURN: $$mdi:keyboard-return$$
RET: $$mdi:keyboard-return$$
Expand All @@ -203,6 +210,12 @@ parse_config:
RCTRL: $$mdi:apple-keyboard-control$$
RIGHT_CONTROL: $$mdi:apple-keyboard-control$$

LALT: $$mdi:apple-keyboard-option$$
LEFT_ALT: $$mdi:apple-keyboard-option$$

RALT: $$mdi:apple-keyboard-option$$
RIGHT_ALT: $$mdi:apple-keyboard-option$$

LSHFT: $$mdi:apple-keyboard-shift$$
LSHIFT: $$mdi:apple-keyboard-shift$$
LEFT_SHIFT: $$mdi:apple-keyboard-shift$$
Expand All @@ -211,8 +224,8 @@ parse_config:
RSHIFT: $$mdi:apple-keyboard-shift$$
RIGHT_SHIFT: $$mdi:apple-keyboard-shift$$

LGUI: $$mdi:microsoft-windows$$
RGUI: $$mdi:microsoft-windows$$
LGUI: $$mdi:apple-keyboard-command$$
RGUI: $$mdi:apple-keyboard-command$$

TAB: $$mdi:keyboard-tab$$

Expand Down Expand Up @@ -331,6 +344,7 @@ parse_config:
LT: <
PERIOD: .
DOT: .
KP_DOT: .
GREATER_THAN: '>'
GT: '>'
LEFT_BRACKET: '['
Expand Down
585 changes: 537 additions & 48 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.
27 changes: 13 additions & 14 deletions config/boards/shields/ehrbl/combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ 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, &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)

// Triples (Up Side Down & ESC)
ZMK_COMBO(esc_l, &kp ESC, LT3 LT2 LT1, 0 NUM USD, 25, RPI_SHORT)
ZMK_COMBO(esc_r, &kp ESC, RT3 RT2 RT1, 0 NUM USD, 25, RPI_SHORT)
ZMK_COMBO(usd_l, &usd, LM1 LM2 LM3, 0 USD, 50, RPI)
ZMK_COMBO(usd_r, &usd, RM1 RM2 RM3, 0 USD, 50, RPI)
ZMK_COMBO(usd_lt, &tog USD, LB1 LB2 LB3, 0 USD, 50, RPI)
ZMK_COMBO(usd_rt, &tog USD, RB1 RB2 RB3, 0 USD, 50, RPI)

// Things...
ZMK_COMBO(grave, &mt TILDE GRAVE, LT4 LT3, 0, 25, RPI)
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_SHORT)
ZMK_COMBO(semi, &mt COLON SEMI, RM3 RM4, 0 NUM, 25, 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)

// Letters
ZMK_COMBO(q, &kp Q, LM2 LM3, 0, 25, RPI)
Expand All @@ -26,11 +32,6 @@ 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)
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)
Expand All @@ -41,8 +42,6 @@ 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)
ZMK_COMBO(kp_md, &rpi KP_DIVIDE KP_MULTIPLY, LM4 LT4, NUM, 50, RPI)

Expand Down
10 changes: 5 additions & 5 deletions config/boards/shields/ehrbl/ehrbl.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
>;
};
num_layer {
bindings = <
&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
bindings = <
&kp KP_ENTER &kp KP_N7 &kp KP_N8 &kp KP_N9 &trans &trans &trans &trans
&hl LCTRL KP_N0 &hl LALT KP_N4 &hl LGUI KP_N5 &hls LSHFT KP_N6 &hrs LSHFT LEFT &hr RGUI DOWN &hr RALT UP &hr RCTRL RIGHT
&kp KP_DOT &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp HOME &kp PG_DN &kp PG_UP &kp END
&trans &trans &kp K_CANCEL &trans
>;
};
fun_layer {
Expand Down
25 changes: 3 additions & 22 deletions config/boards/shields/ehrbl/ehrbl_dongle.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,14 @@
&kscan0 {
#ifdef DIRECT
input-gpios
= <&gpio1 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
= <&gpio0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
#else
col-gpios
= <&xiao_d 10 GPIO_ACTIVE_HIGH>
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
, <&xiao_d 8 GPIO_ACTIVE_HIGH>
, <&xiao_d 7 GPIO_ACTIVE_HIGH>
= <&gpio0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
row-gpios
= <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
= <&gpio0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
#endif
};
28 changes: 17 additions & 11 deletions config/boards/shields/ehrbl/taps.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,28 @@
bindings = <&kp>, <&kp>;
};

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 = <&tog>, <&sl>;
};
// 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 = <&tog>, <&sl>;
// };

// td: tap_dance_mod_tap {
// compatible = "zmk,behavior-tap-dance";
// #binding-cells = <0>;
// tapping-term-ms = <200>;
// bindings = <&kp>, <&kp>;
// };

td: tap_dance_mod_tap {
usd: up-side-down {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp>, <&kp>;
bindings = <&sl USD>, <&tog USD>;
};
};
};
7 changes: 6 additions & 1 deletion config/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ include:
- board: seeeduino_xiao_ble
shield: ehrbl_dongle
snippet: studio-rpc-usb-uart
artifact-name: ehrbl_dongle
artifact-name: ehrbl_dongle_xiao

- board: nice_nano_v2
shield: ehrbl_dongle
snippet: studio-rpc-usb-uart
artifact-name: ehrbl_dongle_nice

- board: seeeduino_xiao_ble
shield: settings_reset
Expand Down

0 comments on commit 73d7eea

Please sign in to comment.