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

Question : How to handle multiple devices of the same type #18

Open
haskins-io opened this issue Apr 22, 2020 · 0 comments
Open

Question : How to handle multiple devices of the same type #18

haskins-io opened this issue Apr 22, 2020 · 0 comments

Comments

@haskins-io
Copy link

Hi,

loving the code. I have a question about how it can be modified to handle multiple connections of the same device.

Let's say I have two USB Mice, both are made by the same manufacturer, so both have the same vendor id and product id. When a button on mouse 1 is pressed I want to print "Hello", and when a button on the other mouse is pressed I want to print "World".

The read function receives all the data from the press of a mouse button, but I can't work out how to tie this back to a device that was detected in the rawDeviceAdded function.

It there anyway of doing this?

Thanks

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

No branches or pull requests

1 participant