diff options
-rw-r--r-- | config/cradio.keymap | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/config/cradio.keymap b/config/cradio.keymap index 1967301..01f635d 100644 --- a/config/cradio.keymap +++ b/config/cradio.keymap | |||
@@ -30,58 +30,6 @@ | |||
30 | quick_tap_ms = <75>; | 30 | quick_tap_ms = <75>; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | #define ZMK_HELPER_STRINGIFY(x) #x | ||
34 | |||
35 | /* ZMK_BEHAVIOR */ | ||
36 | |||
37 | #define ZMK_BEHAVIOR_CORE_caps_word compatible = "zmk,behavior-caps-word"; #binding-cells = <0> | ||
38 | #define ZMK_BEHAVIOR_CORE_dynamic_macro compatible = "zmk,behavior-dynamic-macro"; #binding-cells = <1> | ||
39 | #define ZMK_BEHAVIOR_CORE_hold_tap compatible = "zmk,behavior-hold-tap"; #binding-cells = <2> | ||
40 | #define ZMK_BEHAVIOR_CORE_key_repeat compatible = "zmk,behavior-key-repeat"; #binding-cells = <0> | ||
41 | #define ZMK_BEHAVIOR_CORE_macro compatible = "zmk,behavior-macro"; #binding-cells = <0> | ||
42 | #define ZMK_BEHAVIOR_CORE_macro_one_param compatible = "zmk,behavior-macro-one-param"; #binding-cells = <1> | ||
43 | #define ZMK_BEHAVIOR_CORE_macro_two_param compatible = "zmk,behavior-macro-two-param"; #binding-cells = <2> | ||
44 | #define ZMK_BEHAVIOR_CORE_mod_morph compatible = "zmk,behavior-mod-morph"; #binding-cells = <0> | ||
45 | #define ZMK_BEHAVIOR_CORE_sticky_key compatible = "zmk,behavior-sticky-key"; #binding-cells = <1> | ||
46 | #define ZMK_BEHAVIOR_CORE_tap_dance compatible = "zmk,behavior-tap-dance"; #binding-cells = <0> | ||
47 | #define ZMK_BEHAVIOR_CORE_tri_state compatible = "zmk,behavior-tri-state"; #binding-cells = <0> | ||
48 | |||
49 | #define ZMK_BEHAVIOR(name, type, ...) \ | ||
50 | / { \ | ||
51 | behaviors { \ | ||
52 | name: name { \ | ||
53 | label = ZMK_HELPER_STRINGIFY(ZB_ ## name); \ | ||
54 | ZMK_BEHAVIOR_CORE_ ## type; \ | ||
55 | __VA_ARGS__ \ | ||
56 | }; \ | ||
57 | }; \ | ||
58 | }; | ||
59 | |||
60 | #define KEYS_L 0 1 2 3 4 10 11 12 13 14 20 21 22 23 24 | ||
61 | #define KEYS_R 5 6 7 8 9 15 16 17 18 19 25 26 27 28 29 | ||
62 | #define THUMBS 30 31 32 33 | ||
63 | |||
64 | /* left-hand HRMs */ | ||
65 | ZMK_BEHAVIOR(ml, hold_tap, | ||
66 | flavor = "hold-preferred"; | ||
67 | tapping-term-ms = <280>; | ||
68 | quick-tap-ms = <175>; | ||
69 | bindings = <&kp>, <&kp>; | ||
70 | hold-trigger-key-positions = <KEYS_R THUMBS>; | ||
71 | hold-trigger-on-release; // delay positional check until key-release | ||
72 | global-quick-tap; | ||
73 | ) | ||
74 | |||
75 | /* right-hand HRMs */ | ||
76 | ZMK_BEHAVIOR(mr, hold_tap, | ||
77 | flavor = "hold-preferred"; | ||
78 | tapping-term-ms = <280>; | ||
79 | quick-tap-ms = <100>; | ||
80 | bindings = <&kp>, <&kp>; | ||
81 | hold-trigger-key-positions = <KEYS_L THUMBS>; | ||
82 | hold-trigger-on-release; // delay positional check until key-release | ||
83 | global-quick-tap; | ||
84 | ) | ||
85 | 33 | ||
86 | / { | 34 | / { |
87 | 35 | ||
@@ -170,10 +118,10 @@ ZMK_BEHAVIOR(mr, hold_tap, | |||
170 | compatible = "zmk,keymap"; | 118 | compatible = "zmk,keymap"; |
171 | default_layer { | 119 | default_layer { |
172 | bindings = < | 120 | bindings = < |
173 | &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SCLN | 121 | &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SCLN |
174 | &ml LGUI A &ml LALT R &ml LSHIFT S &ml LCTRL T &ml LG(LA(LS(LCTRL))) D &mr LG(LA(LS(LCTRL))) H &mr LCTRL N &mr RSHIFT E &mr LALT I &mr LGUI O | 122 | &kp A &kp R < FUN S < NAV T &kp D &kp H < SYM N < NUM E &kp I &kp O |
175 | &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &kp CMMA &kp DOT &kp FSLH | 123 | &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &kp CMMA &kp DOT &kp FSLH |
176 | < FUN TAB < NAV SPC < SYM RET < NUM LSHIFT | 124 | &mt LALT TAB &mt LGUI SPC &mt LSHIFT RET &mt LCTRL BSPC |
177 | >; | 125 | >; |
178 | }; | 126 | }; |
179 | 127 | ||