Skip to content

StoaferP/pointer-brakes

Repository files navigation

pointer-brakes

PyPI - Version PyPI - Python Version Pointer Brakes logo -- generated with OpenAI DALL-E 3


Pointer Brakes is a library for simulating mouse pointer motion. The pointer will behave like it is a little car with brakes. If you push it, it moves. If you let go, it keeps moving but slowly comes to a stop as it applies the brakes.

Table of Contents

Installation

pip install pointer-brakes

Usage

NOTE Windows users should prefer time.time_ns() as the resolution is very poor on time.monotonic_ns()

a_brakes = 1
sim_instance = PointerMotionSim(a_brakes)
sim_instance.tick(time.monotonic_ns(), (-52, -5)) 
sim_instance.tick(time.monotonic_ns(), (21, -92))
change_in_position = sim_instance.delta_position

For more information check out the documentation.

License

pointer-brakes is distributed under the terms of the MIT license.

About

A mouse pointer simulation driven by touch input. The pointer slowly brakes to a stop.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages