From f3bbb4fefa18c5d0fe77194fc121c34a7385c683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Dessureault?= Date: Wed, 31 Jul 2024 22:23:20 -0400 Subject: [PATCH] fix: homerow mods on mouse layer have undefined macros --- behaviors/hold-tap.dtsi | 24 +++--------------------- behaviors/mouse.dtsi | 5 +++++ config/urchin.keymap | 4 ++-- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/behaviors/hold-tap.dtsi b/behaviors/hold-tap.dtsi index 2851342..ccdf651 100644 --- a/behaviors/hold-tap.dtsi +++ b/behaviors/hold-tap.dtsi @@ -95,29 +95,11 @@ ZMK_HOLD_TAP(hrmic, ) -// homerow mods for scroll down (Mouse) -ZMK_HOLD_TAP(hrmmd, +// homerow mods for scroll (Mouse) +ZMK_HOLD_TAP(hrmw, flavor = "balanced"; tapping-term-ms = ; quick-tap-ms = ; global-quick-tap; - bindings = <&kp>, <&mwh_dn>; -) - -// homerow mods for scroll up (Mouse) -ZMK_HOLD_TAP(hrmmu, - flavor = "balanced"; - tapping-term-ms = ; - quick-tap-ms = ; - global-quick-tap; - bindings = <&kp>, <&mwh_up>; -) - -// homerow mods for scroll left (Mouse) -ZMK_HOLD_TAP(hrmml, - flavor = "balanced"; - tapping-term-ms = ; - quick-tap-ms = ; - global-quick-tap; - bindings = <&kp>, <&mwh_lf>; + bindings = <&kp>, <&msc>; ) diff --git a/behaviors/mouse.dtsi b/behaviors/mouse.dtsi index e2c6ca3..5a07afd 100644 --- a/behaviors/mouse.dtsi +++ b/behaviors/mouse.dtsi @@ -30,6 +30,11 @@ #define mwh_up msc SCRL_UP #define mwh_dn msc SCRL_DOWN +#define MWL SCRL_LEFT +#define MWR SCRL_RIGHT +#define MWU SCRL_UP +#define MWD SCRL_DOWN + // Switch move/scroll on Ploopy Nano by pressing NumLock twice ZMK_MACRO(mwh_tg, bindings = <¯o_tap_time 1>, diff --git a/config/urchin.keymap b/config/urchin.keymap index f764bc2..5b0c6f3 100644 --- a/config/urchin.keymap +++ b/config/urchin.keymap @@ -16,10 +16,10 @@ #include "../chars/typography.dtsi" #include "../layouts/canadian-multilingual-standard.dtsi" #include "../behaviors/combos_34.dtsi" +#include "../behaviors/mouse.dtsi" #include "../behaviors/hold-tap.dtsi" #include "../behaviors/macros.dtsi" #include "../behaviors/mod-morph.dtsi" -#include "../behaviors/mouse.dtsi" ZMK_LAYER(Colemak, // ╭───────────┬───────────┬───────────┬────────────┬────────────╮ ╭───────────┬─────────────┬─────────────┬────────────┬────────────╮ @@ -133,7 +133,7 @@ ZMK_LAYER(Mouse, // ╭───────────┬───────────┬───────────┬────────────┬────────────╮ ╭───────────┬─────────────┬─────────────┬────────────┬────────────╮ XXX XXX &mwh_tg &mmv_dpi XXX XXX XXX XXX XXX XXX // ├───────────┼───────────┼───────────┼────────────┼────────────┤ ├───────────┼─────────────┼─────────────┼────────────┼────────────┤ - XXX &hrmml AL 0 &hrmmu CL 0 &hrmmd SL 0 &mwh_rg &mmv_lf &mmv_dn &mmv_up &mmv_rg XXX + XXX &hrmw AL MWL &hrmw CL MWU &hrmw SL MWD &mwh_rg &mmv_lf &mmv_dn &mmv_up &mmv_rg XXX // ├───────────┼───────────┼───────────┼────────────┼────────────┤ ├───────────┼─────────────┼─────────────┼────────────┼────────────┤ XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX // ╰───────────┴───────────┴───────────┼────────────┼────────────┤ ├───────────┼─────────────┼─────────────┴────────────┴────────────╯