From b7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d Mon Sep 17 00:00:00 2001
From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com>
Date: Fri, 3 Jul 2020 06:54:15 +1000
Subject: Add movement hook to ps2_mouse (#8805)
Process mouse movement in the keymap before it is sent to the host. Example uses
include filtering noise, adding acceleration, and automatically activating a
layer. To use, define the following function in your keymap:
void ps2_mouse_moved_user(report_mouse_t *mouse_report);
---
tmk_core/protocol/ps2_mouse.h | 3 +++
1 file changed, 3 insertions(+)
(limited to 'tmk_core/protocol/ps2_mouse.h')
diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h
index 30053ef187..d743fb3d85 100644
--- a/tmk_core/protocol/ps2_mouse.h
+++ b/tmk_core/protocol/ps2_mouse.h
@@ -20,6 +20,7 @@ along with this program. If not, see .
#include
#include "debug.h"
+#include "report.h"
#define PS2_MOUSE_SEND(command, message) \
do { \
@@ -174,4 +175,6 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
+void ps2_mouse_moved_user(report_mouse_t *mouse_report);
+
#endif
--
cgit v1.2.3