ITADN

fix: preserve forwarded mouse DPI metadata during injection

#1290Pull Requestmizuikk 创建于 2026-05-09
M
mizuikkcommented
## Summary This fixes a pointer feel regression when injecting mouse devices. Before this change, the forwarded virtual mouse created by input-remapper could lose hwdb-derived properties such as `MOUSE_DPI`. On devices like the Logitech G Pro, that caused the injected pointer to feel different from the original device even though the event capabilities were copied. ## What changed - keep the forwarded device name identical to the source device so system mouse hwdb rules can still match - assign a dedicated `input-remapper/...` phys path to forwarded devices so they remain distinguishable without reusing the original hardware phys - add a udev rule that restores `ID_BUS` for forwarded devices before `70-mouse.rules` runs, allowing `MOUSE_DPI` to be applied - prevent autoload and device discovery from treating input-remapper-created devices as real hardware - update tests and local uinput mocks to cover forwarded phys handling and input-remapper device filtering ## Why On my system, enabling injection for a Logitech G Pro changed the effective pointer curve/DPI feel. Inspecting the injected device showed that the forwarded virtual mouse was missing the original device's `MOUSE_DPI` metadata. After this patch, the forwarded device keeps the original device name, gets `ID_BUS=usb`, and successfully receives the same `MOUSE_DPI` value as the physical mouse. ## Verification Manual verification on Linux with a Logitech G Pro: - before the patch, the forwarded device had no `MOUSE_DPI` - after the patch, both the physical device and the forwarded device expose: `MOUSE_DPI=400@1000 *800@1000 1600@1000 3200@1000 6400@1000` - pointer feel is now indistinguishable during injection in real use ## Notes I also observed unrelated instability in the local test environment on Python 3.14, but the DPI/metadata fix itself was validated on the real device.
合并状态:未合并 5 条评论