From eaa3998008e8520830a1a8f5f6574fe2be95ba06 Mon Sep 17 00:00:00 2001 From: lazydino Date: Tue, 12 Nov 2024 16:24:08 +0900 Subject: [PATCH] =?UTF-8?q?feat(mouse):=20mouse=20auto-layer=EB=8B=A4?= =?UTF-8?q?=EC=8B=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 트랙패드 이동시 자동으로 마우스 레이어로 동작 마우스레이어와 기본레이어에서 R키홀드시 수직 스크롤 마우스레이어와 기본레이어에서 E키홀드시 수평 스크롤 마우스 레이어는 800ms 동안 활성화 되며 더 즉시 비활성화 하고자 하는경우 d+f키 콤보를 누르면 됨 --- .../shields/lazycorne/lazycorne_dongle.conf | 2 + .../lazycorne/lazycorne_dongle.overlay | 1 + config/combos.dtsi | 10 +-- config/lazycorne.keymap | 66 ++++++++++++++----- 4 files changed, 59 insertions(+), 20 deletions(-) diff --git a/boards/shields/lazycorne/lazycorne_dongle.conf b/boards/shields/lazycorne/lazycorne_dongle.conf index f6b9c08..ce6fd52 100644 --- a/boards/shields/lazycorne/lazycorne_dongle.conf +++ b/boards/shields/lazycorne/lazycorne_dongle.conf @@ -22,3 +22,5 @@ CONFIG_I2C=y CONFIG_INPUT=y CONFIG_ZMK_MOUSE=y CONFIG_INPUT_PINNACLE=y + +# CONFIG_ZMK_USB_LOGGING=y diff --git a/boards/shields/lazycorne/lazycorne_dongle.overlay b/boards/shields/lazycorne/lazycorne_dongle.overlay index 6c63b29..c15cefa 100644 --- a/boards/shields/lazycorne/lazycorne_dongle.overlay +++ b/boards/shields/lazycorne/lazycorne_dongle.overlay @@ -3,6 +3,7 @@ / { chosen { zmk,kscan = &mock_kscan; + //zephyr,console = &cdc_acm_uart; }; mock_kscan: kscan_1 { diff --git a/config/combos.dtsi b/config/combos.dtsi index d0a7b65..925409f 100644 --- a/config/combos.dtsi +++ b/config/combos.dtsi @@ -26,6 +26,7 @@ //#define HRC_TAB &hml LS(LALT) TAB #define HRC_REPEAT &hml_repeat LS(LCTRL) 0 #define HRC_CANCEL &hml LS(LCTRL) K_CANCEL +#define HRC_DEF &hml_def LS(LCTRL) 0 #define HRC_LPAR &hmr_lpar_lt RS(LCTRL) 0 #define HRC_RPAR &hmr_rpar_gt RS(LALT) 0 @@ -34,13 +35,14 @@ // ZMK_COMBO(ret, &kp RETURN, LT2 LT1, DEF NAV NUM, COMBO_TERM_FAST, COMBO_IDLE_FAST) // ZMK_COMBO(mouse, &smart_mouse, LT3 LT1, DEF NAV NUM , COMBO_TERM_FAST, COMBO_IDLE_FAST) -ZMK_COMBO(mouse_left, &mkp LCLK, LT1 LT2, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) -ZMK_COMBO(mouse_right, &mkp RCLK, LT2 LT3, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) -ZMK_COMBO(mouse_middle, &mkp MCLK, LT1 LT3, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) +// ZMK_COMBO(mouse_left, &mkp LCLK, LT1 LT2, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) +// ZMK_COMBO(mouse_right, &mkp RCLK, LT2 LT3, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) +// ZMK_COMBO(mouse_middle, &mkp MCLK, LT1 LT3, DEF NAV , COMBO_TERM_FAST, COMBO_IDLE_FAST) // ZMK_COMBO(tab, HRC_TAB, LM3 LM2, DEF NAV NUM, COMBO_TERM_FAST, COMBO_IDLE_FAST) // ZMK_COMBO(repeat,HRC_REPEAT, LM2 LM1, DEF NAV NUM, COMBO_TERM_FAST, COMBO_IDLE_FAST) -ZMK_COMBO(cancel,HRC_CANCEL, LM2 LM1, DEF NAV NUM MOUSE, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(cancel,HRC_CANCEL, LM2 LM1, DEF NAV NUM, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(todef, HRC_DEF, LM2 LM1, MOUSE MOUSEVS MOUSEHS, COMBO_TERM_FAST, COMBO_IDLE_FAST) ZMK_COMBO(cut, &kp LC(X), LB3 LB1, DEF NAV NUM MOUSE, COMBO_TERM_FAST, COMBO_IDLE_FAST) ZMK_COMBO(copy, &kp LC(INS), LB3 LB2, DEF NAV NUM MOUSE, COMBO_TERM_FAST, COMBO_IDLE_FAST) diff --git a/config/lazycorne.keymap b/config/lazycorne.keymap index 0d3b850..b83a059 100644 --- a/config/lazycorne.keymap +++ b/config/lazycorne.keymap @@ -25,6 +25,8 @@ #define SYS 4 #define UC 5 #define MOUSE 6 +#define MOUSEVS 7 +#define MOUSEHS 8 #include "mouse.dtsi" #include "combos.dtsi" @@ -48,13 +50,13 @@ scale-multiplier = <2>; scale-divisor = <1>; // 아직 기능이 완벽하지 않음 터치를 하는동안 인식하는것이 아니라 움직임이 나타나야 인지함 - // bindings = <&ib_tog_layer MOUSE>; + bindings = <&ib_tog_layer MOUSE>; y-invert; }; cirque_scl { compatible = "zmk,input-behavior-listener"; device = <&vtrackpad>; - layers =