Re: [PATCH] hid-ntrig.c Multitouch cleanup and fix
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2010-03-10 03:47:52
On Tue, Mar 09, 2010 at 07:32:57PM -0500, Rafi Rubin wrote:
On 03/09/2010 06:42 PM, Dmitry Torokhov wrote:quoted
On Tue, Mar 09, 2010 at 06:38:22PM -0500, Rafi Rubin wrote:quoted
On 03/09/2010 06:23 PM, Henrik Rydberg wrote:quoted
Rafi Rubin wrote:quoted
quoted
Single touch should be goverened by one of BTN_TOUCH or ABS_PRESSURE. BTN_TOOL_DOUBLETAP is a two-finger event.That definitely makes sense to me. I really don't know why wacom uses double tap there. Is there any harm in letting through the BTN_0 events? Is the "rdesc" mapping defined by the hardware or hid?I cannot imagine BTN_0 will do any harm. In synaptics, the BTN_X buttons are mapped to multibuttons without clear-cut usage. The button events that carry well-defined semantic meaning with regard to touch screens are BTN_TOUCH (any finger), BTN_TOOL_FINGER (one finger), BTN_TOOL_PEN (pen), BTN_TOOL_DOUBLETAP (two fingers) and BTN_TOOL_TRIPLETAP (three fingers or more). HenrikPerhaps we should have a general touch device document. I looked at the evdev code. And as you say for single touch devices, BTN_TOUCH is the bit that matters. It only broken because I pulled the TOUCH<- 0 when I removed BTN_0. So why does evdev associate BTN_TOOL_FINGER with touchpads (resulting in the wrong set of assumptions and a poorly calibrated touch screen)? I suppose that's really a discussion for another list.Historic reasons. When Synaptics driver was in works we needed an event that is different from BTN_TOUCH to differentiate from touchscreens.So should I clear the BTN_TOOL_FINGER bit for ntrig, or push to clean up evdev? At the moment nothing is actually expecting or emitting the finger events. Given the move to actual mt support does it make sense to use finger, double and triple for single touch events? I'd vote for letting the user space mt tools handle more advanced button clicks.
I'd opt for this as well; let's leave BTN_TOOL_FINGER to touchpads. -- Dmitry