| Crates.io | qmk-hid |
| lib.rs | qmk-hid |
| version | 0.1.0 |
| created_at | 2025-03-08 08:48:03.009599+00 |
| updated_at | 2025-03-08 08:48:03.009599+00 |
| description | A simple CLI for bidirectional communication with QMK keyboards using raw HID. |
| homepage | |
| repository | https://github.com/luckasRanarison/qmk-hid |
| max_upload_size | |
| id | 1584223 |
| size | 20,296 |
A simple CLI for bidirectional communication with QMK keyboards using raw HID, written in Rust with a small memory footprint.
You can install qmk-hid using Cargo or by building it from source.
cargo install qmk-hid
To use qmk-hid you must find you keyboard's vendor ID and product ID. They can be usually found in your keyboard's info.json or using tools like lsusb.
On Linux, you have to setup udev rules to allow access to the HID device.
qmk-hid --help ## prints help
qmk-hid --vendor-id 18003 --product-id 4 ## example using a corve v4 keyboard
Once qmk-hid is running:
qmk-hid will continuously poll for a connection until the device is available (the default interval is 3000ms).[!IMPORTANT] In both directions the message length should be 32 bytes or less, you have to implement a custom protocol overwise
Since qmk-hid uses standard input and output for communication, it can be easily integrated into scripts or other programs. You can checkout the NodeJS demo for a simple example.
To build qmk-hid you will need the Rust toolchain and libhidapi system libraries. Then you can just clone the repository and use the following command:
cargo build --release