НА РУССКОМ СЮДА text
This is a minimal CLI tool in Python for reading and writing button bindings on the ASUS ROG Pugio mouse (VID:0x0B05, PID:0x1846) under Windows. It's a port of the ASUS driver from the open-source libratbag project (C/Linux), focusing on HID communication via the vendor interface (MI_02).
- MVP: Read current bindings (
getbinds). - Write new binding to a button with auto-save (
setbind <src> <dst> <typ>).
- No javascript, no typescript, no webassembly
- No C++
- No C#
- Debugged with print
- Written by grok4 free, 0 money wasted on AI
- No Baikal water wasted (probably)
- Installation:
pip install hidapi(HID library). - Run: No admin rights required (works with standard HID drivers).
- Read:
python main.py getbinds— outputs bindings (internal/ratbag, descriptions, raw hex). - Write:
python main.py setbind 0xf2 0x04 0— src=0xf2 (middle button), dst=0x04 ('A'), typ=0 (keyboard). Auto-saves and shows get after.
- Read:
- Parameters:
- src/dst: Hex codes (e.g., 0xf2 = middle, 0x04 = 'A', 0xff = disable).
- typ: 0 = keyboard (HID-key), 1 = mouse/special (ASUS-code).
- Note: Changes are saved to flash. For src — hardware codes from ButtonMapping (f0=left, f1=right, f2=middle, e4=back, e5=forward, e6=DPI, e8=wheel_up, e9=wheel_down, e1=back2, e2=forward2).
- libratbag (driver-asus.c, asus.c, Pugio data).
- HID scan codes
