Custom vendor / product codes

Asked by tanktarta

I have finally got around to try to update my project to the latest python-uinput, but have a hit a snag. The old version I was using (0.3), used to allow setting of USB vendor and product codes :-

 uinput_device = uinput.Device(name="gnome15-%s" % device_type,
                                          capabilities = caps,
                                          abs_parameters = abs_parms,
                                          vendor = GNOME15_USB_VENDOR_ID,
                                          product = virtual_product_id)

I would like to set those so my virtual devices can be given the right permissions by udev rules. Does 0.7 have anything like this? Also, do I need to worry about abs_parameters any more?

Question information

Language:
English Edit question
Status:
Solved
For:
python-uinput Edit question
Assignee:
No assignee Edit question
Solved by:
tanktarta
Solved:
Last query:
Last reply:
Revision history for this message
a (tuomasjjrasanen) said :
#1

Good questions!

And unfortunately no, 0.7 does not have those device id fields anymore. But it's a regression and I'll mark it as a bug. I will fix that make a new fix-release very soon. Stay tuned.

The answer to your second question is also no. You don't have to care about abs_parameters anymore if you are not using a device which has absolute axis. Examples of three different kind of devices can found from the source package under examples-directory.

Revision history for this message
tanktarta (tanktarta) said :
#2

Thanks, that release answers all my questions (I had the problem with the missing ids as well). Also joystick.py shows me exactly what I need wrt abs_parameters.