mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-01-09 23:22:30 +00:00
feat(automouse): adds automouse scroll threshold parameter (#416)
This commit is contained in:
@@ -243,7 +243,7 @@ __attribute__((weak)) bool auto_mouse_activation(report_mouse_t mouse_report) {
|
||||
auto_mouse_context.total_mouse_movement.y += mouse_report.y;
|
||||
auto_mouse_context.total_mouse_movement.h += mouse_report.h;
|
||||
auto_mouse_context.total_mouse_movement.v += mouse_report.v;
|
||||
return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_THRESHOLD || mouse_report.buttons;
|
||||
return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_SCROLL_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_SCROLL_THRESHOLD || mouse_report.buttons;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
#ifndef AUTO_MOUSE_THRESHOLD
|
||||
# define AUTO_MOUSE_THRESHOLD 10
|
||||
#endif
|
||||
#ifndef AUTO_MOUSE_SCROLL_THRESHOLD
|
||||
# define AUTO_MOUSE_SCROLL_THRESHOLD AUTO_MOUSE_THRESHOLD
|
||||
#endif
|
||||
|
||||
/* data structure */
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user