Skip to main content

Linux uinput keyboard/mouse input surface primitive for urirun — synthesize key/click/move events via /dev/uinput ioctls. Pure stdlib, no urirun dependency.

Project description

urirun-uinput

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.0132 (2 commits)
  • 👤 Human dev: ~$459 (4.6h @ $100/h, 30min dedup)

Generated on 2026-07-05 using openrouter/qwen/qwen3-coder-next


The Linux uinput keyboard/mouse input surface primitive for urirun, extracted from urirun.connectors.inputs.uinput as a standalone, dependency-free package.

It synthesizes real keyboard and pointer events by writing to /dev/uinput via ioctls — the input half of a desktop surface (the capture half is the KVM connector / mutter backend). Pure stdlib (fcntl, os, struct, time) — no urirun dependency — so any connector can adopt it without pulling in the backend.

Why it's its own package

extraction_audit.py --preset E reports the connectors toolkit (which this belongs to) GREEN, and uinput itself pulls only stdlib. It is consumed by URI, swappable, and reusable across connectors — the same lift case as urirun-cdp. The KVM connector injects its own resolvers and adopts it.

Install

pip install -e .          # editable, from this repo

Back-compat

The old import path still works via a re-export shim in the urirun package:

from urirun.connectors.inputs import uinput   # → urirun_uinput.uinput (sys.modules shim)

So existing code and the test_kernel_adoption contract test (which guards the symbols the KVM connector relies on) keep working unchanged. That contract test skips gracefully when this package isn't installed, matching how the connector packages are tested in their own CI rather than urirun's.

Tests

PYTHONPATH=../urirun/adapters/python python -m pytest tests/ -q

The surface's own tests live here (tests/test_uinput.py); they exercise the event-encoding primitives without a real /dev/uinput device.

License

Licensed under Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urirun_uinput-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urirun_uinput-0.1.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file urirun_uinput-0.1.1.tar.gz.

File metadata

  • Download URL: urirun_uinput-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for urirun_uinput-0.1.1.tar.gz
Algorithm Hash digest
SHA256 791fc60f579ce08465c87af7b23e2899e8b0bc3ec6116a58379cabf56731571b
MD5 3a3955f85dd35bb1d62614539b3362fe
BLAKE2b-256 696626e99c1bb20cd061cc91587e6e1cdf900a5f60b00522c59bbb80d2aa765f

See more details on using hashes here.

File details

Details for the file urirun_uinput-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: urirun_uinput-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for urirun_uinput-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7031ee63aea4fa09e9b4d42760f4faf45f03926cc4411655a13ab907c03c4b80
MD5 5a979fbead0f1c5220fdeb0442768d03
BLAKE2b-256 7ae80dd8a222a93f055cc3dc31888416f92e0366327a052239a9c8570de2e6e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page