This still has an audience of the "normies" who's work machines are locked down and block random Python scripts.
Agreed, a simple micro-controller emulating as a mouse would've much more elegant.
There are USB devices called jigglers which show up as ordinary HID compliant mouses and wiggle your mouse. They are also designed to solve similar problems.
Re:Show HN: AutoCursor
by ChrisGranger on Tuesday May 18, 2021 @09:37PM
(#27203585)
A simple PyAutoGUI script could do it for free.
Additionally there are USB sticks that register as a mouse and just slightly move the mouse continuously.
Lastly, almost any microcontroller that can act as a HID can do this with the right program.
All of these don't require a battery and can be much cheaper.