-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to output as a virtual joystick? #34
Comments
I think the reason that your mouse is not getting detected as a joystick is because most joysticks use EV_ABS events, whereas your mouse is emitting EV_REL events. On the latest stable evsieve, you could try using
... but you will probably run into issues because this results in the possible output values being theoretically unbounded (and with 32-bit integer limitations, bounded by [-2147483648, 2147483647]). Since I suppose much software will determine how far the joystick has been moved by comparing its current value to the range of the axes, a value of 30 will probably be treated as a negligible movement. To fix this on the latest stable version, I suppose you could try to multiply the movement by a big value?
For a more sensible solution to this problem, I made it possible on the development main branch to specify a range of values for output keys, to clip the axes within a certain range of values, e.g.
will clip the values for all EV_ABS events in the range [-64, 64]. Depending on the range of what your mouse output, another range may be more suitable. (The reason this is not possible on the stable version yet is because I wasn't sure whether I wanted to use ranges on output events for clipping or for scaling, so I had left unimplemented. By now, we already have another way to scale events but no way to clip them, so I suppose it makes sense to use ranges on output events for clipping.) The above is based on the assumption that your mouse uses EV_REL events to report absolute values, which seems the most likely way based on what the mouse looks like. If I am wrong and the above does not work properly because it uses EV_REL events to report actually relative values, then check out the new |
wow, installing Thanks for your help! |
Hello! I have a spacenavigator 6dof mouse, and am trying to convert its events to a joystick output. It currently resides at
/dev/input/event3
.evtest
shows relative events:Additionally, I can run
evsieve
with the following arguments:and then read
/dev/input/js0
withevtest
to get the same relative events as before.However, this is obviously just passing the raw events and not outputting a proper joystick / controller format; KDE's fancy Game Controller page tells me this:
I apologize if this is trivial, but after going through the README I am still confused on how to actually make joystick output with
evsieve
. What mappings should I be using? Should these be absolute events instead?Thanks!
The text was updated successfully, but these errors were encountered: