Python module to control ch9329
Project description
ch9329
Python module to control ch9329
Installation
You can install the package via pip:
pip install ch9329
Usage
from serial import Serial
from ch9329 import keyboard
from ch9329 import mouse
from ch9329.config import get_manufacturer
from ch9329.config import get_product
from ch9329.config import get_serial_number
ser = Serial("COM3", 9600, timeout=0.05)
keyboard.press_and_release(ser, "a", modifiers=["ctrl"])
keyboard.write(ser, "Hello World\n")
keyboard.write(ser, "abcdefghijklmnopqrstuvwxyz\n")
keyboard.write(ser, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n")
keyboard.write(ser, "0123456789\n")
keyboard.write(ser, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\n")
mouse.move(ser, x=500, y=500)
mouse.move(ser, x=50, y=50, relative=True)
mouse.click(ser, button="left")
print(get_serial_number(ser))
# 20193152CFBF
print(get_product(ser))
# WCH UART TO KB-MS_V1.7
print(get_manufacturer(ser))
# WWW.WCH.CN
ser.close()
License
This project is licensed under the terms of the MIT license.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Contact
If you want to contact me you can reach me at pradish@sandbox.com.np.
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 Distribution
ch9329-1.2.6.tar.gz
(10.1 kB
view details)
Built Distribution
ch9329-1.2.6-py3-none-any.whl
(11.1 kB
view details)
File details
Details for the file ch9329-1.2.6.tar.gz
.
File metadata
- Download URL: ch9329-1.2.6.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d045c01239c9b200a63aa5c8b683938dbdb52f42520b0176f51da46d57795844 |
|
MD5 | cfc0a57657f23c5fe3772e5291a4eff0 |
|
BLAKE2b-256 | b77e3a7a76ff954ce501a29e00b89fb9e64ae538d5f4f044a3010a6538ab2259 |
File details
Details for the file ch9329-1.2.6-py3-none-any.whl
.
File metadata
- Download URL: ch9329-1.2.6-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad3d2a07d1aed76fb5f3b443582778fa09cf235d1aa9e8956739a8f9f8575d6a |
|
MD5 | 8fc0ed9ad87eddba8eb58098c9189a67 |
|
BLAKE2b-256 | effc2b926ececd1f07124ec8e31512e4dcc7d6e66b7cb846a1d513637635bbfc |