Hi guys, While working on my GameController API, I've discovered that there are missing evdev_constants for some controllers (namely, the xbox 360 wireless controller), and evdev controls are not being created for them. For this controller, the dpad registers as buttons, with indexes 704 through 707. These are not defined in pyglet.input.evdev_constants, so OK, easy fix I thought. Taking the values from the Linux kernel's input.h, I defined these constants: BTN_TRIGGER_HAPPY1 = 0x2c0 BTN_TRIGGER_HAPPY2 = 0x2c1 BTN_TRIGGER_HAPPY3 = 0x2c2 BTN_TRIGGER_HAPPY4 = 0x2c3
So far so good. The constants now show up in evdev_constants._key_raw_names. Unfortunately, the _create_control function in evdev is unable to recognise these inputs. I think it might be an issue with the EVIOCGBIT functio in evdev, but I can't understand the code yet (lots of ctypes stuff). My best guess is that it's an issue with the number of bits that are being allocated, since these constants have a much higher value than other keys. The linux C code seems to hint at this. Any help would be greatly appreciated! -Ben -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
