On Thu, Mar 4, 2010 at 11:45 PM, Ping Cheng <pingli...@gmail.com> wrote: > On Thu, Mar 4, 2010 at 5:41 PM, <ch...@cnpbagwell.com> wrote: >> This is applies to devices that have both BTN_TOOL_FINGER >> and BTN_TOOL_DOUBLETAP which currently is limitted to >> Bamboo touch devices. > > Since the patch applies to the devices that have both BTN_TOOL_FINGER > and BTN_TOOL_DOUBLETAP tools, which currently are limitted to Bamboo touch > devices, can we make it a bit generic by checking BTN_TOOL_FINGER & > BTN_TOOL_DOUBLETAP, instead of the specific product IDs? > > + if (IsPad(priv) && > + common->tablet_id >= 0xd0 && common->tablet_id <= 0xd3) > > Sorry for coming up with this idea so late.
That is a good idea but we will need to grow into that since the data isn't readily available. I think what your suggesting is the way most other input drivers would do it. Basically, if I had handy that keys[] array used during Init phase then I could detect in usbGetRanges() if any of the device types that will share 1 common structure support the BTN_TOOL_DOUBLETAP and if so then load up touch values. The required ioctl() is already called in both usbWcmInit() and usbProbeKeys() (similar places in linuxwacom). I don't really want to add a third place. Perhaps we should start storing the list of supported keys in common? One other item I've been debating on. I'm thinking about adding something like device_type but to the common structure. It would have values like touchpad, touchscreen, and maybe pen. It would be short hand variable representing main purpose of shared event input instead of inferring from relative/absolute mode or looking for a shared IsTouch(priv). This could be set in usbWcmInit() when keys are handy and could also be used in wcmGetRanges(). Chris ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel