jfedor2 / hid-remapper

USB input remapping dongle
Other
1.11k stars 135 forks source link

Command-line Tool #176

Open MGlaab opened 2 months ago

MGlaab commented 2 months ago

Can I make a request for a YouTube video showing how you can use the command-line tool? I've used the web-based tool, and appreciate it, but I'd like to work up a python automation script that could flash multiple devices at once. (think of a classroom of individual student devices).

jfedor2 commented 2 months ago

You need the Python hid module.

There are some OS-specific instructions here: https://pypi.org/project/hid/

I've tried it on Ubuntu and macOS, not sure about Windows.

Then to load a configuration you would do:

python3 set_config.py < hid-remapper-config.json

This works if there's exactly one HID Remapper connected. If you want to configure multiple devices at the same time you'd have to slightly modify the scripts.

MGlaab commented 2 months ago

Thanks, I'm going to try with one device on my mac, and see if I can modify it.

jfedor2 commented 2 months ago

On Mac I've had success using MacPorts and installing the module with sudo port install py-hid. Just remember to use the Python instance from MacPorts afterwards. If you're using Homebrew it can probably be installed from there as well.