From ed54c8d11c0be7913c986606ef0b9a57d4eb332f Mon Sep 17 00:00:00 2001 From: AJ <1754228+280Zo@users.noreply.github.com> Date: Thu, 15 Aug 2024 00:55:27 -0700 Subject: [PATCH] fix mouse layer references and update script --- .../shields/charybdis-mini-wireless/charybdis_right.overlay | 2 +- config/charybdis.keymap | 2 +- scripts/convert_keymap.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/boards/shields/charybdis-mini-wireless/charybdis_right.overlay b/config/boards/shields/charybdis-mini-wireless/charybdis_right.overlay index c2cf6d1e..ac8c5da7 100644 --- a/config/boards/shields/charybdis-mini-wireless/charybdis_right.overlay +++ b/config/boards/shields/charybdis-mini-wireless/charybdis_right.overlay @@ -53,7 +53,7 @@ /* optional features */ snipe-layers = <8>; scroll-layers = <1 2 3 9>; - // automouse-layer = <4>; + // automouse-layer = <7>; }; }; diff --git a/config/charybdis.keymap b/config/charybdis.keymap index 793f6da2..9e487567 100644 --- a/config/charybdis.keymap +++ b/config/charybdis.keymap @@ -88,7 +88,7 @@ &kp C_AC_SEARCH &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &to 4 &hm LG(E) TAB &hm LEFT_GUI A &hm LEFT_ALT S &hm LCTRL D &hm LEFT_SHIFT F &kp G &kp H &hm LEFT_SHIFT J &hm RCTRL K &hm RIGHT_ALT L &hm LEFT_META SEMICOLON &kp DEL &kp LA(LC(T)) &kp Z &mt LC(LA(LEFT_SHIFT)) X &mt LA(LC(LG(LEFT_SHIFT))) C &kp V &kp B &kp N &kp M &mt LA(LC(LG(LEFT_SHIFT))) COMMA &mt LC(LA(LEFT_SHIFT)) PERIOD &kp FSLH &to 5 - &tdtb < 1 BACKSPACE < 2 ESCAPE < 4 RETURN < 3 SPACE + &tdtb < 1 BACKSPACE < 2 ESCAPE < 7 RETURN < 3 SPACE >; }; diff --git a/scripts/convert_keymap.py b/scripts/convert_keymap.py index acc581d4..3fef52aa 100644 --- a/scripts/convert_keymap.py +++ b/scripts/convert_keymap.py @@ -83,18 +83,18 @@ def main(): def convert_keymap(keymap_contents): # Define regex pattern to find the 'Base' keymap section - base_keymap_pattern = re.compile(r'(Base\s*\{\s*bindings\s*=\s*<\s*)(.*?)(\s*>;)', re.DOTALL) + base_keymap_pattern = re.compile(r'(BASE\s*\{\s*bindings\s*=\s*<\s*)(.*?)(\s*>;)', re.DOTALL) # Apply regex substitution to convert keymap new_keymap_contents = base_keymap_pattern.sub(replace_keymap, keymap_contents) return new_keymap_contents - # Find and replace the 'Base' keymap layer + # Find and replace the 'BASE' keymap layer def replace_keymap(match): before_keymap = match.group(1) old_keymap = match.group(2) after_keymap = match.group(3) - print(f"Found Base keymap \n{old_keymap}") + print(f"Found BASE keymap \n{old_keymap}") # Split the old keymap by lines lines = old_keymap.strip().split('\n')