Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Undo shrug helper
Browse files Browse the repository at this point in the history
In some Apps (e.g. VSCode) typing a letter while holding Alt opens up the top menus and screws up the input. Too risky until zmkfirmware/zmk#232 is implemented.
  • Loading branch information
alexvy86 committed May 29, 2023
1 parent ab6aaad commit b28ece2
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions config/corneish_zen.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -140,25 +140,6 @@
};
};

#if !defined OS_UNICODE_LEAD
#if HOST_OS == 2
#define OS_UNICODE_LEAD &macro_press &kp LALT // macOS/Windows-Alt-Codes
#elif HOST_OS == 1
#define OS_UNICODE_LEAD &macro_tap &kp LS(LC(U)) // Linux
#else
#define OS_UNICODE_LEAD &macro_press &kp LALT // Windows
#endif
#endif
#if !defined OS_UNICODE_TRAIL
#if HOST_OS == 2
#define OS_UNICODE_TRAIL &macro_release &kp LALT // macOS/Windows-Alt-Codes
#elif HOST_OS == 1
#define OS_UNICODE_TRAIL &macro_tap &kp SPACE // Linux
#else
#define OS_UNICODE_TRAIL &macro_release &kp LALT // Windows
#endif
#endif

/ {
macros {
// ZMK_MACRO(term,
Expand All @@ -168,25 +149,6 @@
// , <&macro_tap &kp GRAVE>
// , <&macro_release &kp LCTRL>;
// )
ZMK_MACRO(shrug,
wait-ms = <20>;
tap-ms = <20>;
bindings = <OS_UNICODE_LEAD>
, <&macro_tap &kp KP_PLUS &kp N2 &kp N0 &kp N3 &kp E>
, <OS_UNICODE_TRAIL>
, <&macro_tap &kp BACKSLASH>
, <&macro_tap &kp UNDERSCORE>
, <&macro_tap &kp LEFT_PARENTHESIS>
, <OS_UNICODE_LEAD>
, <&macro_tap &kp KP_PLUS &kp N3 &kp N0 &kp C &kp N4>
, <OS_UNICODE_TRAIL>
, <&macro_tap &kp RIGHT_PARENTHESIS>
, <&macro_tap &kp UNDERSCORE>
, <&macro_tap &kp SLASH>
, <OS_UNICODE_LEAD>
, <&macro_tap &kp KP_PLUS &kp N2 &kp N0 &kp N3 &kp E>
, <OS_UNICODE_TRAIL>;
)
};
};

Expand Down Expand Up @@ -247,15 +209,15 @@
label = "NAV";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
// ├ ┼ WIN PRV MON ┼ SNP WIN LFT ┼ SNP WIN RGT ┼ WIN NXT MON ┼ ┤ ├ Shrug Emoji ┼ ┼ PAGE UP ┼ PAGE DOWN ┼ ┼ ┤
// ├ ┼ WIN PRV MON ┼ SNP WIN LFT ┼ SNP WIN RGT ┼ WIN NXT MON ┼ ┤ ├ ┼ ┼ PAGE UP ┼ PAGE DOWN ┼ ┼ ┤
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
// ├ ┼ LSHFT ┼ LALT ┼ LGUI ┼ LCTRL ┼ CONTEXT MENU┤ ├ HOME ┼ LEFT ┼ UP ┼ DOWN ┼ RIGHT ┼ END ┤
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
// ├ ┼ PRV VIR DSK ┼ NXT VIR DSK ┼ PREV TAB ┼ NEXT TAB ┼ CTRL ALT TAB┤ ├ SPC ┼ ┼ ┼ ┼ ┼ ┤
// ╰───────────────────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴───────────────────────────╯
// ├ ┼ ┼ // HELD // ┤ ├ BKSP ┼ DEL ┼ ┤
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
&none &kp GS_LFT &kp G_LFT &kp G_RGT &kp GS_RGT &none &shrug &none &kp PG_UP &kp PG_DN &none &none
&none &kp GS_LFT &kp G_LFT &kp G_RGT &kp GS_RGT &none &none &none &kp PG_UP &kp PG_DN &none &none
&none &kp LSHFT &kp LALT &kp LGUI &kp LCTRL &kp K_APP &kp HOME &kp LEFT &kp UP &kp DOWN &kp RIGHT &kp END
&none &kp PRV_VD &kp NXT_VD &kp PRV_TAB &kp NXT_TAB &kp CA_TAB &kp SPACE &none &none &none &none &none
&none &none &trans &kp BSPC &kp DEL &none
Expand Down

0 comments on commit b28ece2

Please sign in to comment.