Host component for communicating with QMK keyboards using Raw HID feature.
Requires support on keyboard side, currently is supported by stront.
Application is written in Rust which gives easy access to HID libraries, low-level Windows/Linux APIs and cross-platform compatibility.
Windows | Linux | MacOS | |
---|---|---|---|
Time | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Volume | :heavy_check_mark: | :heavy_check_mark: (PulseAudio) | :heavy_check_mark: |
Input layout | :heavy_check_mark: | :heavy_check_mark: (X11) | :heavy_check_mark: |
Media info | :heavy_check_mark: | :heavy_check_mark: (D-Bus) |
MacOS is partially supported, as I don't own any Apple devices, feel free to raise PRs.
All files are available in latest release.
Default configuration is set to stront. For other keyboards you need to modify the configuration file (qmk-hid-host.json
).
devices
section contains a list of keyboards
productId
- pid
from your keyboard's info.json
name
- keyboard's name (optional, visible only in logs)usage
and usagePage
- optional, override only if RAW_USAGE_ID
and RAW_USAGE_PAGE
were redefined in firmwarelayouts
- list of supported keyboard layouts in two-letter format (app sends layout's index, not name)reconnectDelay
- delay between reconnecting attempts in milliseconds (optional, default is 5000){
"devices": [
{
"productId": "0x0844"
}
],
"layouts": ["en"]
}
Configuration is read from file qmk-hid-host.json
in the current working directory. If it is not found, then the default configuration is written to this file.
You can specify a different location for the configuration file by using --config (-c)
command line option. For example:
qmk-hid-host -c $HOME/.config/qmk-hid-host/config.json
qmk-hid-host.exe
When you verified that the application works with your keyboard, you can use qmk-hid-host.silent.exe
instead (like add it to Startup). It does not have a console or logs, and can be killed only from Task Manager.
Update udev
rules by running script (remember to update idVendor
and idProduct
to your values first):
sudo sh -c 'echo "KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{idVendor}==\"feed\", ATTRS{idProduct}==\"0844\", MODE=\"0666\"" > /etc/udev/rules.d/99-qmkhidhost.rules'
Reconnect keyboard
Start qmk-hid-host
, add it to autorun if needed
Download qmk-hid-host
Modify qmk-hid-host.json
Add your layouts, for example:
"layouts": ["ABC", "Russian"],
if you don't know what layout are installed in you system, run qmk-hid-host with the layouts listed above, change lang and look at terminal output:
INFO qmk_hid_host::providers::layout::macos: new layout: 'ABC', layout list: ["ABC", "Russian"]
INFO qmk_hid_host::providers::layout::macos: new layout: 'Russian', layout list: ["ABC", "Russian"]
"new layout:" is what you need
start qmk-hid-host
from directory where your qmk-hid-host.json
is located
If you qmk-hid-host
stuck at Waiting for keyboard...
there are two common mistakes:
cargo run
qmk-hid-host.json
in root folder and run again