Skip to content

Commit

Permalink
fix issue where shifted keycodes don't work
Browse files Browse the repository at this point in the history
- mitigate issue where &lt->&kp <symbol> outputs the unshifted code,
  if typed quickly, if using Alacritty
- add behavior that hits shift ->key w/ a small delay
- see zmkfirmware/zmk#759
  • Loading branch information
teresi committed Nov 4, 2023
1 parent 786a24f commit b4971d8
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion config/slicemk_ergodox_dongle.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
#define L_BLU 3
#define L_TST 4


/* shifted-press */
/* fix issue where some programs interpret shifted keycodes w/o the shift; eg. &kp EXCL -> 1 */
/* SEE https://github.com/zmkfirmware/zmk/issues/759 */
/* I observed this if using a &lt -> &kp <symbol>, if pressed rapidly, the number results */
/* I observed this in Alacritty, but not in gnome-terminal */
ZMK_BEHAVIOR(sp, macro_one_param, \
wait-ms = <16>; \
tap-ms = <0>; \
bindings = \
<&macro_press &kp LSHFT>, \
<&macro_param_1to1>, \
<&macro_tap &kp MACRO_PLACEHOLDER>, \
<&macro_release &kp LSHFT>; \
)

/* left-hand HRMs */
ZMK_BEHAVIOR(hml, hold_tap,
flavor = "balanced";
Expand Down Expand Up @@ -100,7 +116,7 @@ ZMK_BEHAVIOR(hmr, hold_tap,
bindings = <
&bootloader
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PERCENT &trans &kp C_PLAY_PAUSE &kp CARET &kp AMPERSAND &kp ASTERISK &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp PIPE
&sp GRAVE &sp N1 &sp N2 &sp N3 &sp N4 &sp N5 &trans &kp C_PLAY_PAUSE &sp N6 &sp N7 &sp N8 &sp N9 &sp N0 &sp BSLH
&kp ESC &kp LT &kp LBRC &kp LBKT &kp MINUS &none &none &kp UNDER &kp RBKT &kp RBRC &kp GT &kp ENTER
&kp LSHIFT &kp LCTRL &kp LALT &kp LMETA &kp PLUS &none &trans &kp C_NEXT &none &kp EQUAL &kt RMETA &kp RALT &kp RCTRL &kp RSHIFT
&none &none &none &none &none &none &none &none &none &none
Expand Down

0 comments on commit b4971d8

Please sign in to comment.