Instead of counting loops for the purpose of calculating acceleration, use
timers and steps instead. This means that we can now tune how often the mouse
moves (`speedDelay`), how much it moves when it does (`speed`), how fast
acceleration is (`accelSpeed`), and how often we accelerate (`accelDelay`).
By default, the movement speed is one, and there is no delay, while acceleration
has an 50ms delay, and a speed of one.
But all of these can be tuned at run-time: we can turn off acceleration
completely, or slow down the mouse considerably - the possibilities are almost
endless!
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Instead of calculating separate acceleration for the x and y axes, use only a
single one, that applies to both axes. Thus, holding mouse up, and then pressing
and holding right will move the mouse cursor in a straight diagonal line,
instead of a curve.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This is the same Keyboardio-MouseKeys that lived in core KeyboardioFirmware up
until this point. It has been lifted out, the same GPL-2 license file added,
along with a README, and the URL in library.properties has been updated.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>