summaryrefslogtreecommitdiff
path: root/quantum/pointing_device/pointing_device.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-09-26 20:49:32 -0700
committerGitHub <noreply@github.com>2022-09-26 20:49:32 -0700
commitfb400f2ac2c57fa0fc82ca803f6450b818bb32f9 (patch)
tree0f9939fc9404fc2104c0c664c6a2ea0c90276558 /quantum/pointing_device/pointing_device.c
parentd909038b28c553f5eb0ecec74f58792155c4d49d (diff)
Enabling Pointing Device support in register code functions (#18363)
Diffstat (limited to 'quantum/pointing_device/pointing_device.c')
-rw-r--r--quantum/pointing_device/pointing_device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c
index 6981f850d0..75bb5f81fc 100644
--- a/quantum/pointing_device/pointing_device.c
+++ b/quantum/pointing_device/pointing_device.c
@@ -22,6 +22,7 @@
#ifdef MOUSEKEY_ENABLE
# include "mousekey.h"
#endif
+
#if (defined(POINTING_DEVICE_ROTATION_90) + defined(POINTING_DEVICE_ROTATION_180) + defined(POINTING_DEVICE_ROTATION_270)) > 1
# error More than one rotation selected. This is not supported.
#endif
@@ -479,3 +480,10 @@ __attribute__((weak)) report_mouse_t pointing_device_task_combined_user(report_m
return pointing_device_combine_reports(left_report, right_report);
}
#endif
+
+__attribute__((weak)) void pointing_device_keycode_handler(uint16_t keycode, bool pressed) {
+ if IS_MOUSEKEY_BUTTON (keycode) {
+ local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - KC_MS_BTN1);
+ pointing_device_send();
+ }
+}