From 53dfdb7ae5988ab606b975a5a574b70737eeb8de Mon Sep 17 00:00:00 2001 From: 280Zo <280Zo@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:29:00 -0700 Subject: [PATCH] update configs to include new driver options --- .../charybdis_left.overlay | 27 ++- .../charybdis_right.overlay | 65 +++---- config/charybdis.keymap | 9 +- keymap-drawer/charybdis.svg | 169 ++++++++---------- keymap-drawer/charybdis.yaml | 100 +++++------ 5 files changed, 177 insertions(+), 193 deletions(-) diff --git a/boards/shields/charybdis-mini-wireless/charybdis_left.overlay b/boards/shields/charybdis-mini-wireless/charybdis_left.overlay index 5ec28a5c..37c392e8 100644 --- a/boards/shields/charybdis-mini-wireless/charybdis_left.overlay +++ b/boards/shields/charybdis-mini-wireless/charybdis_left.overlay @@ -24,4 +24,29 @@ vtrackball: virtual_input_trackball { compatible = "zmk,virtual-input"; }; -}; \ No newline at end of file +}; + +// &pd0 { +// status = "okay"; +// /* the rest of sensor config should be config here, e.g. gpios */ +// }; + +// / { +// /* define virtual input, will be resurrected for emitting input event */ +// /* NOTE: set `device = <&pd1>` in `zmk,input-listener` */ +// pd1: virtual_input { +// compatible = "zmk,virtual-input"; +// }; + +// /* for central side, define (relay-channel)-to-(virtual-input) mapping */ +// input_relay_config_102 { +// compatible = "zmk,split-peripheral-input-relay"; + +// /* channel id, used to filter incoming input event from split peripheral */ +// /* NOTE: should matching relay-channel on peripheral overlay */ +// relay-channel = <111>; + +// /* virtual input device on central, which used to emit input event as an agent device */ +// device = <&pd1>; +// }; +// }; \ No newline at end of file diff --git a/boards/shields/charybdis-mini-wireless/charybdis_right.overlay b/boards/shields/charybdis-mini-wireless/charybdis_right.overlay index ab54fea0..c0e49653 100644 --- a/boards/shields/charybdis-mini-wireless/charybdis_right.overlay +++ b/boards/shields/charybdis-mini-wireless/charybdis_right.overlay @@ -45,52 +45,29 @@ }; }; - - -// // https://github.com/inorichi/zmk-pmw3610-driver -// &pinctrl { -// spi0_default: spi0_default { -// group1 { -// psels = , -// , -// ; -// }; -// }; - -// spi0_sleep: spi0_sleep { -// group1 { -// psels = , -// , -// ; -// low-power-enable; -// }; -// }; +// &pd0 { +// status = "okay"; +// /* the rest of sensor config should be config here, e.g. gpios */ // }; -// &spi0 { -// status = "okay"; -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; -// cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; +// / { +// /* THIS make keymap binding happy only, nothing happen on peripheral side */ +// pd1: virtual_input { +// compatible = "zmk,virtual-input"; +// }; -// trackball: trackball@0 { -// status = "okay"; -// compatible = "pixart,pmw3610"; -// reg = <0>; -// spi-max-frequency = <2000000>; -// irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; -// /* optional features */ -// snipe-layers = <8>; -// scroll-layers = <1 9>; -// automouse-layer = <7>; -// }; -// }; +// /* for peripheral side, define (input-device)-to-(relay-channel) mapping */ +// input_relay_config_111 { +// compatible = "zmk,split-peripheral-input-relay"; -// / { -// trackball_listener { -// compatible = "zmk,input-listener"; -// device = <&trackball>; -// }; +// /* peripheral side input device, used to... */ +// /* - be intecepted on peripheral; */ +// /* - and then, be resurrected as `zmk,virtual-device` on central; */ +// device = <&pd0>; + +// /* channel id, used to be be transfered along with all input events. */ +// /* NOTE 1: pick any 8bit integer. (1 - 255) */ +// /* NOTE 2: should matching relay-channel on central overlay */ +// relay-channel = <111>; +// }; // }; \ No newline at end of file diff --git a/config/charybdis.keymap b/config/charybdis.keymap index 01b69b57..9c94c730 100644 --- a/config/charybdis.keymap +++ b/config/charybdis.keymap @@ -11,9 +11,10 @@ }; / { - trackball_central_listener { + trackball_move_listener { compatible = "zmk,input-behavior-listener"; device = <&vtrackball>; + // device = <&pd0>; layers = <0 2>; evt-type = ; x-input-code = ; @@ -26,6 +27,7 @@ trackball_snipe_listener { compatible = "zmk,input-behavior-listener"; device = <&vtrackball>; + // device = <&pd0>; layers = <8>; evt-type = ; x-input-code = ; @@ -37,12 +39,13 @@ trackball_scroll_listener { compatible = "zmk,input-behavior-listener"; device = <&vtrackball>; + // device = <&pd0>; layers = <1 9>; evt-type = ; x-input-code = ; y-input-code = ; y-invert; - bindings = <&ib_wheel_scaler 1 16>; + bindings = <&ib_wheel_scaler 1 15>; }; ib_wheel_scaler: ib_wheel_scaler { @@ -55,7 +58,7 @@ ib_toggle_layer: ib_toggle_layer { compatible = "zmk,input-behavior-tog-layer"; #binding-cells = <1>; - time-to-live-ms = <750>; + time-to-live-ms = <1000>; }; behaviors { diff --git a/keymap-drawer/charybdis.svg b/keymap-drawer/charybdis.svg index 1157961c..e78ec3f6 100644 --- a/keymap-drawer/charybdis.svg +++ b/keymap-drawer/charybdis.svg @@ -330,9 +330,7 @@ path.combo { stroke: #7f7f7f; } - -SCROLLSNIPE - +&tdtb2 @@ -372,17 +370,13 @@ path.combo { stroke: #7f7f7f; } - -CAPSWORD - +&caps_word - -L_BASEL_EXTRA - +&td_bore @@ -581,17 +575,16 @@ path.combo { stroke: #7f7f7f; } 0 - - - + + + + - -L_BASEL_EXTRA - +&td_bore @@ -691,7 +684,7 @@ path.combo { stroke: #7f7f7f; } -VSPLIT +&VSplit @@ -744,7 +737,7 @@ path.combo { stroke: #7f7f7f; } -HSPLIT +&HSplit @@ -800,9 +793,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1017,9 +1008,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1220,9 +1209,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1434,9 +1421,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1571,9 +1556,7 @@ path.combo { stroke: #7f7f7f; } - -BOOTLDR - +&bootloader @@ -1631,9 +1614,7 @@ path.combo { stroke: #7f7f7f; } - -BOOTLDR - +&bootloader @@ -1659,9 +1640,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1676,35 +1655,35 @@ path.combo { stroke: #7f7f7f; } -WHEELL +&mscMOVE_LEFT -WHEELD +&mscMOVE_UP -MOVEUP +&mmvMOVE_UP -WHEELU +&mscMOVE_DOWN -WHEELR +&mscMOVE_RIGHT @@ -1739,33 +1718,37 @@ path.combo { stroke: #7f7f7f; } -BACK + +&mkpMB4 + -MOVEL +&mmvMOVE_LEFT -MOVED +&mmvMOVE_DOWN -MOVER +&mmvMOVE_RIGHT -FWD + +&mkpMB5 + @@ -1829,7 +1812,7 @@ path.combo { stroke: #7f7f7f; } -MCLK +&mkpMCLK @@ -1859,22 +1842,20 @@ path.combo { stroke: #7f7f7f; } - -SCROLLSNIPE - +&tdtb2 -LCLK +&mkpLCLK -RCLK +&mkpRCLK @@ -1893,9 +1874,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -1910,35 +1889,35 @@ path.combo { stroke: #7f7f7f; } -WHEELL +&mscMOVE_LEFT -WHEELD +&mscMOVE_UP -MOVEUP +&mmvMOVE_UP -WHEELU +&mscMOVE_DOWN -WHEELR +&mscMOVE_RIGHT @@ -1973,33 +1952,37 @@ path.combo { stroke: #7f7f7f; } -BACK + +&mkpMB4 + -MOVEL +&mmvMOVE_LEFT -MOVED +&mmvMOVE_DOWN -MOVER +&mmvMOVE_RIGHT -FWD + +&mkpMB5 + @@ -2063,7 +2046,7 @@ path.combo { stroke: #7f7f7f; } -MCLK +&mkpMCLK @@ -2093,22 +2076,20 @@ path.combo { stroke: #7f7f7f; } - -SCROLLSNIPE - +&tdtb2 -LCLK +&mkpLCLK -RCLK +&mkpRCLK @@ -2127,9 +2108,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore @@ -2144,35 +2123,35 @@ path.combo { stroke: #7f7f7f; } -WHEELL +&mscMOVE_LEFT -WHEELD +&mscMOVE_UP -MOVEUP +&mmvMOVE_UP -WHEELU +&mscMOVE_DOWN -WHEELR +&mscMOVE_RIGHT @@ -2207,33 +2186,37 @@ path.combo { stroke: #7f7f7f; } -BACK + +&mkpMB4 + -MOVEL +&mmvMOVE_LEFT -MOVED +&mmvMOVE_DOWN -MOVER +&mmvMOVE_RIGHT -FWD + +&mkpMB5 + @@ -2297,7 +2280,7 @@ path.combo { stroke: #7f7f7f; } -MCLK +&mkpMCLK @@ -2327,22 +2310,20 @@ path.combo { stroke: #7f7f7f; } - -SCROLLSNIPE - +&tdtb2 -LCLK +&mkpLCLK -RCLK +&mkpRCLK @@ -2361,9 +2342,7 @@ path.combo { stroke: #7f7f7f; } - -L_BASEL_EXTRA - +&td_bore diff --git a/keymap-drawer/charybdis.yaml b/keymap-drawer/charybdis.yaml index e27d1eeb..4c580793 100644 --- a/keymap-drawer/charybdis.yaml +++ b/keymap-drawer/charybdis.yaml @@ -36,7 +36,7 @@ layers: - {t: ., h: MEH} - / - {t: PHOTOS, h: toggle} - - SCROLL SNIPE + - '&tdtb2' - {t: BACK SPACE, h: NUM} - {t: ESCAPE, h: NAV} - {t: RETURN, h: MOUSE} @@ -82,7 +82,7 @@ layers: - {type: held} - '' - '0' - - '' + - {t: ▽, type: trans} NAV: - '' - '' @@ -102,7 +102,7 @@ layers: - {t: ▽, type: trans} - {t: ▽, type: trans} - {t: ▽, type: trans} - - VSPLIT + - '&VSplit' - LEFT - DOWN - UP @@ -114,7 +114,7 @@ layers: - '' - '' - '' - - HSPLIT + - '&HSplit' - HOME - PG DN - PG UP @@ -276,7 +276,7 @@ layers: - STOP - NEXT - '' - - BOOT LDR + - '&bootloader' - '' - '' - '' @@ -287,7 +287,7 @@ layers: - VOLUME UP - MUTE - '' - - BOOT LDR + - '&bootloader' - '' - '' - '' @@ -295,11 +295,11 @@ layers: - '' MOUSE: - '' - - WHEEL L - - WHEEL D - - MOVE UP - - WHEEL U - - WHEEL R + - '&msc MOVE_LEFT' + - '&msc MOVE_UP' + - '&mmv MOVE_UP' + - '&msc MOVE_DOWN' + - '&msc MOVE_RIGHT' - '' - '' - '' @@ -307,11 +307,11 @@ layers: - '' - '' - TAB - - BACK - - MOVE L - - MOVE D - - MOVE R - - FWD + - '&mkp MB4' + - '&mmv MOVE_LEFT' + - '&mmv MOVE_DOWN' + - '&mmv MOVE_RIGHT' + - '&mkp MB5' - '' - RIGHT SHIFT - RCTRL @@ -323,25 +323,25 @@ layers: - CUT - COPY - PASTE - - M CLK + - '&mkp MCLK' - '' - '' - '' - '' - '' - '' - - SCROLL SNIPE - - L CLK - - R CLK + - '&tdtb2' + - '&mkp LCLK' + - '&mkp RCLK' - {t: RETURN, type: held} - {t: SPACE, h: SYM} SLOW: - '' - - WHEEL L - - WHEEL D - - MOVE UP - - WHEEL U - - WHEEL R + - '&msc MOVE_LEFT' + - '&msc MOVE_UP' + - '&mmv MOVE_UP' + - '&msc MOVE_DOWN' + - '&msc MOVE_RIGHT' - '' - '' - '' @@ -349,11 +349,11 @@ layers: - '' - '' - TAB - - BACK - - MOVE L - - MOVE D - - MOVE R - - FWD + - '&mkp MB4' + - '&mmv MOVE_LEFT' + - '&mmv MOVE_DOWN' + - '&mmv MOVE_RIGHT' + - '&mkp MB5' - '' - RIGHT SHIFT - RCTRL @@ -365,25 +365,25 @@ layers: - CUT - COPY - PASTE - - M CLK + - '&mkp MCLK' - '' - '' - '' - '' - '' - '' - - SCROLL SNIPE - - L CLK - - R CLK + - '&tdtb2' + - '&mkp LCLK' + - '&mkp RCLK' - RETURN - {t: SPACE, h: SYM} SCROLL: - '' - - WHEEL L - - WHEEL D - - MOVE UP - - WHEEL U - - WHEEL R + - '&msc MOVE_LEFT' + - '&msc MOVE_UP' + - '&mmv MOVE_UP' + - '&msc MOVE_DOWN' + - '&msc MOVE_RIGHT' - '' - '' - '' @@ -391,11 +391,11 @@ layers: - '' - '' - TAB - - BACK - - MOVE L - - MOVE D - - MOVE R - - FWD + - '&mkp MB4' + - '&mmv MOVE_LEFT' + - '&mmv MOVE_DOWN' + - '&mmv MOVE_RIGHT' + - '&mkp MB5' - '' - RIGHT SHIFT - RCTRL @@ -407,16 +407,16 @@ layers: - CUT - COPY - PASTE - - M CLK + - '&mkp MCLK' - '' - '' - '' - '' - '' - '' - - SCROLL SNIPE - - L CLK - - R CLK + - '&tdtb2' + - '&mkp LCLK' + - '&mkp RCLK' - RETURN - {t: SPACE, h: SYM} combos: @@ -424,7 +424,7 @@ combos: k: DELETE l: [BASE] - p: [17, 18] - k: CAPS WORD + k: '&caps_word' l: [BASE] - p: [38, 39] - k: L_BASE L_EXTRA + k: '&td_bore'