On Wed, Oct 9, 2013 at 4:59 PM, Peter Hutterer <peter.hutte...@who-t.net> wrote: > On Wed, Oct 09, 2013 at 09:19:28AM -0700, Ping Cheng wrote: >> On Tue, Oct 8, 2013 at 10:44 PM, Peter Hutterer >> <peter.hutte...@who-t.net> wrote: >> > On Tue, Oct 08, 2013 at 10:28:42PM -0700, Ping Cheng wrote: >> >> On Tuesday, October 8, 2013, Peter Hutterer wrote: >> >> >> >> > On Mon, Oct 07, 2013 at 11:57:16AM -0700, Ping Cheng wrote: >> >> > > On Sunday, October 6, 2013, Peter Hutterer wrote: >> >> > > >> >> > > > On Thu, Oct 03, 2013 at 05:18:26PM -0700, Ping Cheng wrote: >> >> > > > > Some devices send expresskeys on its own interface, that is, there >> >> > > > > is no motion/pointer events associated with the pad interface. >> >> > > > > >> >> > > > > This patch handles above case. >> >> > > > > >> >> > > > > Signed-off-by: Ping Cheng <pi...@wacom.com >> >> > > > > <javascript:;><javascript:;>> >> >> > > > > --- >> >> > > > > src/wcmUSB.c | 3 ++- >> >> > > > > 1 file changed, 2 insertions(+), 1 deletion(-) >> >> > > > > >> >> > > > > diff --git a/src/wcmUSB.c b/src/wcmUSB.c >> >> > > > > index 634eb1c..4a49c4a 100644 >> >> > > > > --- a/src/wcmUSB.c >> >> > > > > +++ b/src/wcmUSB.c >> >> > > > > @@ -1756,7 +1756,8 @@ static void >> >> > usbGenericTouchscreenQuirks(unsigned >> >> > > > long *keys, >> >> > > > > */ >> >> > > > > if (ISBITSET(keys, BTN_TOUCH) && >> >> > > > > !ISBITSET(keys, BTN_TOOL_FINGER) && >> >> > > > > - !ISBITSET(keys, BTN_TOOL_PEN)) >> >> > > > > + !ISBITSET(keys, BTN_TOOL_PEN) && >> >> > > > > + ISBITSET(abs, ABS_X)) >> >> > > > > { >> >> > > > > SETBIT(keys, BTN_TOOL_FINGER); /* 1FGT */ >> >> > > > > TabletSetFeature(common, WCM_TPC); >> >> > > > > -- >> >> > > > > 1.8.1.2 >> >> > > > >> >> > > > so you're saying that we get a device that has BTN_TOUCH but no >> >> > BTN_TOOL_* >> >> > > > set? >> >> > > >> >> > > >> >> > > No, not exactly. >> >> > > >> >> > > When BTN_TOUCH is set without BTN_TOOL_*, it means a single finger >> >> > > touchscreen. That definition has been discussed many time at LKML and >> >> > > all >> >> > > parties agreed. That's why we had the existing if statement, which can >> >> > not >> >> > > be changed in the kernel. >> >> > > >> >> > > The change above means, if a tool falls into the case, ABS_X has to be >> >> > set >> >> > > too. That is, the tool has to report motion events. >> >> > > >> >> > > We need to explicitly set ABS_X for single finger touchscreen since we >> >> > now >> >> > > have a tool (for new Intuos) that only sends button events on its >> >> > > interface. ABS_X can not be set for this tool/pad since there is no >> >> > motion >> >> > > events associated with this tool. If we do not check ABS_X, the pad >> >> > > would fall into single finger touchscreen case. >> >> > > >> >> > > >> >> > > > if so, can we fix this in the kernel driver please? >> >> > > > >> >> > > >> >> > > Are you still following me :-)? We can not fix it in the kernel >> >> > > although >> >> > I >> >> > > wish we could too. >> >> > >> >> > fair enough. next question though: what _does_ the new Intuos pad device >> >> > actually provide? >> >> >> >> >> >> Four buttons - express keys only device. >> > >> > so BTN_A through to BTN_D? >> >> BTN_LEFT, BTN_RIGHT, BTN_FORWARD, BTN_BACKWARD. This is the generic >> type of devices, such as Bamboo. >> >> >> > if it's not providing pointer coordinates, why does it do >> >> > BTN_TOUCH? >> >> >> >> If I do not set BTN_TOUCH, the device goes to joystick driver. We can not >> >> control it any more. >> > >> > isn't there a blacklist/whitelist facility in the kernel for that? >> >> It is not the driver in the kernel. it is the joystick driver in X server. > > heh, funny. we don't even ship that driver in Fedora/RHEL because most of > the time it doesn't actually do what users want it to do :) Having said > that, this would need an adjustment in the configuration, it's not something > we should hack around by setting bits that shouldn't be there.
Yeah, I see joystick driver was disabled by default in the config file [1]. However, we can not assume no one will enable it. The fact is, on my testing machine, I did not enable it. > BTN_TOUCH has a specific meaning, we shouldn't set it unless we actually > intend to send the events for it. Then what solution do you have for us to support this pad without interfering with joystick? From kernel input documentation, it looks like we are not violating the rules. You have to touch the pad to send events ;-). I do not have to use BTN_TOUCH. But, please make a suggestion if you do not like this one. Ping [1] http://cgit.freedesktop.org/xorg/driver/xf86-input-joystick/commit/?id=8f9342484afbbd26296c627497cc278f600098ac [2] https://www.kernel.org/doc/Documentation/input/event-codes.txt ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel