diff --git a/config/my.keymap b/config/my.keymap index e2a849f23..58af2d03b 100644 --- a/config/my.keymap +++ b/config/my.keymap @@ -29,6 +29,111 @@ #define QUICK_TAP_MS 175 +/ { +#ifdef BT_DISC_CMD + behaviors { + bt_0: bt_0 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_0"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_0>, <&bt BT_DISC 0>; + }; + bt_1: bt_1 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_1"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_1>, <&bt BT_DISC 1>; + }; + bt_2: bt_2 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_2"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_2>, <&bt BT_DISC 2>; + }; + bt_3: bt_3 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_3"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_3>, <&bt BT_DISC 3>; + }; + }; + macros { + bt_select_0: bt_select_0 { + label = "BT_SELECT_0"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 0>; + }; + bt_select_1: bt_select_1 { + label = "BT_SELECT_1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 1>; + }; + bt_select_2: bt_select_2 { + label = "BT_SELECT_2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 2>; + }; + bt_select_3: bt_select_3 { + label = "BT_SELECT_3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 3>; + }; + }; +#else + macros { + bt_0: bt_0 { + label = "BT_0"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 0>; + }; + bt_1: bt_1 { + label = "BT_1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 1>; + }; + bt_2: bt_2 { + label = "BT_2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 2>; + }; + bt_3: bt_3 { + label = "BT_3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 3>; + }; + }; +#endif +}; + + &sk { // sticky-key config release-after-ms = <900>; // release after 0.6s quick-release; // no double capitalization when rolling keys