Skip to content

Commit

Permalink
Mouse layer
Browse files Browse the repository at this point in the history
  • Loading branch information
potter-man committed Jun 11, 2024
1 parent 3ab0b42 commit 0da23ed
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions config/boards/shields/ergonaut_one/ergonaut_one.keymap
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
#include <behaviors.dtsi>
#include <behaviors/mouse_keys.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/mouse.h>
#include <dt-bindings/zmk/outputs.h>

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

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

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

#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

#define DEF 0
#define LWR 1
#define RSE 2
#define ADJ 3
#define CON 4
#define MOUSE 5

&lt {
quick-tap-ms = <200>;
Expand Down Expand Up @@ -69,7 +95,7 @@
default_layer {
bindings = <
&kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &mt BSLH LBKT
&kp ESC &hmt LSHFT A &hmt LCTRL S &hmt LALT D &hmt LCMD F &kp G &kp H &hmt RCMD J &hmt RALT K &hmt RCTRL L &hmt RSHFT SEMI &kp SQT
&lt MOUSE ESC &hmt LSHFT A &hmt LCTRL S &hmt LALT D &hmt LCMD F &kp G &kp H &hmt RCMD J &hmt RALT K &hmt RCTRL L &hmt RSHFT SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &mt RBKT M &kp COMMA &kp DOT &kp FSLH &kp MINUS
&lt RSE TAB &mt LCMD SPACE &lt LWR SPACE &lt LWR SPACE &mt RCMD BSPC &lt RSE RET
>;
Expand Down Expand Up @@ -97,8 +123,8 @@
bindings = <
&kp C_BRI_DEC &kp C_BRI_INC &kp C_PIP &none &none &none &kp C_PREV &kp C_PP &kp C_NEXT &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &mkp LCLK &mkp MCLK &mkp RCLK &none &none
&trans &none &trans &none &trans &trans
&none &none &none &none &none &none &none &none &none &none &none &none
&trans &trans &trans &trans &trans &trans
>;
};

Expand All @@ -110,5 +136,14 @@
&none &none &none &none &none &none
>;
};

mouse_layer {
bindings = <
&none &none &none &none &none &none &none &mkp LCLK &mkp MCLK &mkp RCLK &none &none
&none &kp LSHFT &kp LCTRL &kp LALT &kp LCMD &none &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_UP &mmv MOVE_RIGHT &none &none
&none &none &none &none &none &none &msc SCRL_LEFT &msc SCRL_DOWN &msc SCRL_UP &msc SCRL_RIGHT &none &none
&trans &trans &trans &trans &trans &trans
>;
};
};
};

0 comments on commit 0da23ed

Please sign in to comment.