From 2979ca6c56dd70e79deb4ba96a000f1d2f4f8ff4 Mon Sep 17 00:00:00 2001 From: Shawn Meier Date: Mon, 27 Feb 2023 15:56:47 -0700 Subject: [PATCH 1/3] remove non-existent method from ploopy documentation --- keyboards/ploopyco/trackball/readme.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index 1648bd20f9b6..4f22ed177b55 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -29,17 +29,15 @@ The PCB should indicate which revision this is. While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse sensor. -The default behavior for this is: ```c -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { - mouse_report->h = h; - mouse_report->v = v; -} - -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){ + // executed each time step as the mouse position is updated + ... = mouse_report.x // int8_t x translation of the cursor + ... = mouse_report.y // int8_t y translation of the cursor + ... = mouse_report.h // int8_t horizontal scroll distance + ... = mouse_report.v // int8_t vertical scroll distance + return mouse_report; } ``` From 51686cf2bd53a78ccdda4abfaf4f3f2aba1c0fe7 Mon Sep 17 00:00:00 2001 From: Shawn Meier Date: Mon, 27 Feb 2023 16:01:09 -0700 Subject: [PATCH 2/3] fix indent style --- keyboards/ploopyco/trackball/readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index 4f22ed177b55..f94eec7a2193 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -32,12 +32,12 @@ While the defaults are designed so that it can be plugged in and used right away ```c report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){ - // executed each time step as the mouse position is updated - ... = mouse_report.x // int8_t x translation of the cursor - ... = mouse_report.y // int8_t y translation of the cursor - ... = mouse_report.h // int8_t horizontal scroll distance - ... = mouse_report.v // int8_t vertical scroll distance - return mouse_report; + // executed each time step as the mouse position is updated + ... = mouse_report.x // int8_t x translation of the cursor + ... = mouse_report.y // int8_t y translation of the cursor + ... = mouse_report.h // int8_t horizontal scroll distance + ... = mouse_report.v // int8_t vertical scroll distance + return mouse_report; } ``` From dca62c55fa6e3348e6c6a46cbe3bcc2aac695bd6 Mon Sep 17 00:00:00 2001 From: Shawn Meier Date: Mon, 27 Feb 2023 20:29:37 -0700 Subject: [PATCH 3/3] =?UTF-8?q?apply=20suggestions=20from=20discord=20user?= =?UTF-8?q?=20elpeke=C3=B1in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ploopyco/trackball/readme.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index f94eec7a2193..5c76f1018788 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -32,15 +32,14 @@ While the defaults are designed so that it can be plugged in and used right away ```c report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){ - // executed each time step as the mouse position is updated - ... = mouse_report.x // int8_t x translation of the cursor - ... = mouse_report.y // int8_t y translation of the cursor - ... = mouse_report.h // int8_t horizontal scroll distance - ... = mouse_report.v // int8_t vertical scroll distance + // executed each time the sensor is updated + // mouse_report. - can be used to access indivdual mouse attributes return mouse_report; } ``` +More information on `report_mouse_t` may be found [here](https://docs.qmk.fm/#/feature_pointing_device?id=manipulating-mouse-reports). + This should allow you to more heavily customize the behavior. Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality.