touchscroller
Simulate smooth multi-touch scrolling on Linux with uinput.
On many Linuxes you can only scroll instantly over several lines. This package lets you script pixel-level scrolling by simulating two fingers on a touchpad.
Setup
pip install touchscroller
You must have the uinput kernel module loaded to use touchscroller. Two options:
- Quickly start it for now:
modprobe -i uinput
- Auto load on start up:
echo uinput | sudo tee /etc/modules-load.d/uinput.conf > /dev/null
You also need permissions to create a uinput device. Three options:
- Quickly run as root:
sudo python myscript.py
- Temporary fix until reboot:
sudo chmod 666 /dev/uinput
- Proper, most annoyingly involved way:
# create a udev rule
echo 'KERNEL=="uinput", GROUP="input", MODE="0660"' | sudo tee /etc/udev/rules.d/99-uinput.rules > /dev/null
# add current user to 'input' group
sudo usermod -aG input "$USER"
# reload udev rules and trigger
sudo udevadm control --reload-rules
sudo udevadm trigger
echo 'all done, now reboot or log out and back in'
Usage:
Important note: Before it actually starts scrolling, some threshold value has to be overcome probably in order to prevent accidental scrolling when breathing onto a real touchpad.
from touchscroller import TouchScroller
ts = TouchScroller()
directions = [
(3, 0), (2, 2), (0, 3), (-2, 2),
(-3, 0), (-2, -2), (0, -3), (2, -2)
]
ts = TouchScroller()
with ts.touch() as touch:
for dx, dy in directions:
for _ in range(30):
touch.move(dx, dy)
Metadata
Release files for touchscroller 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| touchscroller-0.1.2.tar.gz | 3.4 kB | Without provenance | Details for touchscroller-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| touchscroller-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for touchscroller-0.1.2-py3-none-any.whl |
Total release size: 7.1 kB
Release files / touchscroller-0.1.2.tar.gz
| Download URL | touchscroller-0.1.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dea7fe7f606540e2a2585f4dd0cf6fa348a8ccba6b4537b7acbcfc80d8b71a1
|
|
BLAKE2b-256 checksum How to use checksums |
d45874284efd4bb2b0f3f3f5ff729e61b53f09684f324bd81f71d1b79b8f4681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / touchscroller-0.1.2-py3-none-any.whl
| Download URL | touchscroller-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db5ca23bb7ff8ee84321d995171fd27a1cb8adfff4c11a29e09d407aa504ef17
|
|
BLAKE2b-256 checksum How to use checksums |
ec11b0110c5b30d640cc39865825c507fdc59cd49bd364c450300aad4c04e0b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for touchscroller 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.