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

Excluding ELAN touch screen #11324

Conversation

acolombier
Copy link
Member

Excluding ELAN touch screen, which fits XPS 15 laptops.

This should also exclude other touch screens, but unfortunately, the ELAN device exposes other HID usages through vendor specific and reserved usage pages (01ff, ff00 and ff01) so it cannot be excluded using the global rule.

This fixes #11323.

@acolombier acolombier marked this pull request as ready for review March 3, 2023 16:31
@JoergAtGithub
Copy link
Member

Is this an USB HID device? If it's an I2C HID or SPI HID device, we could also filter by bus type. Than all internal laptop devices would be hidden.
The bus type information is new in hidapi 0.13.0 https://github.com/libusb/hidapi/releases/tag/hidapi-0.13.0 and would require an update of hidapi in the ./lib folder first.

@acolombier
Copy link
Member Author

This particular device doesn't seem to be an USB HID, so this would work too.
Happy to give the update a spin and see how much work it would need to work if you think we should go this way instead.

@JoergAtGithub
Copy link
Member

This would be additional, because your change covers also the case of an HID touchpads on USB keyboards etc.

@JoergAtGithub
Copy link
Member

An HID touchpad/screen could be mapped for effects control like here: https://youtu.be/vVfmMevmxxs?t=99
But maybe this is not of practical relevance.

@acolombier acolombier force-pushed the bugfix/touchscreen-detected-as-controller branch from 155b8af to 9a226b8 Compare March 6, 2023 18:11
@acolombier
Copy link
Member Author

acolombier commented Mar 6, 2023

I have added an other exclusion for Logitech G Pro mouse which also appears to be detected as a valid controller unfortunately. The reason behind this is that this mouse expose bunch of other HID interface which can be use to tweak the mouse setting (colors, DPIs) as well as accessing status (battery level)

2 cents thought as this issue likely impacts many other devices - could we have a whitelist instead of a blacklist? This whitelist could be a little bit more flexible (e.g no devices are shown by default if not present on distributed whitelist -> user is able to to bypass the whitelist and select their device from the list of all HID device -> whitelist gets updated so next user find their device right away)

@JoergAtGithub
Copy link
Member

IMHO a whitelist is no good idea, because we can't filter for DJ controllers, because there is no specific usage table for DJ controllers.
But the other way around it works, there are usage tables for device categories like a mouse or a joystick. We could filter them out.

But we should also consider that many users use unofficial mappings. In our forum you find people, which are happy to use Mixxx with an HID game controller.

@JoergAtGithub
Copy link
Member

The code itself is looking good to me.
But I'm unsure if we should really block any HID touch screens by usage table. I could imagine that DJ controllers with a touch screen, have it defined as own HID top level collection - and than this filter makes it unaccasible for mapping developers.

@JoergAtGithub
Copy link
Member

I head a second thought about it. When we have a controller with touch input, it should most likely mapped to a future QML instance which renders the screen content and not to the normal HID mapping. Therefore it fits to ignore the usage touch here.

@JoergAtGithub JoergAtGithub merged commit 0ac86c0 into mixxxdj:2.4 Mar 25, 2023
@JoergAtGithub
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants