Skip to content

Commit

Permalink
Added MOUSE layer form urob
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebritto committed Dec 2, 2024
1 parent 14e7b1d commit a4c66aa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
15 changes: 14 additions & 1 deletion config/cradio.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#define HYPER LG(LS(LC(LALT)))

// Mouse file and settings from urob's repo (https://github.com/urob/zmk-config)
#include "mouse.dtsi"
#define MOUSE 6

&sk {
quick-release; // Avoids "THis" problem (double capitalization)
release-after-ms = <86400000>;// Default is 1000 ms, raised to 1 day to emulate Callum's behavior that requires canceling on layer key.
Expand Down Expand Up @@ -53,7 +57,7 @@
};

alfred_universal_actions {
bindings = <&kp LC(LS(BACKSLASH))>;
bindings = <&tog MOUSE>;
key-positions = <6 7 8>;
require-prior-idle-ms = <200>;
};
Expand Down Expand Up @@ -286,5 +290,14 @@
&trans &kp LG(LC(Q)) &kp CAPS &trans
>;
};

MOUSE {
bindings = <
&kp TAB &swapper &kp LS(LC(TAB)) &kp LC(TAB) &kp LG(RBKT) &msc SCRL_UP &msc SCRL_LEFT &mmv MOVE_UP &msc SCRL_RIGHT &trans
&kp LCTRL &kp LALT &kp LSHFT &kp LGUI &kp LG(LBKT) &msc SCRL_DOWN &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &trans
&hrml GLOBE LG(Z) &kp LG(X) &kp LG(C) &kp LG(V) &kp F18 &trans &mkp MB4 &mkp MCLK &mkp MB4 &trans
&trans &trans &mkp LCLK &mkp RCLK
>;
}
};
};
28 changes: 28 additions & 0 deletions config/mouse.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// file was copied from urob's repo

#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1500 // 600
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10

#include <dt-bindings/zmk/mouse.h>

// Config from @caksoylar, defaults in comments
&mmv {
acceleration-exponent = <1>; // 1
time-to-max-speed-ms = <500>; // 300
delay-ms = <0>; // 0
};

&msc {
acceleration-exponent = <1>; // 0
time-to-max-speed-ms = <40>; // 300
delay-ms = <0>; // 0
};

#define U_MS_U &mmv MOVE_UP
#define U_MS_D &mmv MOVE_DOWN
#define U_MS_L &mmv MOVE_LEFT
#define U_MS_R &mmv MOVE_RIGHT
#define U_WH_U &msc SCRL_UP
#define U_WH_D &msc SCRL_DOWN
#define U_WH_L &msc SCRL_LEFT
#define U_WH_R &msc SCRL_RIGHT

0 comments on commit a4c66aa

Please sign in to comment.