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 clickmouse_down- Press buttonmouse_up- Release buttonmouse_scroll- Scroll wheel (delta: positive=up, negative=down)
Keyboard Actions
type- Type text (text)key_press- Press and release key (key)key_down- Press keykey_up- Release keykey_combo- Key combination (modifiers: list,key)
Gamepad Actions
gamepad_press- Press buttongamepad_release- Release buttongamepad_left_stick- Set left stick (x,y: 0-255)gamepad_right_stick- Set right stickgamepad_triggers- Set triggers (left,right: 0-255)
Building
cd usehid-python
maturin develop
License
MIT
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec824b894839460f1b833fefb3896364912e5b87bcc50358d3940b2a298a05f
|
|
| MD5 |
30e4f09aea07f85e6f6519ef6247747d
|
|
| BLAKE2b-256 |
26ab6dd5c42c1afa4348308e6d8c3368a4032a5b85cb73fea47fbb76322b1583
|
Provenance
The following attestation bundles were made for usehid-0.1.0-cp311-cp311-win_amd64.whl:
Publisher:
publish.yml on jiusanzhou/usehid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usehid-0.1.0-cp311-cp311-win_amd64.whl -
Subject digest:
dec824b894839460f1b833fefb3896364912e5b87bcc50358d3940b2a298a05f - Sigstore transparency entry: 973392694
- Sigstore integration time:
-
Permalink:
jiusanzhou/usehid@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/jiusanzhou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 407.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fb1ddfaafb6b13a584778eedd4c86aebdeb7265c220b373f6c5a34c26dbcc9b
|
|
| MD5 |
631ad2fe4331e1e15c598d516de0eb20
|
|
| BLAKE2b-256 |
dca4a7632abf3314de74f4cab7519d549197fb403c900d31d8a8945470b29f36
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usehid-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl -
Subject digest:
7fb1ddfaafb6b13a584778eedd4c86aebdeb7265c220b373f6c5a34c26dbcc9b - Sigstore transparency entry: 973392698
- Sigstore integration time:
-
Permalink:
jiusanzhou/usehid@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/jiusanzhou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 370.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb4c471a57bf847e8b753682152b7080b797845975e8f0af5fb82620ae03da2
|
|
| MD5 |
c1c7fef5cd888a871e4499a5ba790ac9
|
|
| BLAKE2b-256 |
7506f7503586386c5e5dddb84a41c4446ce99c5216cb4760348b7f1728732367
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usehid-0.1.0-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
9fb4c471a57bf847e8b753682152b7080b797845975e8f0af5fb82620ae03da2 - Sigstore transparency entry: 973392690
- Sigstore integration time:
-
Permalink:
jiusanzhou/usehid@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/jiusanzhou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bc790ec2edd92838fc6b41bdc17ffc7a025e3a81 -
Trigger Event:
push
-
Statement type: