Skip to main content

Cross-platform virtual HID device library for AI agents

Project description

useHID Python Bindings

Cross-platform virtual HID device library for Python.

Installation

pip install usehid

Quick Start

from usehid import Mouse, Keyboard, AgentHID

# Basic Mouse
mouse = Mouse()
mouse.move_by(100, 50)
mouse.click()
mouse.double_click("left")
mouse.scroll(-3)  # Scroll down

# Basic Keyboard
keyboard = Keyboard()
keyboard.type_text("Hello, World!")
keyboard.press("enter")
keyboard.combo(["ctrl"], "c")  # Copy

# For AI Agents
agent = AgentHID()

# Execute actions from dict
result = agent.execute({
    "action": "mouse_move",
    "x": 100,
    "y": 200
})

result = agent.execute({
    "action": "type",
    "text": "Hello from AI!"
})

result = agent.execute({
    "action": "key_combo",
    "modifiers": ["ctrl", "shift"],
    "key": "s"
})

Available Actions

Mouse Actions

  • mouse_move - Move mouse by offset (x, y)
  • mouse_click - Click button (button: "left"/"right"/"middle")
  • mouse_double_click - Double click
  • mouse_down - Press button
  • mouse_up - Release button
  • mouse_scroll - Scroll wheel (delta: positive=up, negative=down)

Keyboard Actions

  • type - Type text (text)
  • key_press - Press and release key (key)
  • key_down - Press key
  • key_up - Release key
  • key_combo - Key combination (modifiers: list, key)

Gamepad Actions

  • gamepad_press - Press button
  • gamepad_release - Release button
  • gamepad_left_stick - Set left stick (x, y: 0-255)
  • gamepad_right_stick - Set right stick
  • gamepad_triggers - Set triggers (left, right: 0-255)

Building

cd usehid-python
maturin develop

License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

usehid-0.1.0-cp311-cp311-win_amd64.whl (253.7 kB view details)

Uploaded CPython 3.11Windows x86-64

usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (407.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (370.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file usehid-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: usehid-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 253.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for usehid-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dec824b894839460f1b833fefb3896364912e5b87bcc50358d3940b2a298a05f
MD5 30e4f09aea07f85e6f6519ef6247747d
BLAKE2b-256 26ab6dd5c42c1afa4348308e6d8c3368a4032a5b85cb73fea47fbb76322b1583

See more details on using hashes here.

Provenance

The following attestation bundles were made for usehid-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on jiusanzhou/usehid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7fb1ddfaafb6b13a584778eedd4c86aebdeb7265c220b373f6c5a34c26dbcc9b
MD5 631ad2fe4331e1e15c598d516de0eb20
BLAKE2b-256 dca4a7632abf3314de74f4cab7519d549197fb403c900d31d8a8945470b29f36

See more details on using hashes here.

Provenance

The following attestation bundles were made for usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on jiusanzhou/usehid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fb4c471a57bf847e8b753682152b7080b797845975e8f0af5fb82620ae03da2
MD5 c1c7fef5cd888a871e4499a5ba790ac9
BLAKE2b-256 7506f7503586386c5e5dddb84a41c4446ce99c5216cb4760348b7f1728732367

See more details on using hashes here.

Provenance

The following attestation bundles were made for usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on jiusanzhou/usehid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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