Skip to content

Commit

Permalink
Merge pull request #5 from erenatas/homerow-testing
Browse files Browse the repository at this point in the history
Sync w/ upstream, enable auto-mouse layer, enable homerow mods
  • Loading branch information
erenatas authored Apr 14, 2024
2 parents 2fcfe2c + b753cc3 commit a10eff3
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 34 deletions.
3 changes: 3 additions & 0 deletions config/boards/shields/charybdis/charybdis_right.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONFIG_ZMK_MOUSE=y
CONFIG_ZMK_EXT_POWER=y

CONFIG_PMW3610=y

# https://github.com/inorichi/zmk-pmw3610-driver/blob/main/Kconfig
CONFIG_PMW3610_CPI=1500
CONFIG_PMW3610_CPI_DIVIDOR=4
CONFIG_PMW3610_ORIENTATION_90=y
Expand All @@ -24,3 +26,4 @@ CONFIG_PMW3610_REST1_SAMPLE_TIME_MS=20
CONFIG_PMW3610_POLLING_RATE_125_SW=y

CONFIG_PMW3610_SMART_ALGORITHM=y
CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=400
5 changes: 4 additions & 1 deletion config/boards/shields/charybdis/charybdis_right.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
reg = <0>;
spi-max-frequency = <2000000>;
irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
scroll-layers = <4>;
/* optional features */
scroll-layers = <5>;
automouse-layer = <4>;
// snipe-layers = <1>;
};
};

Expand Down
1 change: 1 addition & 0 deletions config/charybdis.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_MOUSE=y

CONFIG_BT_PERIPHERAL_PREF_MAX_INT=9
CONFIG_BT_PERIPHERAL_PREF_LATENCY=16
Expand Down
85 changes: 52 additions & 33 deletions config/charybdis.keymap
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
#include <dt-bindings/zmk/mouse.h>
#include <behaviors/mouse_keys.dtsi>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/mouse.h>
#include <dt-bindings/zmk/outputs.h>

&lt {
tapping-term-ms = <240>;
flavor = "tap-preferred";
quick-tap-ms = <150>;
require-prior-idle-ms = <10>;
};

&mt {
tapping-term-ms = <250>;
flavor = "tap-preferred";
require-prior-idle-ms = <250>;
};
#define U_TAPPING_TERM 200

/ {
chosen { zmk,matrix_transform = &default_transform; };
Expand All @@ -36,6 +25,11 @@
key-positions = <20 21>;
};

MiddleClickRight {
bindings = <&mkp MCLK>;
key-positions = <21 22>;
};

ParaLeft {
bindings = <&kp LEFT_PARENTHESIS>;
key-positions = <4 16>;
Expand Down Expand Up @@ -78,6 +72,22 @@
};

behaviors {
u_mt: u_mt {
compatible = "zmk,behavior-hold-tap";
label = "u_mt";
#binding-cells = <2>;
tapping_term_ms = <U_TAPPING_TERM>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
u_lt: u_lt {
compatible = "zmk,behavior-hold-tap";
label = "u_lt";
#binding-cells = <2>;
tapping_term_ms = <U_TAPPING_TERM>;
flavor = "tap-preferred";
bindings = <&mo>, <&kp>;
};
Shift_Enter: Shift_Enter {
compatible = "zmk,behavior-hold-tap";
label = "SHIFT_ENTER";
Expand All @@ -94,46 +104,55 @@

BASE {
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp LCTRL &kp A &kp S &kp D &mt LALT F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp LGUI
&mo 4 &kp SPACE &lt 1 TAB &mo 2 &Shift_Enter RIGHT_SHIFT ENTER
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp TAB &u_mt LEFT_GUI A &u_mt LEFT_ALT S &u_mt LCTRL D &u_mt LEFT_SHIFT F &kp G &kp H &u_mt LEFT_SHIFT J &u_mt RCTRL K &u_mt RIGHT_ALT L &u_mt RIGHT_GUI SEMI &kp APOS
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp LGUI
&kp LGUI &kp SPACE &mo 1 &mo 2 &kp RET
>;
};

NAV {
bindings = <
&trans &trans &kp UP &trans &trans &trans &kp N7 &kp N8 &kp N9 &kp N0 &kp HOME &kp F1
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &kp N4 &kp N5 &kp N6 &trans &trans &kp F10
&trans &trans &trans &trans &trans &trans &kp N1 &kp N2 &kp N3 &trans &trans &kp F20
&trans &trans &trans &lt 3 BACKSPACE &kp LSHFT
&trans &trans &kp UP &trans &trans &trans &kp N7 &kp N8 &kp N9 &kp N0 &kp HOME &kp F1
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &kp N4 &u_mt RIGHT_SHIFT N5 &u_mt RCTRL N6 &trans &trans &kp F10
&trans &trans &trans &trans &trans &trans &kp N1 &kp N2 &kp N3 &trans &trans &kp F20
&trans &trans &trans &lt 3 BACKSPACE &kp LSHFT
>;
};

SYMNUM {
bindings = <
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp DEL
&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &kp UNDER &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&trans &out OUT_TOG &bootloader &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&trans &trans &lt 3 TAB &trans &trans
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp DEL
&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &kp UNDER &u_mt RIGHT_SHIFT EQUAL &u_mt RCTRL LBKT &u_mt RIGHT_ALT RBKT &u_mt RIGHT_GUI BSLH &kp GRAVE
&trans &out OUT_TOG &bootloader &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&trans &trans &lt 3 TAB &trans &trans
>;
};

FUN {
bindings = <
&trans &trans &kp F1 &kp F2 &kp F3 &kp F4 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
&trans &kp DEL &kp F5 &kp F6 &kp F7 &kp F8 &out OUT_TOG &kp K_PLAY_PAUSE &kp C_VOLUME_DOWN &kp C_VOLUME_UP &kp C_MUTE &kp LALT
&trans &trans &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &to 0
&trans &trans &trans &trans &trans
&trans &trans &kp F1 &kp F2 &kp F3 &kp F4 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
&trans &kp DEL &kp F5 &kp F6 &kp F7 &kp F8 &out OUT_TOG &kp K_PLAY_PAUSE &kp C_VOLUME_DOWN &kp C_VOLUME_UP &kp C_MUTE &kp LALT
&trans &trans &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &to 0
&trans &trans &trans &trans &trans
>;
};

AUTO-MOUSE {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&mkp LCLK &mo 5 &mkp RCLK &trans &trans
>;
};

SCROLL {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans
>;
};
};
Expand Down

0 comments on commit a10eff3

Please sign in to comment.