From 0b4a0e74df8e143382bed7bfee3451ffd26ad711 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Wed, 24 Apr 2024 17:29:54 +0200 Subject: [PATCH] chore: use macro for bluetooth --- config/cradio.keymap | 13 ++++++++++++- keymap-drawer/config.yaml | 30 ++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/config/cradio.keymap b/config/cradio.keymap index 3b306b2..a96ae04 100644 --- a/config/cradio.keymap +++ b/config/cradio.keymap @@ -50,6 +50,17 @@ }; }; + macros { + bts: bts { + compatible = "zmk,behavior-macro"; + #binding-cells = <1>; + bindings = + <&out OUT_BLE> + , <¯o_param_1to2> + , <&bt BT_SEL MACRO_PLACEHOLDER>; + }; + }; + combos { compatible = "zmk,combos"; combo_clear { @@ -213,7 +224,7 @@ bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ │ │ │ │ │ │ │ │ │ │ │ - &none &kp LG(N7) &kp LG(N8) &kp LG(N9) &none BT_PRF(0) BT_PRF(1) BT_PRF(2) BT_PRF(3) BT_PRF(4) + &none &kp LG(N7) &kp LG(N8) &kp LG(N9) &none &bts 0 &bts 1 &bts 2 &bts 3 &bts 4 //├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤ //│ │ │ │ │ │ │ │ │ │ │ │ &none &kp LG(N4) &kp LG(N5) &kp LG(N6) &none &none &kp LG(D) &kp LG(N) &kp LG(P) &none diff --git a/keymap-drawer/config.yaml b/keymap-drawer/config.yaml index a5f5b53..b9bcb8e 100644 --- a/keymap-drawer/config.yaml +++ b/keymap-drawer/config.yaml @@ -38,7 +38,27 @@ draw_config: parse_config: preprocess: true skip_binding_parsing: false - raw_binding_map: {} + raw_binding_map: + '&bts 0': + tap: $$mdi:bluetooth-connect$$ + shifted: '0' + type: text_with_symbol + '&bts 1': + tap: $$mdi:bluetooth-connect$$ + shifted: '1' + type: text_with_symbol + '&bts 2': + tap: $$mdi:bluetooth-connect$$ + shifted: '2' + type: text_with_symbol + '&bts 3': + tap: $$mdi:bluetooth-connect$$ + shifted: '3' + type: text_with_symbol + '&bts 4': + tap: $$mdi:bluetooth-connect$$ + shifted: '4' + type: text_with_symblol sticky_label: $$mdi:circle-small$$ toggle_label: $$mdi:toggle-switch$$ tap_toggle_label: tap-toggle @@ -272,4 +292,10 @@ parse_config: NON_US_HASH: '#' NUHS: '#' TILDE2: '~' - zmk_combos: {} + zmk_combos: + combo_l_alt: + align: top + offset: 1.2 + combo_r_alt: + align: top + offset: 1.2