summaryrefslogtreecommitdiff
path: root/keyboards/ploopyco/trackball
diff options
context:
space:
mode:
authorAnomalocaridid <Duncan@anomalocaris.xyz>2021-02-28 01:16:04 -0500
committerGitHub <noreply@github.com>2021-02-28 17:16:04 +1100
commitef49a9243b15cade7bec006f90cd0457c247e000 (patch)
tree0fc1d7ac1788d1db4f05515ae2137ba12ab630dd /keyboards/ploopyco/trackball
parentdb7c8562eddb22350fc9849685bf82aa6dc6f31a (diff)
downloadqmk_firmware-ef49a9243b15cade7bec006f90cd0457c247e000.tar.gz
qmk_firmware-ef49a9243b15cade7bec006f90cd0457c247e000.zip
Implement PLOOPY_DRAGSCROLL_INVERT option, which inverts the ploopy trackball's DRAG_SCROLL's vertical scroll direction. (#12032)
Diffstat (limited to 'keyboards/ploopyco/trackball')
-rw-r--r--keyboards/ploopyco/trackball/trackball.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c
index f59f9788f9..c5effd0050 100644
--- a/keyboards/ploopyco/trackball/trackball.c
+++ b/keyboards/ploopyco/trackball/trackball.c
@@ -255,7 +255,12 @@ void pointing_device_task(void) {
if (is_drag_scroll) {
mouse_report.h = mouse_report.x;
+#ifdef PLOOPY_DRAGSCROLL_INVERT
+ // Invert vertical scroll direction
+ mouse_report.v = -mouse_report.y;
+#else
mouse_report.v = mouse_report.y;
+#endif
mouse_report.x = 0;
mouse_report.y = 0;
}