From ced1f59ed0efe9424fe2385e17f98f991e4eb309 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Sat, 23 May 2020 22:56:44 +0900 Subject: [PATCH 1/2] Fixed the indentation of the sample code in docs/feature_pointing_device.md sample. --- docs/feature_pointing_device.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index b90c341d5ed7..9acd26735e4d 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 ```c case MS_SPECIAL: - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) - { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { currentReport.v = 127; - currentReport.h = 127; - currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h - } - else - { + currentReport.h = 127; + currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h + } else { currentReport.v = -127; currentReport.h = -127; currentReport.buttons &= ~MOUSE_BTN1; } - pointing_device_set_report(currentReport); + pointing_device_set_report(currentReport); break; ``` From 37f6bd8494ca3b8542ef88901a701533ad034ee5 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 24 May 2020 00:31:24 +0900 Subject: [PATCH 2/2] Update docs/feature_pointing_device.md Co-authored-by: Joel Challis --- docs/feature_pointing_device.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 9acd26735e4d..f0b3d75bd8dd 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -31,7 +31,7 @@ case MS_SPECIAL: if (record->event.pressed) { currentReport.v = 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 { currentReport.v = -127; currentReport.h = -127;