zero-hid


Namezero-hid JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/thewh1teagle/zero-hid
SummaryLibrary for emulate mouse and keyboard on raspberry pi zero
upload_time2024-08-04 06:02:56
maintainerNone
docs_urlNone
authorthewh1teagle
requires_pythonNone
licenseLGPL
keywords rpi raspberry hid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<img width=550 src="https://github.com/thewh1teagle/zero-hid/assets/61390950/13608efd-15c1-4fdd-86b5-e411e15fa638">

HID python library for emulating mouse and keyboard on PI.


## Setup

1. Install apt dependencies

```console
sudo apt-get update
sudo apt-get install -y git python3-pip python3-venv
```  

2. install [usb gadget module](https://github.com/thewh1teagle/zero-hid/tree/main/usb_gadget#usb-gadget-module-configuration-for-zero-hid)

3. Create virtual environment

```console
python3 -m venv ~/venv
source ~/venv/bin/activate
```

4. Install `zero-hid` with `pip`
```console
pip3 install zero-hid
```
5. Reboot *if not already!*

## Usage
Note: You should connect the data usb port (left one) to the raspberry, and **NOT** the power port  
  
- Control mouse
```python
from zero_hid import Mouse
m = Mouse()
for i in range(5):
    m.move(10, 10)
```
- Control keyboard
```python
from zero_hid import Keyboard

k = Keyboard()
k.type('Hello world!')
```

## Features
- Relative / Absolute mouse movements
- Left / Right / Middle click
- Scrolling
- Typing
- Hot keys
- Drag and Drop
- LEDs status
- Easy to setup
- Comprehensive Testing

## Examples
see [examples](examples)

## Tests

| Raspberry Pi Model | Raspbian Version      | Kernel Version | Date of Testing |
|--------------------|-----------------------|----------------|-----------------|
| Raspberry Pi 4     | Raspbian 12 (bookworm)| 6.6.31         | 04/08/2024      |
| Raspberry Pi 4     | Raspbian 12           | 6.1            | 01/01/2023      |
| Raspberry Pi Zero  | Raspbian 5.10         | -              | 01/01/2023      |

## Gotachas

---
Absolute mouse used only for positining. use relative mouse for clicking etc. see examples.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thewh1teagle/zero-hid",
    "name": "zero-hid",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "rpi, raspberry, hid",
    "author": "thewh1teagle",
    "author_email": "example@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8a/10/ec78ce642355937c3e7fb298ff4a1fff2d357a86c65d2828fbeb48bc03fe/zero_hid-1.0.1.tar.gz",
    "platform": null,
    "description": "\n<img width=550 src=\"https://github.com/thewh1teagle/zero-hid/assets/61390950/13608efd-15c1-4fdd-86b5-e411e15fa638\">\n\nHID python library for emulating mouse and keyboard on PI.\n\n\n## Setup\n\n1. Install apt dependencies\n\n```console\nsudo apt-get update\nsudo apt-get install -y git python3-pip python3-venv\n```  \n\n2. install [usb gadget module](https://github.com/thewh1teagle/zero-hid/tree/main/usb_gadget#usb-gadget-module-configuration-for-zero-hid)\n\n3. Create virtual environment\n\n```console\npython3 -m venv ~/venv\nsource ~/venv/bin/activate\n```\n\n4. Install `zero-hid` with `pip`\n```console\npip3 install zero-hid\n```\n5. Reboot *if not already!*\n\n## Usage\nNote: You should connect the data usb port (left one) to the raspberry, and **NOT** the power port  \n  \n- Control mouse\n```python\nfrom zero_hid import Mouse\nm = Mouse()\nfor i in range(5):\n    m.move(10, 10)\n```\n- Control keyboard\n```python\nfrom zero_hid import Keyboard\n\nk = Keyboard()\nk.type('Hello world!')\n```\n\n## Features\n- Relative / Absolute mouse movements\n- Left / Right / Middle click\n- Scrolling\n- Typing\n- Hot keys\n- Drag and Drop\n- LEDs status\n- Easy to setup\n- Comprehensive Testing\n\n## Examples\nsee [examples](examples)\n\n## Tests\n\n| Raspberry Pi Model | Raspbian Version      | Kernel Version | Date of Testing |\n|--------------------|-----------------------|----------------|-----------------|\n| Raspberry Pi 4     | Raspbian 12 (bookworm)| 6.6.31         | 04/08/2024      |\n| Raspberry Pi 4     | Raspbian 12           | 6.1            | 01/01/2023      |\n| Raspberry Pi Zero  | Raspbian 5.10         | -              | 01/01/2023      |\n\n## Gotachas\n\n---\nAbsolute mouse used only for positining. use relative mouse for clicking etc. see examples.\n",
    "bugtrack_url": null,
    "license": "LGPL",
    "summary": "Library for emulate mouse and keyboard on raspberry pi zero",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/thewh1teagle/zero-hid"
    },
    "split_keywords": [
        "rpi",
        " raspberry",
        " hid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e9c6697d63f8a4f4a10a485f2f4f870dd8c53db2332915a1ce0338ab5375b8f",
                "md5": "7d3f262b75b502012bffbca7c6764c1d",
                "sha256": "16fd7b8f0e49b4af4c76711dfcc1589797481ccdcd51f8299fb2532ffdd443e7"
            },
            "downloads": -1,
            "filename": "zero_hid-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d3f262b75b502012bffbca7c6764c1d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 36598,
            "upload_time": "2024-08-04T06:02:54",
            "upload_time_iso_8601": "2024-08-04T06:02:54.884009Z",
            "url": "https://files.pythonhosted.org/packages/8e/9c/6697d63f8a4f4a10a485f2f4f870dd8c53db2332915a1ce0338ab5375b8f/zero_hid-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a10ec78ce642355937c3e7fb298ff4a1fff2d357a86c65d2828fbeb48bc03fe",
                "md5": "8f85e3d207c8cfd1e29b9596036580d1",
                "sha256": "0387c4f2246846cc3b11034b093c68a2d9a7adf49b1ea275b25055ea80b0b218"
            },
            "downloads": -1,
            "filename": "zero_hid-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8f85e3d207c8cfd1e29b9596036580d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21278,
            "upload_time": "2024-08-04T06:02:56",
            "upload_time_iso_8601": "2024-08-04T06:02:56.244840Z",
            "url": "https://files.pythonhosted.org/packages/8a/10/ec78ce642355937c3e7fb298ff4a1fff2d357a86c65d2828fbeb48bc03fe/zero_hid-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 06:02:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thewh1teagle",
    "github_project": "zero-hid",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "zero-hid"
}
        
Elapsed time: 0.43987s