zero-hid


Namezero-hid JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/thewh1teagle/zero_hid
SummaryLibrary for emulate mouse and keyboard on raspberry pi zero
upload_time2023-12-04 13:25:14
maintainer
docs_urlNone
authorthewh1teagle
requires_python
licenseLGPL
keywords rpi raspberry hid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="https://user-images.githubusercontent.com/61390950/141596451-c3f69064-7152-4d07-80b0-141b60265c02.png" style="width: 500px; height: 300px; border-radius: 100px">

HID python library for emulating mouse and keyboard on PI.


## Setup

1. Install apt dependencies

```bash
sudo apt-get update
sudo apt-get install -y git python3-full
```  


2. install [usb gadget module](https://github.com/thewh1teagle/zero-hid/tree/main/usb_gadget#usb-gadget-module-configuration-for-zero-hid)  
3. Install `zero-hid` with `pip`
```bash
pip3 install zero-hid
```

## 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
- Easy to setup
- Comprehensive Testing

## Examples
see [examples](examples)

## Tests
| Raspberry Pi Model | Raspbian Version | Kernel Version |
|---------------------|-------------------|----------------|
| Raspberry Pi 4      | Raspbian 12       | 6.1            |
| Raspberry Pi Zero   | Raspbian 5.10     | -              |

## Gotaches

Error when installing with pip
```shell
error: externally-managed-environment
```
See [how-solve-error-externally-managed-environment-when-installing-pip3](https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3)

Or simply execute
```shell
sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thewh1teagle/zero_hid",
    "name": "zero-hid",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rpi,raspberry,hid",
    "author": "thewh1teagle",
    "author_email": "example@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/70/d3/76aebfd336b88b126aac77c5f2a55ef87feb298062d88b2cda61a0c5c178/zero-hid-0.1.6.tar.gz",
    "platform": null,
    "description": "<img src=\"https://user-images.githubusercontent.com/61390950/141596451-c3f69064-7152-4d07-80b0-141b60265c02.png\" style=\"width: 500px; height: 300px; border-radius: 100px\">\n\nHID python library for emulating mouse and keyboard on PI.\n\n\n## Setup\n\n1. Install apt dependencies\n\n```bash\nsudo apt-get update\nsudo apt-get install -y git python3-full\n```  \n\n\n2. install [usb gadget module](https://github.com/thewh1teagle/zero-hid/tree/main/usb_gadget#usb-gadget-module-configuration-for-zero-hid)  \n3. Install `zero-hid` with `pip`\n```bash\npip3 install zero-hid\n```\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- Easy to setup\n- Comprehensive Testing\n\n## Examples\nsee [examples](examples)\n\n## Tests\n| Raspberry Pi Model | Raspbian Version | Kernel Version |\n|---------------------|-------------------|----------------|\n| Raspberry Pi 4      | Raspbian 12       | 6.1            |\n| Raspberry Pi Zero   | Raspbian 5.10     | -              |\n\n## Gotaches\n\nError when installing with pip\n```shell\nerror: externally-managed-environment\n```\nSee [how-solve-error-externally-managed-environment-when-installing-pip3](https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3)\n\nOr simply execute\n```shell\nsudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED\n```\n",
    "bugtrack_url": null,
    "license": "LGPL",
    "summary": "Library for emulate mouse and keyboard on raspberry pi zero",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/thewh1teagle/zero_hid"
    },
    "split_keywords": [
        "rpi",
        "raspberry",
        "hid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ccf765ad3bcd692f9ef1ccabcbc83b686409bbbd8c33830db7c3ac5945aa6844",
                "md5": "162aa1438ef53182ceda5e7553b75cd8",
                "sha256": "617d72b9eacb938ab219862bdd2351985ef50254dd121f8a99a72687a4add4ff"
            },
            "downloads": -1,
            "filename": "zero_hid-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "162aa1438ef53182ceda5e7553b75cd8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 45724,
            "upload_time": "2023-12-04T13:25:11",
            "upload_time_iso_8601": "2023-12-04T13:25:11.292516Z",
            "url": "https://files.pythonhosted.org/packages/cc/f7/65ad3bcd692f9ef1ccabcbc83b686409bbbd8c33830db7c3ac5945aa6844/zero_hid-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70d376aebfd336b88b126aac77c5f2a55ef87feb298062d88b2cda61a0c5c178",
                "md5": "a3ca16d922fa54d38e9d9f589d166d9d",
                "sha256": "3549fef24b9c0dff4efa0fea767b64e1675c6ebb761e94d5dec419093107c233"
            },
            "downloads": -1,
            "filename": "zero-hid-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "a3ca16d922fa54d38e9d9f589d166d9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30614,
            "upload_time": "2023-12-04T13:25:14",
            "upload_time_iso_8601": "2023-12-04T13:25:14.603506Z",
            "url": "https://files.pythonhosted.org/packages/70/d3/76aebfd336b88b126aac77c5f2a55ef87feb298062d88b2cda61a0c5c178/zero-hid-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 13:25:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thewh1teagle",
    "github_project": "zero_hid",
    "github_not_found": true,
    "lcname": "zero-hid"
}
        
Elapsed time: 0.14509s