From 8e70a21ba84b42009336dbcd7707b22f86a5dcf0 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Tue, 8 Jun 2021 21:49:48 +0000 Subject: [PATCH] Improve bluetooth profile selection ; the BT next combo is now a layer activation to pick a profile (1-6) ; the numbering for selection is the same order as the numbers layer --- config/artsey.dtsi | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/config/artsey.dtsi b/config/artsey.dtsi index 25b8edd..25a2b97 100644 --- a/config/artsey.dtsi +++ b/config/artsey.dtsi @@ -83,6 +83,20 @@ // #define MIDDLE_NONES NONE(0, 0, 3) // #define TRAILING_NONES NONE(0, 1, 0) +/***************************************** + * Define custom BT layer extra keys + * + * You can override the 2 blank keys on the BT select layer by copy/pasting the below into your keymap + * *before* including the artsey.dtsfile + * Once added to your keymap you can adjust these 2 keys as you see fit +*****************************************/ +#if !defined ARTSEY_BT_TOP +#define ARTSEY_BT_TOP &none +#endif +#if !defined ARTSEY_BT_BOTTOM +#define ARTSEY_BT_BOTTOM &none +#endif + /***************************************** * Define custom layer * @@ -127,8 +141,9 @@ #define LAYER_ID_SYMBOLS 2 #define LAYER_ID_PARENTHETICALS 3 #define LAYER_ID_NAVIGATION 4 -#define LAYER_ID_CUSTOM 5 -#define LAYER_ID_MOUSE 6 +#define LAYER_ID_BT_SEL 5 +#define LAYER_ID_CUSTOM 6 +#define LAYER_ID_MOUSE 7 /***************************************** * Define how long it takes for the combos/holds to 'time out' @@ -189,7 +204,7 @@ combo_eight { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N8>; }; combo_nine { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N9>; }; combo_zero { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N0>; }; - combo_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; + combo_layer_bt_select { key-positions = ; bindings = <&tog LAYER_ID_BT_SEL>; }; combo_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; combo_layer_navigation { key-positions = ; bindings = <&tog LAYER_ID_NAVIGATION>; }; /* TODO: Setup/Enable once Mouse Keys feature(s) are added to ZMK */ @@ -282,6 +297,16 @@ TRAILING_NONES >; }; + bt { + label = "BT"; + bindings = < + LEADING_NONES + &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 ARTSEY_BT_TOP + MIDDLE_NONES + &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 ARTSEY_BT_BOTTOM + TRAILING_NONES + >; + }; ARTSEY_LAYER_CUSTOM // mouse { /* TODO: Not implemented yet, needs mouse keys in upstream */ // label = "Mouse"; @@ -352,6 +377,16 @@ TRAILING_NONES >; }; + bt { + label = "BT"; + bindings = < + LEADING_NONES + ARTSEY_BT_TOP &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 + MIDDLE_NONES + ARTSEY_BT_BOTTOM &bt BT_SEL 5 &bt BT_SEL 4 &bt BT_SEL 3 + TRAILING_NONES + >; + }; ARTSEY_LAYER_CUSTOM // mouse { /* TODO: Not implemented yet, needs mouse keys in upstream */ // label = "Mouse";