Skip to content
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

Handle 3DConnexion devices natively #236

Open
UnderSampled opened this issue Sep 6, 2019 · 1 comment
Open

Handle 3DConnexion devices natively #236

UnderSampled opened this issue Sep 6, 2019 · 1 comment
Labels
major-work Amount of work required for this task. new feature Description of a novel feature.

Comments

@UnderSampled
Copy link

In order to use a 3DConnexion device (such as a Space Navigator) with Joystick Gremlin, it is necessary to first make them available as an input vJoy using Sx2vJoy: https://github.com/Lasse-B/Sx2vJoy . Sx2vJoy needs to see the 3DConnexion device, it cannot be hidden HidGuardian, and of course the vJoy it creates also must be available. It would be great if all of this could be handled inside Joystick Gremlin. Joystick Gremlin does recognize the Space Navigator, but doesn't have the required smarts Sx2vJoy has to make use of it.

The important parts of Sx2vJoy that Joystick Gremlin doesn't already have is really just a portion of the one file: https://github.com/Lasse-B/Sx2vJoy/blob/master/source/Sx2vJoy.ahk

@WhiteMagic WhiteMagic added major-work Amount of work required for this task. new feature Description of a novel feature. labels Sep 6, 2019
@WhiteMagic
Copy link
Owner

WhiteMagic commented Sep 6, 2019

The main issue, well not issue but the part that will make this something that's a lot of work, is that the way Sx2vJoy interacts with the device is via raw HID. Gremlin has no capability to do so and really doesn't even know how to read physical device data at all. That information is obtained and managed by another library (DILL in this case) which provides DirectInput event data to Gremlin which then does its thing with that.

From the outset Gremlin only cared to handle DirectInput devices and nothing else, for simplicity and focusing efforts purposes. If I or someone else wanted to integrate Sx2vJoy into Gremlin then the most sensible approach would be an additional library or extension of DILL to read 3DConnexion devices and feed the processed data to Gremlin. I am unsure if extending DILL would even work, as from memory 3DConnexion devices report values in some weird ranges which fall outside those specified by DirectInput.

The structure used to pass input events around inside Gremlin gremlin.event_handler.Event should be able to handle 3DConnexion devices, although depending on how they report values it might get confusing. If integration into something like DILL isn't possible a new event handling portion would then have to be added to gremlin.event_handler.EventListener to receive the specific events and translate them into Event objects which would then be dispatched.

Overall none of this is impossible, however, it is also not something that would be done in a day and as I don't personally have a 3DConnexion device I would not be able to do any testing, development of the libraries reading data, or verifying integration into Gremlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-work Amount of work required for this task. new feature Description of a novel feature.
Projects
None yet
Development

No branches or pull requests

2 participants