aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_pointing_device.md15
1 files changed, 6 insertions, 9 deletions
diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md
index b90c341d5..f0b3d75bd 100644
--- a/docs/feature_pointing_device.md
+++ b/docs/feature_pointing_device.md
@@ -27,20 +27,17 @@ In the following example, a custom key is used to click the mouse and scroll 127
27 27
28```c 28```c
29case MS_SPECIAL: 29case MS_SPECIAL:
30 report_mouse_t currentReport = pointing_device_get_report(); 30 report_mouse_t currentReport = pointing_device_get_report();
31 if (record->event.pressed) 31 if (record->event.pressed) {
32 {
33 currentReport.v = 127; 32 currentReport.v = 127;
34 currentReport.h = 127; 33 currentReport.h = 127;
35 currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h 34 currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h
36 } 35 } else {
37 else
38 {
39 currentReport.v = -127; 36 currentReport.v = -127;
40 currentReport.h = -127; 37 currentReport.h = -127;
41 currentReport.buttons &= ~MOUSE_BTN1; 38 currentReport.buttons &= ~MOUSE_BTN1;
42 } 39 }
43 pointing_device_set_report(currentReport); 40 pointing_device_set_report(currentReport);
44 break; 41 break;
45``` 42```
46 43