diff options
author | Drashna Jaelre <drashna@live.com> | 2020-06-10 15:18:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 23:18:53 +0100 |
commit | 573d1fbb929b83989e3b5933852282299d87d467 (patch) | |
tree | 359682639557e2ba5b1e9e1968a587fc018aefd3 /docs/feature_pointing_device.md | |
parent | 437446ba8f636afbc2048aa655fc1c2662fbe2ce (diff) | |
download | qmk_firmware-573d1fbb929b83989e3b5933852282299d87d467.tar.gz qmk_firmware-573d1fbb929b83989e3b5933852282299d87d467.zip |
Include `pointing_device_send` in docs (#9185)
Diffstat (limited to 'docs/feature_pointing_device.md')
-rw-r--r-- | docs/feature_pointing_device.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index f0b3d75bd8..c9309d6975 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -21,7 +21,11 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). * `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1. -When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in "pointing_device_send()", which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. +Once you have made the necessary changes to the mouse report, you need to send it: + +* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report. + +When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: @@ -38,6 +42,7 @@ case MS_SPECIAL: currentReport.buttons &= ~MOUSE_BTN1; } pointing_device_set_report(currentReport); + pointing_device_send(); break; ``` |