On Mon, Jul 4, 2011 at 10:06 PM, Peter Hutterer <[email protected]>wrote:
> On Thu, Jun 30, 2011 at 10:20:33AM -0600, Erich Hoover wrote:
> > The HP TC1100 has three buttons on the side of the display that are
> triggered
> > with the stylus. This patch adds support for these buttons, with the
> buttons
> > available under the following xsetwacom button IDs:
> > ID 13 = Rotate
> > ID 14 = Writing tool
> > ID 15 = On-screen keyboard
>
> can we test for these buttons on startup? If so, we could apply the
> appropriate labels.
>
I'll have to check and see if there's any difference between the ISDV4_QUERY
on the models I have available that exhibit this feature (tc1100, tc4200,
and tc4400) vs the ones that don't (2710p and 2740p). I'm not sure how else
one could figure this out. It's also worth noting that the tc4200 and
tc4400 have the buttons in a different order:
ID 13 = On-screen keyboard
ID 14 = Rotate
ID 15 = Writing tool
If we can't label them ahead of time, is there any overlap with any tablets
> that already provide buttons 13-15? if so, do we need to increase
> WCM_MAX_MOUSE_BUTTONS?
>
I doubt there are any other tablets that exhibit these crazy buttons,
otherwise people probably would have complained by now. Would it be too
much of a problem to include this feature and then up the number of buttons
if someone finds some overlap?
...
> >
> > + /* handle TC1100 stylus buttons */
> > + if ((data[0] == 0xC1) && ((data[1] & 0xF0) == 0))
>
> With the exception of the control bit, we try not to have direct protocol
> parsing in the code here. Please add these fields to the device state and
> parse them accordingly. See the stuff in isdv4.h.
> (the isdv4-serial-debugger should also be extended to support this bit as
> well if it is set)
>
Ok.
> ...
> > + ds->device_type = STYLUS_ID;
>
> shouldn't this be PAD_ID?
>
I'm not familiar with how PAD_ID is supposed to be used. If it helps, these
are three buttons located on the side of the display that are generally
referred to as the "pen buttons" (they must be pushed with the stylus):
http://img.muare.vn/haibaxa/HP1100.jpg
> > + wcmEvent(common, channel, ds);
> > +
> > + /* then immediately after send the release event */
>
> should this be sent on the first packet that doesn't have the matching bit
> set? what happens here if you keep holding the button down?
>
Only one event is given per push, if you hold it down the event only occurs
when you first touch the button (there is no release event).
> ...
> > + return common->wcmPktLength;
>
> so even though you only seem to parse the second byte, is there any
> information in that packet? You seem to still be advancing by
> ISDV4_PKGLEN_TPCPEN.
>
No, and it still works if I return two - would that be preferred?
having said that, this should really be a small function that is called if
> the header matches. isdv4Parse is unwieldly enough as-is, adding another 20
> lines to it doesn't make it easier to read.
>
Ok.
> also - why is this before the PktLength != ISDV4_PKGLEN_TPCPEN condition?
> can this bit be set in both touch and pen packages?
>
It didn't feel like it was related to either touch or pen events. Would it
be better to check the header and change the PktLength to 2, give it a
constant, and add an "else if" case to call this new function?
Thanks for your reply, I'd really like to get this included so I don't need
to keep patching the driver for these computers.
Erich Hoover
[email protected]
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel