summaryrefslogtreecommitdiff
path: root/keyboards/ploopyco/mouse
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ploopyco/mouse')
-rw-r--r--keyboards/ploopyco/mouse/mouse.c25
-rw-r--r--keyboards/ploopyco/mouse/readme.md2
2 files changed, 5 insertions, 22 deletions
diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c
index 7e44feaf74..788a0a1f08 100644
--- a/keyboards/ploopyco/mouse/mouse.c
+++ b/keyboards/ploopyco/mouse/mouse.c
@@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) {
if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy);
// dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i));
- process_mouse_user(mouse_report, data.dx, -data.dy);
+ process_mouse_user(mouse_report, data.dx, data.dy);
}
}
@@ -171,31 +171,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
if (IS_MOUSEKEY_BUTTON(keycode)) {
report_mouse_t currentReport = pointing_device_get_report();
if (record->event.pressed) {
- if (keycode == KC_MS_BTN1)
- currentReport.buttons |= MOUSE_BTN1;
- else if (keycode == KC_MS_BTN2)
- currentReport.buttons |= MOUSE_BTN2;
- else if (keycode == KC_MS_BTN3)
- currentReport.buttons |= MOUSE_BTN3;
- else if (keycode == KC_MS_BTN4)
- currentReport.buttons |= MOUSE_BTN4;
- else if (keycode == KC_MS_BTN5)
- currentReport.buttons |= MOUSE_BTN5;
+ currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
} else {
- if (keycode == KC_MS_BTN1)
- currentReport.buttons &= ~MOUSE_BTN1;
- else if (keycode == KC_MS_BTN2)
- currentReport.buttons &= ~MOUSE_BTN2;
- else if (keycode == KC_MS_BTN3)
- currentReport.buttons &= ~MOUSE_BTN3;
- else if (keycode == KC_MS_BTN4)
- currentReport.buttons &= ~MOUSE_BTN4;
- else if (keycode == KC_MS_BTN5)
- currentReport.buttons &= ~MOUSE_BTN5;
+ currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
}
pointing_device_set_report(currentReport);
pointing_device_send();
}
+
#endif
return true;
diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md
index fd0f932c62..5532a19986 100644
--- a/keyboards/ploopyco/mouse/readme.md
+++ b/keyboards/ploopyco/mouse/readme.md
@@ -17,7 +17,7 @@ To jump to the bootloader, hold down "Button 4" (the "forward" button on the lef
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
-# Customzing your PloopyCo Trackball
+# Customzing your PloopyCo Mouse
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 censor.