MagicHID-py
Python client for the MagicHID.
Install
pip install magichid
Quickstart -- high-level API
from core.io.blocking import BlockingClient
from core.reports import ReportTable
from hid import Keyboard, Keycode, Mouse, MouseButton, Digitizer
with BlockingClient("COM5") as c:
c.handshake()
# Keyboard
kb = Keyboard(c, ReportTable.universal())
kb.tap(Keycode.A)
kb.type_text("Hello world")
# Mouse
mouse = Mouse(c, ReportTable.universal())
mouse.move(x=10, y=-5)
mouse.click(MouseButton.LEFT)
# Touch digitizer
dig = Digitizer(c, ReportTable.universal())
dig.down(x=0.5, y=0.5)
dig.move(x=0.6, y=0.5)
dig.up()
35 device classes in hid.universal: keyboard, mouse, gamepad, flight sim, VR headset,
golf club, consumer control, digitizer, haptics, force feedback, unicode input, eye tracker,
accelerometer, medical ultrasound, braille display, lamp array, monitor, UPS, battery,
barcode scanner, scale, MSR, camera, arcade I/O, gaming device, FIDO authenticator, and more.
Horipad (Nintendo Switch, profile 1) in hid.horipad.
Quickstart -- CLI
magichid --port COM5 keyboard type --text "Hello world"
magichid --port COM5 mouse move --x 10 --y -5 --json
magichid --port COM5 digitizer down --x 0.5 --y 0.5
magichid --port COM5 unicode type --text "Hello (U+1F389)"
magichid --port COM5 horipad press --button A --json
magichid --port COM5 soc firmware-chunk --firmware-id 1 --offset 0 --payload-file chunk.bin
# Agent introspection
magichid agent-context | jq .commands.mouse.actions
The CLI is non-interactive by default. --json emits structured stdout. Errors go to stderr
with enumerated valid values. agent-context provides a versioned machine-readable schema.
Metadata
Release files for magichid 0.2.1
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 |
|---|---|---|---|---|
| magichid-0.2.1.tar.gz | 95.9 kB | Without provenance | Details for magichid-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magichid-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for magichid-0.2.1-py3-none-any.whl |
Total release size: 178.4 kB
Release files / magichid-0.2.1.tar.gz
| Download URL | magichid-0.2.1.tar.gz |
|---|---|
| Size | 95.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
639d57de56dfc1a37bab3925bed6cadc69229cb69baa62444321fb4455b74e5a
|
|
BLAKE2b-256 checksum How to use checksums |
612ae6b0d1996b6677a054d24f7fd1256eac1eba1a45fc8c814c9c6cf3f18b43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|
Release files / magichid-0.2.1-py3-none-any.whl
| Download URL | magichid-0.2.1-py3-none-any.whl |
|---|---|
| Size | 82.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d63bd2c6fdd27da52430f3f315e5111160e35440b2b72e971be6a5ea3046730
|
|
BLAKE2b-256 checksum How to use checksums |
71cf1e1efe9443e3627d03909539030c9f5457d0d0ccfc4970623b035bbed75a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|
Security for magichid 0.2.1
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.