aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/ps2_mouse.h
diff options
context:
space:
mode:
authorManna Harbour <51143715+manna-harbour@users.noreply.github.com>2020-07-03 06:54:15 +1000
committerGitHub <noreply@github.com>2020-07-02 21:54:15 +0100
commitb7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d (patch)
treec711547dbd79f0dee916a7cf2e28f64ab0820645 /tmk_core/protocol/ps2_mouse.h
parent00fc35539d774c43cde383a8d2cc8b254787ce6c (diff)
downloadfirmware-b7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d.tar.gz
firmware-b7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d.tar.bz2
firmware-b7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d.zip
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);
Diffstat (limited to 'tmk_core/protocol/ps2_mouse.h')
-rw-r--r--tmk_core/protocol/ps2_mouse.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h
index 30053ef18..d743fb3d8 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 <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#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