zjueva-joybutton-mapping/README.md

14 lines
911 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 按钮映射
## 说明
原用于德国心脏病的设备共有 6 个接口,全部接上后共有 12 个按钮,现编号为 A0 ~ A5、D2 ~ D7。经 Zyme 调试后修复成功。现将其进行键盘映射以适应更广泛的需求。
## 功能
1. 程序运行后,会先检测当前连接的串口,并向 USB 串口发送 'C' 作为检验。该设备接收到大写字母 C 后会返回 `OK`
2. 程序开启对应串口,并等待初始化。
3. 程序读取文件夹中的键盘映射配置文件(具体格式附文件内),并构建映射表。
4. 程序开始循环读取串口输出内容,并映射为键盘对应键。
## 注意
1. 在程序初始化串口完毕前,请不要按动任何按钮。
2. 如果同时安装了 `serial``pyserial` 包,请先将这两个包都卸载,再单独安装 `pyserial` 包。
## 所需包
- `pyautogui`
- `pyserial` **(不是 `serial`**