opentrack to Linux mouse events #1582
digitaltrails
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had the impression opentrack already did mouse-emulation, but it didn't appear on my Linux DIY build of opentrack. Perhaps it's a Windows-only feature? I pressed on anyway and wrote something myself.
I just uploaded a opentrack-mouse gist. The gist reads the UPD-protocol output from opentrack, and uses python evdev (interface to the kernet via libevdev) to inject the mouse move events in the Linux HID subsystem. It works OK, it probably needs all kinds of mapping curve adjustments.
This all started because I wasn't having much luck with head tracking in Linux with IL-2 BoS. I'm not sure if I'll do much more with it, to be useful in IL-2 I think I would need to spend quite some time adjusting mappings and sensitivities, plus add some kind of auto-centering reset.
I thought it might be a useful example to mention here. Anyone who wants to write a python script to use the UDP-protocol, or play similar tricks with the Linux HID subsystem might find it useful. I imagine it would also be straight forward to convert the approach into C/C++.
Beta Was this translation helpful? Give feedback.
All reactions