Skip to content

Commit

Permalink
Safeguard dangerous BT behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
proostas committed Jun 29, 2024
1 parent 7f4bedd commit 3adef75
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions config/boards/arm/dao/dao.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,15 @@
delay-ms = <0>;
trigger-period-ms = <8>; // 16
};

// Safety
sbt: safe_bt {
compatible = "zmk,behavior-hold-tap";
flavor = "tap-preferred";
tapping-term-ms = <2000>;
#binding-cells = <2>;
bindings = <&btmac>, <&none>;
};
};

// Mouse
Expand Down Expand Up @@ -731,6 +740,11 @@
, <&bt BT_SEL MACRO_PLACEHOLDER>
;
};
btmac: bt_macro {
compatible = "zmk,behavior-macro-one-param";
#binding-cells = <1>;
bindings = <&macro_param_1to1>, <&bt MACRO_PLACEHOLDER 0>;
};
};

combos {
Expand Down Expand Up @@ -898,9 +912,9 @@
// | (0) | | | | | KRPT | (0) |
// ╰───────┴───────┴───────╯ ╰───────┴───────┴───────╯
bindings = <
&bootloader &bt BT_CLR_ALL &none &out OUT_TOG &out OUT_BLE &out OUT_USB &kp C_STOP &kp C_PP &kp C_VOL_UP &none &none &bootloader
&bt BT_CLR &btsel 0 &btsel 1 &btsel 2 &btsel 3 &btsel 4 &none &kp C_PREV &kp C_VOL_DN &kp C_NEXT &kp C_AL_LOCK &none
&sys_reset &bt BT_DISC 0 &bt BT_DISC 1 &bt BT_DISC 2 &bt BT_DISC 3 &bt BT_DISC 4 &none &none &kp C_MUTE &none &none &sys_reset
&bootloader &sbt BT_CLR_ALL &none &out OUT_TOG &out OUT_BLE &out OUT_USB &kp C_STOP &kp C_PP &kp C_VOL_UP &none &none &bootloader
&sbt BT_CLR &btsel 0 &btsel 1 &btsel 2 &btsel 3 &btsel 4 &none &kp C_PREV &kp C_VOL_DN &kp C_NEXT &kp C_AL_LOCK &none
&sys_reset &bt BT_DISC 0 &bt BT_DISC 1 &bt BT_DISC 2 &bt BT_DISC 3 &bt BT_DISC 4 &none &none &kp C_MUTE &none &none &sys_reset
&none &none &none &none &key_repeat &none
>;
};
Expand Down

0 comments on commit 3adef75

Please sign in to comment.