mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-19 03:36:28 +00:00
Fixed the indentation of the sample code in feature_pointing_device docs (#9177)
* Fixed the indentation of the sample code in docs/feature_pointing_device.md sample. * Update docs/feature_pointing_device.md Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
503cf18aed
commit
f66680d233
1 changed files with 6 additions and 9 deletions
|
@ -27,20 +27,17 @@ In the following example, a custom key is used to click the mouse and scroll 127
|
||||||
|
|
||||||
```c
|
```c
|
||||||
case MS_SPECIAL:
|
case MS_SPECIAL:
|
||||||
report_mouse_t currentReport = pointing_device_get_report();
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
if (record->event.pressed)
|
if (record->event.pressed) {
|
||||||
{
|
|
||||||
currentReport.v = 127;
|
currentReport.v = 127;
|
||||||
currentReport.h = 127;
|
currentReport.h = 127;
|
||||||
currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h
|
currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
currentReport.v = -127;
|
currentReport.v = -127;
|
||||||
currentReport.h = -127;
|
currentReport.h = -127;
|
||||||
currentReport.buttons &= ~MOUSE_BTN1;
|
currentReport.buttons &= ~MOUSE_BTN1;
|
||||||
}
|
}
|
||||||
pointing_device_set_report(currentReport);
|
pointing_device_set_report(currentReport);
|
||||||
break;
|
break;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue