diff --git a/drivers/sensors/navigator.c b/drivers/sensors/navigator.c index 6b020c1f23..d82fa980a4 100644 --- a/drivers/sensors/navigator.c +++ b/drivers/sensors/navigator.c @@ -5,8 +5,22 @@ float scroll_accumulated_h = 0; float scroll_accumulated_v = 0; bool set_scrolling = false; +bool navigator_turbo = false; +bool navigator_aim = false; report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + // Turbo mode is used to increase the speed of the mouse cursor + // by multiplying the x and y values by a factor. + if (navigator_turbo) { + mouse_report.x *= NAVIGATOR_TURBO_MULTIPLIER; + mouse_report.y *= NAVIGATOR_TURBO_MULTIPLIER; + } + // Aim mode is used to slow down the mouse cursor + // by dividing the x and y values by a factor. + if (navigator_aim) { + mouse_report.x /= NAVIGATOR_AIM_DIVIDER; + mouse_report.y /= NAVIGATOR_AIM_DIVIDER; + } if (set_scrolling) { scroll_accumulated_h += (float)mouse_report.x / NAVIGATOR_SCROLL_DIVIDER; scroll_accumulated_v += (float)mouse_report.y / NAVIGATOR_SCROLL_DIVIDER; diff --git a/drivers/sensors/navigator.h b/drivers/sensors/navigator.h index cf8639156c..d1504fdac8 100644 --- a/drivers/sensors/navigator.h +++ b/drivers/sensors/navigator.h @@ -1,4 +1,7 @@ #pragma once #ifndef NAVIGATOR_SCROLL_DIVIDER -# define NAVIGATOR_SCROLL_DIVIDER 10 + #define NAVIGATOR_SCROLL_DIVIDER 10 #endif + +#define NAVIGATOR_TURBO_MULTIPLIER 3 +#define NAVIGATOR_AIM_DIVIDER 3