A mouse pointer simulation driven by touch input. The pointer slowly brakes to a stop.
Project description
pointer-brakes
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pointer_brakes-0.2.1.tar.gz
.
File metadata
- Download URL: pointer_brakes-0.2.1.tar.gz
- Upload date:
- Size: 312.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823ac83acb7dae405ad730739dd41a6489427543112e295fff689a4380987c16 |
|
MD5 | be50926df5a3d29e68bdcb8d8a620a48 |
|
BLAKE2b-256 | b78e8a3d5be43ec5bc43e61d4cd235a1b594532c6d3b3bd4ad88d63f93ffdb20 |
Provenance
File details
Details for the file pointer_brakes-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pointer_brakes-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d244844f55fc6efda1b31bb2044218f2f944ca145d18732ba266ba69d49aa8 |
|
MD5 | 0b6ca7b72248beb5418600499ced6cd8 |
|
BLAKE2b-256 | 1d13f23df4a48cb8dc8842e6762d7926502f2ffb2a5da1f35c27a757de35483a |