ch57x-keyboard-tool
所属分类:开发工具
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-07-03 07:54:15
上 传 者:
sh-1993
说明: 用于编程ch57x小型键盘的实用程序,
(Utility for programming ch57x small keyboard,)
文件列表:
Cargo.lock (24260, 2023-10-14)
Cargo.toml (785, 2023-10-14)
doc/ (0, 2023-10-14)
doc/keyboard-12-2.png (227271, 2023-10-14)
doc/keyboard-3-1.jpg (45237, 2023-10-14)
doc/keyboard-6-1.png (98033, 2023-10-14)
example-mapping.yaml (3140, 2023-10-14)
src/ (0, 2023-10-14)
src/config.rs (4390, 2023-10-14)
src/consts.rs (71, 2023-10-14)
src/keyboard.rs (11143, 2023-10-14)
src/main.rs (7831, 2023-10-14)
src/options.rs (1221, 2023-10-14)
src/parse.rs (6736, 2023-10-14)
# What is this?
This is an utility for programming small keyboards like this one:
![](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/doc/keyboard-12-2.png)
Such keyboards are popular on AliExpress and seller usually sends software
for programming, but it:
* requires Windows,
* is very ugly and inconvenient,
* can only program one key at a time
* don't expose all keyboard features
There are several modifications of such keyboards with different number of
buttons and knobs ([see some photos](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/#photos)) and with/without Bluetooth.
Both wired and wireless keyboards are supported, however programming
is possible though wire only in both cases!
Utility was reported to work with:
* 3×4 with 2 knobs (Bluetooth version)
* 3×3 with 2 knobs
* 3x2 with 1 knob
* 3x1 with 1 knob
All these keyboards share same vendor/product IDs: 1189:8890 (hexadecimal).
It is possible to override used vendor/product ID, but it is usually not needed.
Use it only if you find same-looking keyboard with other vendor/product ID,
I haven't seen such.
**Ability to override vendor/product ID doesn't mean that you can use
this software for programming arbitrary keyboards!**
# How to get it?
## Get prebuilt release
Download latest release from [GitHub releases](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/https://github.com/kriomant/ch57x-keyboard-tool/releases)
## Build it yourself
Install *cargo* utility using [rustup](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/https://rustup.rs/), then execute
`cargo install ch57x-keyboard-tool`.
# How to use?
**Note**: on Windows you need to install [USBDK](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/https://github.com/daynix/UsbDk/releases) first.
Now create you own config from provided *example-mapping.yaml*. Example
config has extensive documentation and examples inside.
You can validate config:
./ch57x-keyboard-tool validate < your-config.yaml
Use 'show-keys' command to list all supported modifier and key names.
Finally, upload config to keyboard:
./ch57x-keyboard-tool upload < your-config.yaml
Use 'sudo' if you get 'Access denied (insufficient permissions)':
sudo ./ch57x-keyboard-tool upload < your-config.yaml
You can also change LED configuration, if you keyboard supports it:
./ch57x-keyboard-tool led 1
# Notes
## Number of layers
All keyboards I've seen have three layer (three keys configuration which
may be switched). However I've been told there are keyboards without
layer switch. If so, just keep single layer in configuration file and you
are done.
## Custom keyboard layouts
If you use custom keyboard layout, like Dvorak, note that what you
write in configuration is in fact scan code of keyboard key and not
character that will be produced.
So use QWERTY-letter of keyboard key you want to press.
# Diagnostics
If you have any troubles using this software, please provide diagnostics.
## Getting list of attached USB devices
### MacOS
ioreg -w0 -l -p IOUSB
or
system_profiler SPUSBDataType
### Linux
lsusb -v
## Monitoring generated keyboard and mouse events
Most simple (and cross-platform) way I've found is using `keyboard` and `mouse` Python modules.
Monitoring keyboard:
pip3 install keyboard
sudo python3 -m keyboard
Monitoring mouse:
# Latest published 'mouse' module doesn't support MacOS, so use latest version from Git:
git clone https://github.com/boppreh/mouse
cd mouse
python3 -m mouse
## Photos
![](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/doc/keyboard-6-1.png)
![](https://github.com/kriomant/ch57x-keyboard-tool/blob/master/doc/keyboard-3-1.jpg)
近期下载者:
相关文件:
收藏者: