Metadata-Version: 2.1
Name: qingpi-python
Version: 0.1.7
Summary: Python library for Qingpi.
Home-page: https://github.com/U-1F992/qingpi
Author: Koutaro Mukai
Author-email: mukai.k1011k@outlook.jp
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyserial (>=3.5,<4.0)
Project-URL: Repository, https://github.com/U-1F992/qingpi
Description-Content-Type: text/markdown

# qingpi-python

Python library for Qingpi.

```shell-session
$ pip install qingpi-python
```

## qingpi-controller

GUI application to control Qingpi with transparent Window and Citra compatible keyboard operation.

Currently, only Windows version is available.

![](screenshot.jpg)

### Run

```shell-session
$ python -m qingpi [port]
```

or

```shell-session
> qingpi-controller.exe [port]
```

### Input mapping

<dl>
<dt>

Button

</dt>
<dd>

| Control  | Input |
| -------- | :---: |
| A        |  `A`  |
| B        |  `S`  |
| X        |  `Z`  |
| Y        |  `X`  |
| L        |  `Q`  |
| R        |  `W`  |
| ~~ZL~~   |  `1`  |
| ~~ZR~~   |  `2`  |
| START    |  `M`  |
| SELECT   |  `N`  |
| HOME     |  `B`  |
| POWER    |  `V`  |
| WIRELESS |  `P`  |

</dd>
<dt>

Hat

</dt>
<dd>

| Control | Input |
| ------- | :---: |
| UP      |  `T`  |
| RIGHT   |  `H`  |
| DOWN    |  `G`  |
| LEFT    |  `F`  |

</dd>
<dt>

SlidePad

</dt>
<dd>

| Control |   Input   |
| ------- | :-------: |
| UP      |  `<Up>`   |
| RIGHT   | `<Right>` |
| DOWN    | `<Down>`  |
| LEFT    | `<Left>`  |

</dd>
<dt>

~~Circle Pad Pro~~ (not implemented)

</dt>
<dd>

| Control   | Input |
| --------- | :---: |
| ~~UP~~    |  `I`  |
| ~~RIGHT~~ |  `L`  |
| ~~DOWN~~  |  `K`  |
| ~~LEFT~~  |  `J`  |

</dd>
<dt>

Hotkeys

</dt>
<dd>

| Control       | Input |
| ------------- | :---: |
| Expand window |  `+`  |
| Shrink window |  `-`  |

</dd>
</dl>

## Developer note

```shell-session
$ poetry run python -m qingpi [port] --debug
```

The build script requires PyInstaller and ImageMagick.

```shell-session
$ poetry run python -m pip install pyinstaller
$ make
```

PyInstaller is not included in the dev group because PyInstaller has a narrower Python version specification than necessary (e.g. v6.3.0 requires "<3.13,>=3.8"), which affects version reqirements of qingpi-python.

To avoid security issues,

```shell-session
$ poetry run python -m pip uninstall pyinstaller
$ git clone https://github.com/pyinstaller/pyinstaller --depth 1
$ cd .\pyinstaller\bootloader\
$ py .\waf distclean all
$ cd ..\..\
$ poetry run python -m pip install .\pyinstaller\
```
