Skip to content

Commit

Permalink
fix mouse layer references and update script
Browse files Browse the repository at this point in the history
  • Loading branch information
280Zo committed Aug 15, 2024
1 parent 86d35a3 commit ed54c8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
/* optional features */
snipe-layers = <8>;
scroll-layers = <1 2 3 9>;
// automouse-layer = <4>;
// automouse-layer = <7>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion config/charybdis.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -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 &lt 1 BACKSPACE &lt 2 ESCAPE &lt 4 RETURN &lt 3 SPACE
&tdtb &lt 1 BACKSPACE &lt 2 ESCAPE &lt 7 RETURN &lt 3 SPACE
>;
};

Expand Down
6 changes: 3 additions & 3 deletions scripts/convert_keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit ed54c8d

Please sign in to comment.